Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficult to Use Markdown on Hazmapper Page #131

Open
wesleyboar opened this issue Feb 19, 2025 · 0 comments
Open

Difficult to Use Markdown on Hazmapper Page #131

wesleyboar opened this issue Feb 19, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@wesleyboar
Copy link
Collaborator

wesleyboar commented Feb 19, 2025

Overview

Using Markdown on the Hazmapper doc (code, page) reveals obstacles.

Details

Obstacles

  1. 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 }
  2. 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

  1. Allow Would-Be Headings to be Headings

    (e.g. "Non-linked mapillary assets", "Linked mapillary assets")

    1. Remove a # on each heading to reduce heading depth of Hazmapper doc.
    2. Only on Visualization doc, increase heading depth of Hazmapper content.
  2. Link to Hazmapper Doc, Not "include" Them
    1. Change the include-markdown syntax in visualization.md to be (Markdown) links.
      • Link to Hazmapper sibling docs too (for consistent UX).
    2. Restore sidebar navigation for Visualization docs (that will be lost by step 1):
  3. 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.

@wesleyboar wesleyboar changed the title Hazmapper Page Uses Excessive HTML Difficult to Use Markdown on Hazmapper Page Feb 19, 2025
@wesleyboar wesleyboar added the bug Something isn't working label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant