Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
Format Sitemap Style Memaid JS

I am using the following Mermaid MD to create a sitemap.

<html>
  <head>
    <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js">
      </script>
    <script>mermaid.initialize({startOnLoad:true});</script>
  </head>
  <body>
    <h1>Example</h1>
    <div class="mermaid">
      flowchart TD
        A(Home)-->B(Col 1 - Level 1)
        A-->C(Col 2 - Level 1)
        C-->F(Col 2 - Level 2)
        A-->G(Col 3 - Level 1)
        G-->H(Col 3 - Level 2)
        H-->I(Col 3 - Level 3)
        A-->J(Col 4 - Level 1)
        J-->K(Col 4 - Level 2)
        A-->L(Col 5 - Level 1)
        B-->E(End)
        F-->E
        I-->E
        K-->E
   </div>
  </body>
</html>

Which renders like the image below. See the Codepen.

enter image description here

I would like it to respect the column order and align it more like an old school sitemap.

Does anybody know if this is possible?

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can accomplish this using the built-in subgraph functionality. The following appears to do what you want:

      flowchart TD
      subgraph one
        A(Home)-->B(Col 1 - Level 1)
        A-->C(Col 2 - Level 1)
        A-->G(Col 3 - Level 1)
        A-->J(Col 4 - Level 1)
        A-->L(Col 5 - Level 1)
      end
      subgraph two
        C-->F(Col 2 - Level 2)
        J-->K(Col 4 - Level 2)
        G-->H(Col 3 - Level 2)
      end
        H-->I(Col 3 - Level 3)
        B-->E(End)
        F-->E
        I-->E
        K-->E
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!