Internal Links and/or ToC

User avatar
RonJeffries
Posts: 271
Joined: Sat Dec 08, 2012 6:19 pm
Platform: Mac

Wed Jun 13, 2018 5:52 pm Post

I'm still using MMD mode, seems to be working well. I have Convert RTF to markdown OFF because I'm typing my own ##s.

I'm trying compiling the whole little book as one .md file to become one .html file on GitHub Pages. If I find that acceptable, it'll save me some yak-shaving building a splitter. Maybe I'll do that later.

I'd like to put a little table of contents at the top of the document, with internal hyperlinks to the heading of the various "chapters".

Now it turns out that GitHub pages does set the id on every H2 H3 etc, so I happen to know that this would work:

Code: Select all

[Some Chapter Name](#some-chapter-name)


So one option is to generate a list of chapter names, regex the heck out of them in Sublime, and paste them in at publication time. That's not too awful.

Are there other options that would help generate these links more quickly and more automatically? Pointers to stuff to read are welcome.

Thanks!

User avatar
kewms
Posts: 3879
Joined: Fri Feb 02, 2007 5:22 pm
Platform: Mac

Wed Jun 13, 2018 7:29 pm Post

Edit -> Copy Special -> Copy Documents as ToC?

Katherine
Scrivener Support Team

User avatar
RonJeffries
Posts: 271
Joined: Sat Dec 08, 2012 6:19 pm
Platform: Mac

Wed Jun 13, 2018 7:59 pm Post

Sort of. That seems to copy maybe just the binder names if you paste into a dumb editor, which could be OK. If you put it into a document you get that right-justified page stuff.

I was hoping there was a decent way to generate a link or reference with the liking feature but I can't figure out what that does at all. Doesn't seem intended to carry into markdown ...

And what is "structured link list"? All I see in a text paste is the titles again ...