-
-
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
markup/asciidoc: Add support for .TableOfContents #7099
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.
@npiganeau I have no clue if I am authorized to approve anything or not.. Ill try the button, but that being said, I reviewed your PR and lgtm.
you need to fix the conflicting go.sum
file though
@rustysys-dev Thanks for your review. I've just fixed the conflicts in |
@bep I apologize if mentioning you on this PR discouraged (please let me know if it is) That being said, I wanted to bring the Hugo teams attention to this PR as it fixes a feature that is broken for asciidoc, and is important for my team and I. I checked the code, and the logic follows through, is formatted correctly, and has tests and documentation. If you have some time to approve/merge/comment, we would all appreciate it. |
This issue 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. |
Not stale. @rustysys-dev any way to move this fix along aside from @npiganeau rebasing? |
@forestsword As you said, aside from @npiganeau re-basing we cannot do anything with this unless someone who has merge permissions decides to take a look at this. Once the re-basing is complete then we can try to get the attention of someone in charge again. that being said, the fact that these specific files are conflicting means that someone may have fixed this elsewhere. |
It wasn't fixed. That file was just moved to the new |
If this looks good to the Asciidoc users in here, I'll happilly merge (once rebased). |
209121c
to
bfe6992
Compare
Rebase is done |
LGTM working as expected. |
I will try it out in the weekend. |
I was successfully able to run your changes. Do you have a sample repo with an adoc file and a theme that uses I found a small issue: Please correct your documentation and add empty lines between the headers. There is also a missing blank between |
Fill the .TableOfContents template variable when writing Asciidoc content. This is done by letting Asciidoc render its TOC as HTML, then extract this HTML rendered TOC, parse it into a tableofcontents.Root and finally remove it from the HTML content. This aims to stay in the logic that the Asciidoc parsing is entirely done by the external helper. See gohugoio#1687
bfe6992
to
28c8b8d
Compare
Documentation is corrected. See muenchhausen/hugo_asciidoc_ddd#2 for a sample with TOC extraction to |
@npiganeau your changes work fine, thanks a lot! @bep I propose to merge. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fill the .TableOfContents template variable when writing Asciidoc content.
This is done by letting Asciidoc render its TOC as HTML, then extract this
HTML rendered TOC, parse it into a tableofcontents.Root and finally remove
it from the HTML content.
This aims to stay in the logic that the Asciidoc parsing is entirely done
by the external helper.
See #1687