Closed rmoff closed 4 weeks ago
Investigating your site, I don't see the /_/js/site.js
load. Did you replace that with the tabs.js
line? Without the main javascript, none of the default UI's features are active.
I discovered that by inspecting the expander button in the nav entries, and they didn't have any attached events, so they can't do anything.
Excellent, thank you @eskwayrd
I'd added a custom footer-scripts.hbs
which overrode the default one.
So I added back in the content, and now my footer-scripts.hbs
looks like this:
<script id="site-script" src="{{{uiRootPath}}}/js/site.js" data-ui-root-path="{{{uiRootPath}}}"></script>
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>
{{#if env.SITE_SEARCH_PROVIDER}}
{{> search-scripts}}
{{/if}}
<script async src="{{{uiRootPath}}}/js/vendor/tabs.js" data-sync-storage-key="preferred-tab"></script>
and everything works 🎉
and everything works
:tada:
I added an admonition to the document to make the instructions more clear.
We're using Antora to successfully build our docs site, and it works great.
I've tested adding asciidoctor-tabs to it but found that whilst the tabs bit works great, it breaks the existing side navigation.
This can be seen in the preview build here: https://platform-pr-95.d25qnlv4t7f9px.amplifyapp.com/welcome.html
For reference, the following is how the nav usually behaves:
https://github.com/user-attachments/assets/a1ae3da0-554b-484c-aac1-04c1f23bac47
We're using:
Playbook:
(the content repo is private, sorry).
The root folder looks like this:
I've added symlinks for the
css
andjs
files back to the node folder:To
supplemental-ui/partials/footer-scripts.hbs
I've added:and to
supplemental-ui/partials/head-styles.hbs
:This all works for the tabs; they work lovely—just not the nav as a result.
https://github.com/user-attachments/assets/9128a6ec-ab7d-4b00-af4e-7fac46af405f