We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a blog where I force the TOC to render since the [TOC] macro is not part of the article's content.
{{ ('<p>[TOC]</p>'~page.content)|toc }}
However, I'd like it if the TOC didn't render anything if the table was empty. Is there any way to make that possible?
Thanks!
The text was updated successfully, but these errors were encountered:
HI @tomzx , I guess that's something I have to update. Instead of L251 you may try this (untested).
$toc = $this->createToc($content); // Don't process TOC if there aren't any headings in the content if (empty($toc)) { return $content; }
Sorry, something went wrong.
@Sommerregen Thanks!
No branches or pull requests
I have a blog where I force the TOC to render since the [TOC] macro is not part of the article's content.
However, I'd like it if the TOC didn't render anything if the table was empty. Is there any way to make that possible?
Thanks!
The text was updated successfully, but these errors were encountered: