Heading Anchors
Jahia module that adds slug-based anchors to the headings of rendered pages, so that any section can be linked directly (for example /customer-center.html#jahia-lifecycle), whatever the template or the component used. It can optionally add a "copy link" button to each heading.
Watch the 3-minute overview video
Vidéo
Comment installer
Requirements: Jahia 8.2.1 or later, on JDK 11 or 17.
- Install the module from the Store, or download heading-anchors-1.0.0.jar from the GitHub release and deploy it in Administration > Modules.
- Enable it on each site that should get anchors, in Site settings > Modules. Sites where the module is not enabled are never changed.
- That's it: the headings of your pages (h1 to h5) now have readable anchors, so page.html#section-title opens the page right at that section.
Optional: to add a "copy link" button next to each heading, or to change the heading levels or the part of the page that is processed, open Administration > Tools > OSGi console > Configuration > Heading anchors, edit the values and save. Changes apply immediately, without restart, and are kept when the module is redeployed.
Full documentation: installation and configuration.
Watch the 3-minute overview video.
FAQ
Do I need to change my templates or my content?
No. The module works on the rendered page, whatever the template or the component used, including headings typed in rich text. Enable it on the site and the anchors are there.
How is an anchor built?
From the heading text: "Release notes 8.2" becomes release-notes-8-2. Accents are removed, Cyrillic, Greek or Arabic headings are transliterated, and scripts without transliteration (Chinese, Japanese, Hebrew...) keep their characters. Two headings with the same text get unique anchors (faq, faq_1). More about slugs
What happens if I rename a heading?
Its anchor changes too, so older links to that section will open the top of the page. When a link must never change, type a fixed id on the heading in the editor: the module keeps it as is.
My headings already have ids. Are they replaced?
No. Existing ids are kept and used by the copy-link button. Manual anchors added by editors are kept as well. Configuration options
My site has a sticky header. Will it hide the section?
No. The module measures the sticky or fixed header of each site in the browser, and the heading stops just below it. Nothing to configure. Sticky headers
Can I enable it on some sites only?
Yes. The module only processes the sites where it is enabled, in live and preview mode by default.
Will it break the layout or the styles of my site?
No. The page structure and layout are never changed, and the module styles only target the elements it adds. Disable the module on a site, and its pages render exactly as before. Isolation from the site styles
Is it accessible?
Yes. The copy-link button and its confirmation message meet WCAG 2.2 level AA: keyboard support, screen reader announcements, 24x24px target, tooltip dismissible with Escape, reduced motion and forced colors support. Accessibility
In which languages is the button available?
English, French and German, following the language of the page; other languages get English. The texts can be replaced in the configuration.
Can I change the look of the button?
Yes, with CSS custom properties in your theme (colors, font sizes, scroll margin). Theming
Where can I report an issue or ask a question?
On GitHub.
MIT License
Copyright (c) 2026 - present Jahia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.