DesignSafe-CI / DesignSafe-CI/DS-User-Guide

Difficult to Use Markdown on Hazmapper Page

Open
#131 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Tcl
Stars
1
Forks
27
PR merge metrics
No merged PRs in 30d

Description

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):
      • Update MkDocs to explicitly list all docs to show under Visualization (as was done for Use Cases in PR #63).
  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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with user-guide/docs/tools/visualization/hazmapper.md and user-guide/docs/tools/visualization.md, then inspect the MkDocs configuration and the include-markdown plugin options referenced in the issue. Build the documentation and check the Visualization page, heading structure, internal anchors, links, and sidebar navigation. Done means the selected proposal works without broken links or unintended navigation changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.