slide_link_html_sections_to_slides not working
Hi
I'm trying to migrate a project from hieroglyph 0.7.1 to hieroglyph 1.0.0 but the slide_link_html_sections_to_slides config option does not work anymore (no link in the output html pages). The slide_link_html_to_slides is enabled (as explained in the docs). Same problem with a new project created with hieroglyph-quickstart.
I confirm the problem. Creating a fresh project with the latest Sphinx and Hieroglyph, I could not get the links from HTML sections to slides to appear. Reverting to Sphinx<1.6 and Hieroglyph<1.0 solved the issue.
Still not working with Hieroglyph 2 and the latest version of Sphinx... :cry:
I hacked a workaround, by injecting the following JS code in all HTML pages:
window.addEventListener('load', () => {
let path = window.location.pathname.split('/');
if (/slides/.test(path)) {
return; // do not add links in slides
}
let filename = path[path.length-1];
for (a of document.querySelectorAll('a.headerlink')) {
let b = a.cloneNode();
b.innerText = '§';
let hash = (new URL(a.href)).hash;
b.href = 'slides/' + filename + hash;
a.parentElement.appendChild(b);
}
});
NB: that assumes that the slides are in a slides directory as a subdirectory of the "normal" rendering.