Skip to content

docs: internationalize image grid demo and fix lightbox navigation#506

Merged
Leaf-0w0 merged 2 commits into
LyraVoid:masterfrom
Dawn6666666:docs/image-grid-demo-english
Jul 15, 2026
Merged

docs: internationalize image grid demo and fix lightbox navigation#506
Leaf-0w0 merged 2 commits into
LyraVoid:masterfrom
Dawn6666666:docs/image-grid-demo-english

Conversation

@Dawn6666666

Copy link
Copy Markdown
Contributor

Type of change

  • Other: documentation internationalization, local demo assets, and a targeted interaction fix.

Checklist

  • I have checked to ensure that this Pull Request is not for personal changes.
  • I have performed a self-review of my own code.
  • My changes generate no new warnings.

Related Issue

Closes #505

Changes

  • Translate image-grid-demo.md into English while retaining its syntax-template and rendered-example structure.
  • Move the 32 demo images to public/images/demos/image-grid-demo/ with semantic filenames, replacing external image-hosting URLs.
  • Add data-no-swup to :::grid image links so Swup does not treat Fancybox image links as page navigations.
  • Remove feature-specific test files that are no longer needed.

How To Test

pnpm check

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 :::grid syntax, defaults, or rendering behavior.

Copilot AI review requested due to automatic review settings July 14, 2026 07:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md to 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-swup to :::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,
@Leaf-0w0 Leaf-0w0 merged commit 1cb9975 into LyraVoid:master Jul 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Other]: 图片画廊网格演示文章英文国际化与交互修复

3 participants