Hiya,
Is there a way to get Flare to automatically include permalinks for headings in HTML5 output?
For those unsure what I mean: if you view, for example, any readme in GitHub, hovering on headings shows a small link icon next to the heading, and if you click that, browser adds the anchor of the heading to the URL (and jumps to that anchor).
Poking around target settings did not yield any results, so looks like this is not implemented out-of-the-box in Flare? I guess the stumbling block is that Flare doesn't automatically generate anchors for headings?
Any hypothetical musings (or actual solutions!) on what kind of scripting hassle would be involved in getting this? I assume first you'd need a script that adds anchor to all headings? And then you'd probably need to work some CSS magic to get a nice hover-on style for headings to show the permalink only on hover-on?
Seems like an awfully handy feature and widely impemented, so I'm bit puzzled as to why we don't seem to have this in Flare. Am I missing something?
I'm currently using Flare 2018, if that matters.
Automatic permalinks for headings
-
- Jr. Propeller Head
- Posts: 4
- Joined: Tue Jan 30, 2018 4:48 am
Re: Automatic permalinks for headings
I haven't used this directly on Flare output but there's a plugin for rehype to autolink headings - this is the git repo: rehype-autolink-headings. The heading must have an id but you can create one automatically from the heading text by also running rehype-slug.
-
- Jr. Propeller Head
- Posts: 4
- Joined: Tue Jan 30, 2018 4:48 am
Re: Automatic permalinks for headings
Thanks, need to play around with that