-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Allow flag for natural table of content anchor texts #387
Comments
That seems pretty reasonable. I'm not that familiar with that part of the code, but it sounds not too difficult, and worthwhile (no one like ugly anchor text) |
This takes place in the Black Friday library. That leaves us two options.
|
We should fix it at the source. I'll post an issue on blackfriday. |
I do see a Could we possibly patch this for now? I haven't gotten any proper updates in the issue I posted on blackfriday. |
Any update on this? I really need this fix. |
Really the only Good way to do it is upstream. Anything else would be a brittle hack that would break the moment they actually implemented it properly. |
Good news Bad news. I filed a ticket there about it. russross/blackfriday#112 |
I have submitted PRs russross/blackfriday#124 and russross/blackfriday#125 to fix both of these issues with automatic header ID generation. If accepted as I’ve provided, Hugo will require a small additional change to enable the header ID generation extension. |
@halostatue what is the status of this? |
Those were both merged in 2014. Beyond that, I don’t know. In theory, it should work. |
Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't. If this is a bug and you can still reproduce this error on the latest If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm in the process of switching my blog over to Hugo from Jekyll and one of features that my current website has is my own, custom table of contents. But now since I'm using Hugo, I can simply use the
{{ .TableOfContents }}
markdown template function. It works great, but I feel that the generated "#toc_X" anchor tags are not good for SEO (especially for articles that had different tags from before).What would be really nice is to have the anchor URLs be generated as a lowercase, hyphenated version of the title text. Something like:
The text was updated successfully, but these errors were encountered: