[Bug 265276] Books: FAQ: Single HTML: 404

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 26 Jan 2023 13:25:23 UTC

Ciarán Ainsworth <ciaranainsworth@posteo.net> changed:

           What    |Removed                     |Added
                 CC|                            |ciaranainsworth@posteo.net

--- Comment #3 from Ciarán Ainsworth <ciaranainsworth@posteo.net> ---
The reason this happens is that the theme generates a single HTML link that is
hardcoded to the `book.adoc` file in a given directory. This file includes all
chapters to present everything in a single page. However, for pages like the
FAQ and the dev-model, this is unnecessary. These are already single page

You have a few ways to handle this:

1. Create a `book.adoc` file that contains all the content from the index page
(don't do this).
2. Update the theme and add a frontmatter parameter which allows the editor to
hide the single page link when it's not necesssary.
3. Find some way to inform Hugo when there's no book file and have it simply
route the user back to the main page when they click the link.

Of these, 2 is by far the easiest to implement as we can just add a parameter
like `show_single_page: false` to the frontmatter of single page docs and the
theme won't show the link, thereby avoiding the confusion.

If this sounds like an agreeable solution, let me know and I'll put a patch in.

You are receiving this mail because:
You are the assignee for the bug.