hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.23k stars 4.83k forks source link

Empty a.headerlink on all titles #3474

Closed Buzut closed 5 years ago

Buzut commented 5 years ago

Environment Info

Node v10.11.0

Hexo and Plugin version: ├── hexo@3.8.0 ├── hexo-generator-archive@0.1.5 ├── hexo-generator-feed@1.2.2 ├── hexo-generator-index@0.2.1 ├── hexo-generator-json-content@4.1.0 ├── hexo-generator-sitemap@1.2.0 ├── hexo-generator-tag@0.2.0 ├── hexo-renderer-ejs@0.3.1 ├── hexo-renderer-marked@0.3.2 ├── hexo-server@0.3.3 ├── hexo-yam@1.0.4 ├── imagemin-cli@4.0.0 └── imagemin-webp@5.0.0

BUG

As said in the title, content generation places en empty link in all <hn> tags. It's completely useless. Could there be an option to disable or customize it?

For instance, it could be usefull to provide an anchor so that this link is actually clickable.

Capture-d-e-cran-2019-03-01-a-10-57-09

yoshinorin commented 5 years ago

This empty link is generated by theme. For example, your screenshot theme is navy. Maybe it's generated by here.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Buzut commented 5 years ago

Hi! Sorry for the late answer. The thing is, I have a custom theme developped from scratch and still get these empty links. Exemple: https://buzut.net/

I can assure you, nothing in my theme generates this.

Sicaa commented 4 years ago

Hi! Sorry to bring this up, just landed here because I had the same problem. This is not generated by the theme used. I've found out that it is generated by the hexo-renderer-marked plugin. This behavior can be disabled by setting the headerIds option to false in _config.yml. Just like that:

marked:
  headerIds: false

Hope this helps!

Buzut commented 4 years ago

Thank you for pointing this out. Might be useful for anyone facing the same issue. Indeed it now works, but it wasn't the case with previous versions.

Thankfully, it's now all good 💯