git.github.io icon indicating copy to clipboard operation
git.github.io copied to clipboard

Show table of contents in each Rev News post

Open tfnico opened this issue 9 years ago • 8 comments

Since they are quite long..

tfnico avatar Apr 12 '15 22:04 tfnico

Will require a plugin it seems: https://github.com/dafi/jekyll-toc-generator

tfnico avatar May 15 '15 22:05 tfnico

You can always use a local script to generate a TOC from an existing Markdown file, e.g. using https://github.com/jonschlinkert/markdown-toc. Of course, this would be a manual step, but publishing Rev News is already a manual step, isn't it? BTW is it documented anywhere what the steps are? Or even better: is there a script already that performs the publication?

dscho avatar Nov 17 '17 11:11 dscho

@chriscool would have to comment on the publishing process. I suspect it's a manual move of the draft into the right place/name and commit & push, then a mail written to the Git list with some copy/pasted content. Then comes the mailchimp routine later (@mjaix takes care of that these days).

Long story short, adding a toc command in there should be possible, but yeah, we should document the process then.

tfnico avatar Nov 18 '17 00:11 tfnico

Yeah, it is a manual process and @tfnico just documented it at a high level. I could automate some trivial steps, but at least at the beginning it will still need significant manual work for example to make sure the draft is sent to all the people who are concerned.

chriscool avatar Nov 18 '17 05:11 chriscool

On Sat, 18 Nov 2017, Christian Couder wrote:

Yeah, it is a manual process and @tfnico just documented it at a high level.

That's good, that it is documented at last.

I could automate some trivial steps,

Please do.

but at least at the beginning it will still need significant manual work for example to make sure the draft is sent to all the people who are concerned.

Why should that be manual? Would it not make for a much more robust process if there was an explicit list "Mentioned people:" in the text, and a script to collected the respective emails, say, from Git's .mailmap (and possibly a new .mailmap in the git.github.io repository)?

In other words: why not make the process a lot more transparent (and thereby automatable).

dscho avatar Nov 19 '17 21:11 dscho

Oh hey, I just found some more process has been written here already:

https://git.github.io/rev_news/news_sources/

I'll patch up that page a bit.

tfnico avatar Nov 19 '17 22:11 tfnico

Fast forward to 2019, there's now https://github.com/allejo/jekyll-toc that would let you achieve this on GitHub Pages without a plug-in or JS. Is this still something this project would be interested in?

allejo avatar Oct 02 '19 05:10 allejo

Yeah, I think it would be interesting to have a table of contents. Thanks your suggestion!

chriscool avatar Oct 02 '19 08:10 chriscool