Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Table Of Contents support #64

Closed
SimonCropp opened this issue Jul 27, 2019 · 7 comments
Closed

Add Table Of Contents support #64

SimonCropp opened this issue Jul 27, 2019 · 7 comments
Milestone

Comments

@SimonCropp
Copy link
Owner

SimonCropp commented Jul 27, 2019

https://github.com/SimonCropp/MarkdownSnippets#table-of-contents

@SimonCropp SimonCropp added this to the 15.0.0 milestone Jul 27, 2019
@claremacrae
Copy link
Contributor

As a possible example:

In ApprovalTests.cpp we use this:
https://www.npmjs.com/package/doctoc

And we run it with this:
doctoc --title **Contents** *.md build/ doc/

@claremacrae
Copy link
Contributor

I haven't managed to get that *.md approach to work on windows, and so I run it in cygwin, and line endings get messed up - so having it built in to mdsnippets would be much appreciated...

I'd been wanting to ask if you could add a ToC to mdsnippets' home page too - so I guess this would help with that! :-)

@SimonCropp
Copy link
Owner Author

@claremacrae still in a beta release. but here is a first cut of the doco https://github.com/SimonCropp/MarkdownSnippets/blob/master/docs/table-of-contents.md#table-of-contents

@claremacrae
Copy link
Contributor

@SimonCropp Thanks! I notice that there's a start-tag for the generated TOC but not an end one...

I was thinking an end one would be useful, mainly for consistency.

@claremacrae
Copy link
Contributor

We've found it useful to go for deeper ToC than just level 2:

https://github.com/approvals/ApprovalTests.cpp/blob/master/doc/UsingGoogleTests.md#top

@SimonCropp
Copy link
Owner Author

I notice that there's a start-tag for the generated TOC but not an end one

fixed

@SimonCropp
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants