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
** English is not very good **
try change option config.js to be: markdown.extractHeaders:["h1", "h2", "h3"], on Post page, try to get this.$page.headers still return h2 and h3
config.js
markdown.extractHeaders:["h1", "h2", "h3"]
this.$page.headers
and I changed the file: node_modules/@vuepress/core/lib/node/Page.js line117:
node_modules/@vuepress/core/lib/node/Page.js
const headers = extractHeaders( this._strippedContent, ['h1','h2', 'h3'], // add 'h1' to here. markdown )
it worked.
so, I think markdown.extractHeaders option does not work.
markdown.extractHeaders
on post page, get this.$page.headers includes h1 level
h1
"vuepress": "^1.2.0"
in Chinese:
制作主题时候,想通过设置makdown.extractHeaders, 来 this.$page.headers 获取到所有的heading 标签,感觉是硬解码写成固定的了,配置的选项也不生效。
makdown.extractHeaders
The text was updated successfully, but these errors were encountered:
Hi @Otto-J
Thanks for the report, markdown.extractHeaders option is currently not available in the 1.2.0 release.
1.2.0
This feature is implement by #1945 ,which is after the release of 1.2.0, please patiently wait for the next release. Thanks.
This issue is also related to #1931 , the document is updated faster than the release.
Simplified Chinese Verison:
markdown.extractHeaders 在下一个版本中才会生效。
Sorry, something went wrong.
@ludanxer Thanks.
Thank you for this work as I tried to implement this in #1111 ... Is there any idea when the next release will happen which will include this work?
No branches or pull requests
Bug report
Steps to reproduce
** English is not very good **
try change option
config.js
to be:markdown.extractHeaders:["h1", "h2", "h3"]
, on Post page, try to getthis.$page.headers
still return h2 and h3and I changed the file:
node_modules/@vuepress/core/lib/node/Page.js
line117:it worked.
so, I think
markdown.extractHeaders
option does not work.What is expected?
on post page, get
this.$page.headers
includesh1
levelWhat is actually happening?
Other relevant information
in Chinese:
制作主题时候,想通过设置
makdown.extractHeaders
, 来this.$page.headers
获取到所有的heading 标签,感觉是硬解码写成固定的了,配置的选项也不生效。The text was updated successfully, but these errors were encountered: