-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Generate Table of Contents for each chapter #232
Conversation
…nd adding README section explaining how to generate chapters.
Getting this error when running locally:
|
I've spotted the error, going to need to rework something. |
I got some error on generating chapters locally
|
@mikegeyser i saw you're generated the toc on the client side with JS. I've done this with mistune so the chapter templates will have toc in generated templates. Also, trying to make sure the CSS styles will shared with methodology pages. This is how Javascript chapter looks like in chapter-page branch Sorry i reused your avatar @rviscomi for Addy :D, need to see how the page looks like. I can finish this chapter page by today so we can see how the chapter pages can be generated config file and markdown contents. So no need for extra json or other files. WDYT @rviscomi |
@tyohan The table of contents is being statically generated, not on the client side. I agree regarding the CSS, I deliberately haven't added styling to this because of the other work that you were doing. :) |
Sorry we have two very similar PRs doing similar things so there's some confusion. Let's try to divide the work up: @tyohan focus on styling the Chapter page. For now you can create a static "lorem ipsum" table of contents for styling. @mikegeyser continue working on the showdown migration and TOC generation. Does that work for everyone? |
@rviscomi @mikegeyser looks good for me. Will continue to work on on styling |
@mikegeyser are these changes working and ready for review? |
@rviscomi I believe it's working, will rebase off of master and test again. The only outstanding change is to move the html generation into a template, which I will also do now. |
Sorry for the churn, I believe that this is ready to go now. I have some more that I want to add (formatting and linting, to pick up errors more easily) but I'll do it in a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've test this one with my current styling from #251 but need to tune a bit and work perfectly. Good one!
@mikegeyser I've merged #251 which created a merge conflict in |
@rviscomi @tyohan I've merged master into this PR and resolved the conflict. It looks right to me, but could you take a look and see if it's right?
Sorry, I just read this update from @tyohan. Please belay the last, it's been a long day... :P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
This generates a table of contents from the output of the html generation, with links to individual sections. It is currently completely unstyled, so that we can use the work already done as a part of #199.
The code below is based on #222, so at present it looks a lot larger than it is, and that PR needs to be merged first. (I've kept them separate, so that they're easier to review - I hope that's ok.)
Please let me know what you think, and I'll make whatever changes are necessary.