theme-next / hexo-theme-next

Elegant and powerful theme for Hexo.
https://theme-next.org
Other
8.17k stars 2.05k forks source link

A bug on toc generation #877

Closed ming71 closed 5 years ago

ming71 commented 5 years ago

I agree and want to create new issue


Expected behavior

I use the inserted toc function to generate toc , and a normal toc is expected.

Actual behavior

However , there is always a strange symbol in front of my generated head !!!!! BTW,I have closed the auomatic number choice . 微信截图_20190518153727

Steps to reproduce the behavior

  1. N/A
  2. N/A
  3. N/A

Node.js and NPM Information

Package dependencies Information

Hexo Information

Hexo version

Hexo Configuration

NexT Information

NexT Version:

NexT Scheme:

NexT Configuration:

Other Information

welcome[bot] commented 5 years ago

Thanks for opening this issue, maintainers will get back to you as soon as possible!

stevenjoezhang commented 5 years ago

@ming71 Can you provide more information? e.g. package.json

jiangtj commented 5 years ago

If you use marked, please execute the following command and provide the output to us.

hexo config marked

output like:

{ gfm: true,
  pedantic: false,
  sanitize: false,
  tables: true,
  breaks: false,
  smartLists: true,
  smartypants: true,
  modifyAnchors: '',
  autolink: true }
ming71 commented 5 years ago

soory , I've execute the command , only to output as follow Total precache size is about 7.51 MB for 160 resources.

ming71 commented 5 years ago

@ming71 Can you provide more information? e.g. package.json

This is my package contents:

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.8.0"
  },
  "dependencies": {
    "eslint": "^4.19.1",
    "gitalk": "^1.5.0",
    "hexo": "^3.8.0",
    "hexo-baidu-url-submit": "0.0.6",
    "hexo-blog-encrypt": "^2.1.1",
    "hexo-deployer-git": "^1.0.0",
    "hexo-filter-github-emojis": "^2.0.1",
    "hexo-filter-optimize": "^0.2.5",
    "hexo-generator-archive": "^0.1.5",
    "hexo-generator-calendar": "git://github.com/howiefh/hexo-generator-calendar.git",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-index-pin-top": "^0.2.2",
    "hexo-generator-searchdb": "^1.0.8",
    "hexo-generator-tag": "^0.2.0",
    "hexo-helper-live2d": "^3.1.1",
    "hexo-related-popular-posts": "^3.0.5",
    "hexo-renderer-ejs": "^0.3.1",
    "hexo-renderer-markdown-it": "^3.4.1",
    "hexo-renderer-stylus": "^0.3.3",
    "hexo-server": "^0.3.3",
    "hexo-service-worker": "^1.0.1",
    "hexo-symbols-count-time": "^0.6.0",
    "live2d-widget-model-hijiki": "^1.0.5",
    "lodash": "^4.17.11",
    "markdown-it-emoji": "^1.4.0"
  }
}
stevenjoezhang commented 5 years ago

Any URLs?

https://ming71.github.io/BlogStarting.html

stevenjoezhang commented 5 years ago

It's caused by header-anchor generated by hexo-renderer-markdown-it. See: https://github.com/hexojs/hexo-renderer-markdown-it/search?q=header-anchor&unscoped_q=header-anchor

stevenjoezhang commented 4 years ago

See also https://github.com/hexojs/hexo-renderer-markdown-it/issues/102

curbengh commented 4 years ago

is added by default in hexo-renderer-markdown-it <4

In v4, the symbol is no longer added by default.

markdown:
  anchors:
+   permalink: false
    permalinkClass: 'header-anchor'
    permalinkSymbol: '¶'

ref https://github.com/hexojs/hexo-renderer-markdown-it/issues/55#issuecomment-558662340