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

Can titleabbrev be made available to the navigation sidebar "pagetoc"? #469

Closed
ndw opened this issue Feb 3, 2024 · 0 comments · Fixed by #470
Closed

Can titleabbrev be made available to the navigation sidebar "pagetoc"? #469

ndw opened this issue Feb 3, 2024 · 0 comments · Fixed by #470

Comments

@ndw
Copy link
Contributor

ndw commented Feb 3, 2024

The challenge is that the pagetoc is plucked from the actual HTML headers on the rendered HTML page. It's not computed from the DocBook XML directly. That means we have to tunnel the titleabbrev content into the rendered page somehow.

Two possibilities occur to me:

  1. Use a db-titleabbrev attribute on the h1, h2, etc. That's bad because it's wrong to put human-readable content in attribute values. It's also tricky because the headers are generated from templates so you have to be careful about where and when the attribute node is created. Maybe extend the templating system?
  2. Use a <script type='text/html'> element. It's not an attribute, that's good. But what an awful hack.
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

Successfully merging a pull request may close this issue.

1 participant