docs: internationalize image grid demo and fix lightbox navigation#506
Merged
Leaf-0w0 merged 2 commits intoJul 15, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR internationalizes the :::grid image gallery demo post, localizes its demo assets, and applies a small rehype component change to prevent Swup from intercepting Fancybox lightbox links.
Changes:
- Translate
src/content/posts/image-grid-demo.mdto English while keeping the template-then-rendered-example structure. - Move demo images to local assets under
public/images/demos/image-grid-demo/and update the demo to reference them. - Add
data-no-swupto:::grid-generated image links to avoid Swup navigation conflicts; remove now-deleted feature-specific tests.
Reviewed changes
Copilot reviewed 4 out of 36 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/remark-escape-numeric-colons.test.mjs | Removes unit tests for numeric-colon escaping behavior. |
| tests/image-grid.test.mjs | Removes unit tests for ImageGridComponent behavior (captions, grouping, defaults). |
| src/plugins/rehype-component-image-grid.mjs | Adds data-no-swup to grid image links to prevent Swup from treating them as navigations. |
| src/content/posts/image-grid-demo.md | Rewrites the image-grid demo post in English and updates image references to local assets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
99
to
103
| class: "image-grid__link no-styling", | ||
| href: src, | ||
| "data-fancybox": galleryId, | ||
| "data-no-swup": "true", | ||
| "data-caption": title, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type of change
Checklist
Related Issue
Closes #505
Changes
image-grid-demo.mdinto English while retaining its syntax-template and rendered-example structure.public/images/demos/image-grid-demo/with semantic filenames, replacing external image-hosting URLs.data-no-swupto:::gridimage links so Swup does not treat Fancybox image links as page navigations.How To Test
Also open the image-grid demo and click any gallery image. It should open in Fancybox without a Swup container-mismatch error.
Screenshots / Online Demo
https://mizuki-red-three.vercel.app/posts/image-grid-demo/
Additional Notes
The update does not change the
:::gridsyntax, defaults, or rendering behavior.