Skip to content

[Shock][CLI] - docs template produced broken links #201

@emmanuelrosa

Description

@emmanuelrosa

I generated a brand new static site using the docs template, and the following links were broken:

  • Get Started
  • Guide 1
  • Guide 2
  • Guide 3
  • Concept 1
  • Concept 2

I fixed it by making two edits to navMain.jinja

For the top-level menu item I added a trailing "/" to the href:

<!-- Top-level menu item -->
<li><a href="{{  item.url  }}/">{{  item.title  }}</a></li>

For the group of menu items, I removed the leading "/" in the href.

    <!-- Group of menu items -->
    <div class="link-group">
      <span class="title">{{  item.title  }}</span>
      <ol>
        {% for page in pages.byTag(item.tag, sortBy=item.sortBy) %}
        <li><a href="{{  page.data.url  }}">{{  page.data.title  }}</a></li>
        {% endfor %}
      </ol>
    </div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions