Overview
Using Markdown on the Hazmapper doc (code, page) reveals obstacles.
Details
Obstacles
-
Internal anchor links should go to id-tagged elements.
Not blank anchors like <a id="whatever"></a>, but instead use:
- images:
{\#whatever ... }
- headings:
#### Whatever { #whatever }
- problem: Some anchors are for text that should be a heading but can not be (e.g. "Non-linked mapillary assets", "Linked mapillary assets"). reason: The heading depth limit is reached (i.e. no
####### / <h7>). solution: Raise all the files heading levels up one. problem: Headings are at the correct level for being included onto /…/tools/visualization/ page. reason: The /…/tools/visualization/ page heading starts at #, so child pages start at ##. solutions: Proposal 1 or Proposal 2.
- new links within text:
[whatever](#whatever){ #whatever }
-
HTML should be markdown.
- problem: Anchor links via markdown fail on
/…/tools/visualization/ (but succeed on /…/tools/visualization/hazmapper/). reason: The include-markdown plugin outputs visualization#whatever instead of #whatever. solution: Do not use include-markdown. problem: The include plugin would cause other issues. reason: All MkDocs includes solutions have some drawback. solutions: Proposal 2 or Proposal 3.
Proposals
-
Allow Would-Be Headings to be Headings
(e.g. "Non-linked mapillary assets", "Linked mapillary assets")
- Remove a
# on each heading to reduce heading depth of Hazmapper doc.
- Only on Visualization doc, increase heading depth of Hazmapper content.
-
Link to Hazmapper Doc, Not "include" Them
- Change the
include-markdown syntax in visualization.md to be (Markdown) links.
- Link to Hazmapper sibling docs too (for consistent UX).
- Restore sidebar navigation for Visualization docs (that will be lost by step 1):
-
Use Plugin Option to Fix Anchors That Break on Include
Use the rewrite-relative-urls option when including Hazmapper doc.
Background
Noticed during WG-397.
Overview
Using Markdown on the Hazmapper doc (code, page) reveals obstacles.
Details
Obstacles
Internal anchor links should go to id-tagged elements.
Not blank anchors like
<a id="whatever"></a>, but instead use:{\#whatever ... }#### Whatever { #whatever }#######/<h7>). solution: Raise all the files heading levels up one. problem: Headings are at the correct level for being included onto/…/tools/visualization/page. reason: The/…/tools/visualization/page heading starts at#, so child pages start at##. solutions: Proposal 1 or Proposal 2.[whatever](#whatever){ #whatever }HTML should be markdown.
/…/tools/visualization/(but succeed on/…/tools/visualization/hazmapper/). reason: Theinclude-markdownplugin outputsvisualization#whateverinstead of#whatever. solution: Do not useinclude-markdown. problem: Theincludeplugin would cause other issues. reason: All MkDocs includes solutions have some drawback. solutions: Proposal 2 or Proposal 3.Proposals
Allow Would-Be Headings to be Headings
(e.g. "Non-linked mapillary assets", "Linked mapillary assets")
#on each heading to reduce heading depth of Hazmapper doc.heading-offestoption when including Hazmapper doc.Link to Hazmapper Doc, Not "include" Them
include-markdownsyntax invisualization.mdto be (Markdown) links.Use Plugin Option to Fix Anchors That Break on Include
Use the
rewrite-relative-urlsoption when including Hazmapper doc.Background
Noticed during WG-397.