-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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 basic toc generation for pandoc #8911
base: master
Are you sure you want to change the base?
Conversation
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.
Fix: lstrim rstrim number, use --quiet
Unlike asciidocext, the only thing left is the <body>
tag, which comes from the extracted body node in the first f
of extractTOC
(by @pagdot).
With --quiet
, pandoc
only suppress warning messages, not error message. So there is no need not to use --quiet
.
Is this issue completed? Is there anything remaining to implement? Will it be merged? |
Sorry for the delay, I'm not a Pandoc user and this has not been on top of my priority list. The code looks good, but we need a test. Since this PR was started I created a new integration test harness that allows integration tests to run full site builds from the package they live in (e.g. the |
Eagerly waiting for this feature. @pagdot any updates? |
Pandoc template missing right now
Extract body from template first
Else pandoc complains about missing title
rebased on the current master and added a very basic integration test. I'd like to verify that toc extractions work in a test, but don't really know how |
This PR has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
@bep Does this look good to you or is still anything missing? |
As requested in #8152
I've pretty much copied the toc parser code from asciidocext and modified it where necessary.
For toc generation with pandoc to work, I have to generate a standalone document.
This lead to a few (solved) issues:
<body>
and ignoring everything else