Skip to content

docs: copy click-to-enlarge images, not just displayed ones#4106

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:docs/copy-linked-images
Open

docs: copy click-to-enlarge images, not just displayed ones#4106
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:docs/copy-linked-images

Conversation

@grandixximo
Copy link
Copy Markdown
Contributor

The HTML image-copy step (.html-images-stamp) scanned only src="..." attributes when deciding which images to copy into docs/html. Images referenced solely as a link target, image:thumb[link="images/full.png"], which asciidoctor renders as <a href="images/full.png"><img src="thumb"></a>, were never copied, so clicking the thumbnail to enlarge gave a 404. gui/gmoccapy (7 images) and gui/gstat (2) were affected.

The fix also scans href="...", filtered to image extensions so page and anchor links are left out.

Surfaced by the now-working link checker (#4104), which reports these as missing-file 404s.

Verified with a full English make htmldocs: build completes cleanly, all 9 images are now copied, and both pages report 0 missing-file 404s.

@hansu
Copy link
Copy Markdown
Member

hansu commented Jun 2, 2026

@grandixximo Did you notice the merge conflict?

@BsAtHome
Copy link
Copy Markdown
Contributor

BsAtHome commented Jun 2, 2026

This needs to be rebased after merging #4081 and then fixed.

@hansu
Copy link
Copy Markdown
Member

hansu commented Jun 2, 2026

#4081 is already merged (by you 😄 )

@BsAtHome
Copy link
Copy Markdown
Contributor

BsAtHome commented Jun 2, 2026

Yes, #4081 needed to be merged before other things according to @grandixximo. I had no more objections or comments to the docs build reorg, so it got merged.

This PR getting conflicts is fallout and not too bad considering the complexity of changes we are making to the docs structure.

The HTML image-copy step scanned only src="..." attributes, so images
referenced solely as a link target (image:thumb[link="images/full.png"],
rendered as <a href="...full.png">) were never copied and 404'd when the
reader clicked to enlarge.  gui/gmoccapy and gui/gstat had nine such
images.  Also scan href="...", filtered to image extensions so page and
anchor links are left out.
@grandixximo grandixximo force-pushed the docs/copy-linked-images branch from 1e8eae5 to 48bbfa0 Compare June 3, 2026 00:09
@grandixximo
Copy link
Copy Markdown
Contributor Author

grandixximo commented Jun 3, 2026

Yes, rebased, merges clean now, the other PRs I sent today live in a similar situation, they can kind of live in parallel, and merging should not be too bad, just some conflicts on the submake file I believe.

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.

3 participants