also fix placement of anchors, it was discovered that an anchor
must be on the line before the title and nothing else on the line
or the doc magic would generate a different link.
Signed-off-by: John Thornton <bjt128@gmail.com>
Anchor many patterns. This helps not ignore more than intended. It is also a
minor performance optimization.
Add exceptions for files that are tracked but were ignored by the old patterns.
Now a full build with docs leaves a clean tree (phew!)
Before this commit, we ran asciidoc in its default mode, where it inlines
the stylesheets and javascript inside each document.
This commit changes asciidoc to link to external style sheets and
javascript instead, so we can get by with one copy of those things.
We copy all the asciidoc CSS and JS files into our directory of generated
html docs. asciidoc used to inline some (but not all) of those documents
in each html file.
Also move our custom stylesheet from doc/src to doc/html, where it will
be used.
The effects of this commit are:
Copy some of asciidoc's files into our html tree.
Slightly smaller docs: each document shrinks by about a dozen
kilobytes (the CSS and JS files are cached by the client after the
first fetch).
No bogus inlining. Inlining is discouraged by the w3c, and asciidoc
got it wrong:
http://www.w3.org/TR/xhtml1/#h-4.8http://www.w3.org/TR/xhtml-media-types/#C_4
The link to M62-M65 in the m-code document TOC was broken (the link in
the gcode overview document was good).
Also change the link text from "M62-65" to the format used throughout
the rest of the documentation: "M62...M65".
Having the [[anchor-name]] after the asciidoc Title element creates an
anchor inline macro that points just after the title text, which renders
incorrectly on some browsers. Clicking the link would take you to just
after the title text, which is disorienting. Plus, the HTML just looks
wonky, with an empty anchor element inside the h2 element body.
This commit replaces the anchor inline macros with proper asciidoc BlockId
elements preceeding the title text, which produces sane HTML: the title
element itself has an id attribute with the anchor text in it. This
displays correctly on all tested browsers, and just generally seems
reasonable.
Also replace "." (invalid) in anchors with "_" (valid).
For reference: http://www.methods.co.nz/asciidoc/userguide.html#X41
The G92, G92.1/G92.2, and G93 G-codes already had their own separate
anchors, this commit makes the gcode overview document link to the proper
one instead of all linking to the G92 anchor.
Replace the asciidoc anchor inline macros with proper BlockId elements.
Replace "." (invalid) in anchors with "_" (valid).
In the gcode overview document, all 6 of these M-codes used to be lumped
together and share a link, which pointed at M48/M49. This commit uses
the pre-existing separate anchors for M48/M49, M50, M51, M52, and M53,
which seems clearer.
Also changes the asciidoc anchor inline macros to valid BlockId elements,
which makes for clearer HTML output.
And fix a broken link in the M-code document TOC.
This commit creates separate anchors for G61/G61.1 and G64, instead of
having a single combined anchor for all three (pointing at G61/G61.1).
Also makes the G61/G61.1 and G64 anchors into proper BlockId elements.
This includes replacing the "." (invalid) in the anchor name with "-"
(valid).
This makes individual anchors for G43 and G43.1, instead of having a
single combined anchor for both, pointing to G43.
Also replaces the "." in the G43.1 anchor name with "_", since "." is
not a valid anchor character. There are no links to the G43.1 anchor,
so none need to be changed to the new anchor id.