Closed cexbrayat closed 7 years ago
We are waiting on https://github.com/bespokejs/bespoke-hash/pull/4 to be merged upstream.
Then you can just write:
[#intro]
== Intro
And it will work.
Of course, I'm now maintainer on Bespoke, so I guess I can approve that PR now. Would you like to test it?
@cexbrayat Do you think we should just fix this in bespoke-hash instead? I don't really love the idea of adding a hash attribute to the section. But I can be swayed.
Well, even better than what I was trying to come with :)
Sure, ping me when it's testable, I'll gladly give it a go. I'll close my related and now unneeded PR, thx Dan!
Can you test the open PR? https://github.com/bespokejs/bespoke-hash/pull/4
I just did, and it works great 👍
\o/
Do you see any reason why we wouldn't want to base the association on the ID? (I can't really think of any).
TBH that was what I tried first without looking at the docs, so I think it would be the way to go :)
@mojavelinux I added a PR to document that (if it ever gets merged upstream :) )
TBH that was what I tried first without looking at the docs, so I think it would be the way to go :)
That's exactly what we like to hear before merging a feature. :+1:
I just tested bespoke-hash@1.1.0
and it works like a charm. I'm really happy to be able to navigate my 700 slides without remembering the id of the slides ^^.
Thanks @mojavelinux and @hsablonniere for your (as always) quick and very nice help!
Our pleasure! We love saving good people valuable time. 🍺
Sorry if this is obvious, but I can't figure out how to use name route hashes provided by https://github.com/bespokejs/bespoke-hash with
asciidoctor-bespoke
...If I understand https://github.com/asciidoctor/asciidoctor-bespoke/blob/master/templates/slim/section.html.slim this might not yet be supported (it doesn't look like
data-bespoke-hash
can be added to the section.Something like:
allowing to go to
/#intro
would be great.If you agree (and if it isn't yet supported), I can provide a naive PR to implement it.