Initial checklist
Problem
Hi, I use VS Code to write markdown. And, I use an extension that adds section numbering to the headings like 1.1, 1.1.1 and so on.
For my website, I use Nuxt Content which uses remark-slug
plugin. So, the headings have their ID set as 1-1-something
. This causes an issue when I directly go the webpage with the hash, as the hash starts with number, and I think it's not allowed in CSS. So, the underlying Vue Router throws an error and the page doesn't load.
Solution
I can't stop using the VS Code extension which adds the automatic section numbering, because I work with huge markdown documents and I prefer to have heading numbering to quickly navigate inside VS Code's Outline sidebar. So, currently, I am unable to go the URL of the webpage using hash.
So, it would be great to simply add some -
or any other text or symbol before the IDs of the headings that start with number. This way, the IDs would not start with number (even if the Headings text start with number) and the Vue Router won't throw an error.
Alternatives
- An alternative would be to stop adding section numbers. but that's just not feasible for long markdown documents.
- Also, I can use CSS to add heading numberings, instead of having the heading numberings inside the markdown text. It would solve the issue, but, then again, it would make it very difficult to read such long markdown files offline (on local computer) if there is no heading numberings. So, again, it's not feasible.