prevent-overwriting-of-screenshots #5129
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed fix:
Once this PR is merged, to update the screenshots in
How it Works See It in Action
section on an Meshery integration's individual page, below steps have to be followed:title
from the .mdx file of the integration ( found in src/collections/integrations/) and create a directory in src/collections/integrations/_images/ named after the sluggified version of thetitle
.src/collections/integrations/_images/<sluggified version of title>/
with the latest screenshots.Description of changes made:
gatsby-node.js
:Added the
name
property to the context object to pass it as a variable to the query in the "integration template file" (src/templates/integrations.js)src/templates/integrations.js
Incorporated an additional query within the existing GraphQL query to get all the screenshots from the
src/collections/integrations/_images/<sluggified version of the integration's title>/
directory.src/sections/Meshery/Meshery-integrations/Individual-Integrations/index.js
If screenshots are available in the integration's directory inside the
src/collections/integrations/_images/
directory, use those screenshots; otherwise, use the default two screenshots ( ../_images/meshmap-visualizer.png and../_images/meshmap-designer.png).
_images
directory to their corresponding directories inside_images
.This PR fixes #5127
Notes for Reviewers
Signed commits