Shrink generated sites by about 28% #3
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/3/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Requested by Moof · project thread
On
NeTEx_publication.xsdthe site goes from 158 MB to 114 MB, and NetEx-docs builds six variants.src/(source pages)elements/types/Source pages. Pygments'
HtmlFormattergave every line an<a id name>anchor, a link and alinenosspan (~130 bytes per line), and it also wrapped whitespace in spans and escaped every"as". Now the XML tokens are rendered directly, with one<span id="L-n">per line. Line numbers come from a CSS counter, andsite.jsturns a click in the gutter into a#L-nlink. The line ids are unchanged, so every existing link still works, and the line numbers no longer get copied along with selected code.Source-path links. About 100k links repeated their full path in a
title.site.jsnow builds that tooltip from thehrefon hover. Without JavaScript, the full path is still in the link target.Also bumps the version to 0.7.1 so the publish step doesn't hit a duplicate again.
Tested: all 39 tests pass (with updated source-page assertions). I also checked a generated NeTEx source page in Chromium: line numbers render,
#L-120highlights its line, a gutter click sets the hash, and hovering a source link shows the full path.What's left after this is mostly structural: the sidebar shell repeated on every page (about 12 MB), and the six variants each shipping their own copy of the same source pages. Sharing those would need a layout change in NetEx-docs.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Bwekd9qi3u7oYcMtUGthAK