raychenon / play-table-of-contents

Web app to generate table of contents of markdown file. Built with Play Framework for Scala .
http://tableofcontent.eu
MIT License
33 stars 9 forks source link

Optionally add [Back to top] links at the end of each section.. #2

Open vvasuki opened 7 years ago

vvasuki commented 7 years ago

Will help navigation..

raychenon commented 7 years ago

I get the idea. But the output will not only print the table of contents but the whole markdown content. There should be a copy paste button to make life easier.

This is what you want ? https://github.com/rasbt/markdown-toclify#advanced-options

vvasuki commented 7 years ago

But the output will not only print the table of contents but the whole markdown content.

The output could just replace the input in the input box.

https://github.com/rasbt/markdown-toclify#advanced-options

That's good!

BTW, Would you be interested in making this an intellij plugin?

raychenon commented 7 years ago

I use Intellij everyday, but never looked how to make an Intellij plugin.

The advantage of a website for all users is that we don't have to install anything.

raychenon commented 7 years ago

For this one, I looked at other TOC generators. To avoid the erasure of existing [Back to top] links, they wrap the links in comments

<!-- START -->
[Back to top]
<!-- END -->

But the HTML comment cannot be output as text. So the markdown output has to support comment and "copy-paste" https://github.com/raychenon/play-table-of-contents/issues/9 Once it is done, I can work on [Back to top] links .

vvasuki commented 6 years ago

Since addition of these [Back to top] links is optional, it's ok if it overwrites (the website can warn users that this can happen). A partially functioning [Back to top] addition feature is still very useful.