Skip to content
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

Single page flavor #47

Open
rquinio opened this issue Feb 9, 2021 · 1 comment
Open

Single page flavor #47

rquinio opened this issue Feb 9, 2021 · 1 comment

Comments

@rquinio
Copy link

rquinio commented Feb 9, 2021

It would be nice if there was a "single page" flavor of each project documentation (i.e https://smallrye.io/docs/smallrye-config/single.html, https://smallrye.io/docs/smallrye-metrics/3.0.0/single.html, ...) to:

  • search for something when not knowing which section it relates to (it's possible to use an external search engine, but not very convenient) - happened to me today !
  • navigate between sections easily, without opening multiple browsers tabs

Implementation ideas

It could potentially be achieved with single.adoc pages, equivalent to the existing root nav.adoc pages, but where xref:section.adoc are replaced by include::section.adoc[leveloffset=+1] and inclusion of index.adoc
The trick is that such page needs to be navigated via the contents panel that uses anchors (on the right), which would have to replace the multi-page nav (on the left) when on that specific single.html page... I don't know if that's possible via Antora templates.

@jmartisk
Copy link
Member

Hmmm. One idea coming to my mind is to

  • have a single.adoc file as you describe it
  • add an ID along with each include directive in single.adoc
  • and then have a separate navigation file (nav-single.adoc) which contains xrefs to the the IDs inside single.adoc

But then we would need to somehow make sure that the nav-single.adoc navigation file is used instead of the regular nav.adoc only when the single.adoc page is open. But I don't think Antora supports different navigation per page. Maybe we would need to hack into our UI definition and add some javascript magic to do that for us...

Also we would have two new files (nav-single.adoc and single.adoc) to manually update every time we add a page, which is not very convenient

It all seems doable, but not quite straightforward...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants