How to make custom headers / footers support sub url ? #4035
-
Hi there. I want to deploy dita output html5 into a sub url, E.g: I set Like this: <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="/Documents.html">Documents</a></li>
<li class="nav-item"><a class="nav-link" href="/Guides.html">Guides</a></li>
<li class="nav-item"><a class="nav-link" href="/Specs.html">Specs</a></li>
</ul>
</div> But these links will broken after I copy all How do I make the links works like dita generated TOC ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Looks like you're setting absolute paths in the navbar links, which resolve to something like If the contents of the <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="Documents.html">Documents</a></li>
<li class="nav-item"><a class="nav-link" href="Guides.html">Guides</a></li>
<li class="nav-item"><a class="nav-link" href="Specs.html">Specs</a></li>
</ul>
</div> If your generated files include multiple directory levels, you could add the <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="/docs/Documents.html">Documents</a></li>
<li class="nav-item"><a class="nav-link" href="/docs/Guides.html">Guides</a></li>
<li class="nav-item"><a class="nav-link" href="/docs/Specs.html">Specs</a></li>
</ul>
</div> |
Beta Was this translation helpful? Give feedback.
Looks like you're setting absolute paths in the navbar links, which resolve to something like
mydomain.com/Documents.html
.If the contents of the
/docs/
folder are all on one level, you should be able to use relative links without the leading slash, like this:If your generated files include multiple directory levels, you could add the
/docs/
…