ITADN

dark mode assets (images) not automatically copied

#268Closedandythomas 创建于 2026-07-20
Difficulty: [2] IntermediateEffort: [2] MediumPriority: [3] HighType: ☹︎ Bug
A
andythomascommented
## Prework - [x] Read and agree to the [code of conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) and [contributing guidelines](https://github.com/posit-dev/great-docs/blob/main/.github/CONTRIBUTING.md). - [x] If there is [already a relevant issue](https://github.com/posit-dev/great-docs/issues), whether open or closed, comment on the existing thread instead of posting a new issue. ## Description The logic deciding which assets are copied into the `great-docs/_site/user-guide/` subfolders does not consider the dark mode siblings. ## Reproducible example The following example does not work for me: ``` ![Sweep generator with loaded system file](assets/orientation/sweep-generator.light.png){.lightbox} ```` Neither does the following more explicit form ``` ![Sweep generator with loaded system file](assets/orientation/sweep-generator.light.png){.lightbox dark="assets/orientation/sweep-generator.dark.png"} ```` Only the light mode image is available in the mentioned subdirectory and the dark mode sibling has a broken link. ## Expected result I would expect the dark mode image to be automatically copied as well. I got confused, why your own example works. So I added ``` {{< compare before="assets/orientation/sweep-generator.light.png" after="assets/orientation/sweep-generator.dark.png" label-before="Day" label-after="Night" >}} ``` which made both work, since the same image is copied via the compare logic. I would assume you can reproduce the issue for your own docs if you delete https://github.com/posit-dev/great-docs/blob/81ae5a742240cba990720acd6704f2f73e9aed02/user_guide/43-lightbox.qmd#L265 (I hope I did not miss another reference to the same image) ## Development environment - Operating System: Mac - Great Docs Version: 0.14.1, 0.15 ## Additional context Add any other context about the problem here.
关闭于 2026-07-20 2 条评论