-
Notifications
You must be signed in to change notification settings - Fork 36
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
Error building multipage site with :http_prefix
#183
Comments
We need to take any custom prefix set in `config.http_prefix` in to consideration when generating multipage tables of content. Previously we were assuming that the root page was at `/`, which is not the case with the custom prefix set. Fixes alphagov/tech-docs-template#183.
Thanks for reporting this, @lhokktyn. Version 1.8.1 of the tech_docs_gem has been released with a fix. Let me know if you have any issues with that version. |
Thanks for the quick turnaround on this @timblair. I've given this a go and it looks like the table of contents isn't being generated as expected when I have the following files:
Within which I've code code like this
But the TOC generated only seems to contain links to the headings present in <ul>
<li>
<a href="/tech-guides/#technical-guides">Technical Guides</a>
<ul>
<li>
<a href="/tech-guides/#subheading1">Sub Heading 1</a>
</li>
<li>
<a href="/tech-guides/#subheading2">Sub heading 2</a>
</li>
</ul>
</li>
</ul> But I'd expect it to include the <ul>
<li>
<a href="/tech-guides/#technical-guides">Technical Guides</a>
<ul>
<li>
<a href="/tech-guides/#subheading1">Sub Heading 1</a>
</li>
<li>
<a href="/tech-guides/#subheading2">Sub heading 2</a>
</li>
</ul>
</li>
<li>
<a href="/tech-guides/page2.html#">Page2</a>
<ul>
<li>
<a href="/tech-guides/page2.html#subcontent">Sub Content</a>
</li>
</ul>
</li>
</ul> It's probably user error on my part, but does this trigger any indicators as to what might be wrong? |
I'm building a multipage site that will be delivered via Gitlab pages, which requires the site be delivered from a subdirectory, e.g.
https://my-docs.test/tech-docs/
After some reading around,
:http_prefix
seems to be the most appropriate option to enable this, but I've run into some problems when building the site with this flag enabled. It's probably user error, but have got stuck so far ...Set up
File layout:
Expected Outcome
In the nav on the left, I'd expect something along the lines of:
Actual Outcome
During build:
A similar error occurs - mentioned
search.json
rather thanfavicon.ico
- if search is enabled withenable_search: true
.The text was updated successfully, but these errors were encountered: