Question:
Is there a way to remove the trailing .html on pages? I'm testing this both locally and on GitHub pages.
Ignoring the fact that this isn't fleshed out at all: https://johnhhorton.github.io/vividdev.com/posts/ us using README.me under the posts folder and resolves correctly. When navigating to an individual post like https://johnhhorton.github.io/vividdev.com/posts/PostWithCodeExample.html the .html extension is required.
While the focus of VuePress is for docs, I don't have any problem building in my own blog friendly features, but I would imagine that page URLs without .html would be preferable. I would imagine this is especially important for someone porting another non .html site to this one for SEO reasons.
Duplicate of #78.
The current workaround is to rename your post to index.md and place it inside a subfolder so you have posts/myarticle/index.md (note that you can use README.md instead of index.md). This will generate /myarticle/index.html which almost all static web servers will serve when the user hits /myarticle/.
One benefit to this workaround is you can store assets (such as images) under the same directory as the index.md to keep your posts self-contained.
@mdaffin Thanks, I'll use that for now.
@mdaffin The drawback is that it adds a trailing slash on all post URLs. This will for sure cause problems if you ever decide to change to another generator or CMS.
Most helpful comment
Duplicate of #78.
The current workaround is to rename your post to
index.mdand place it inside a subfolder so you haveposts/myarticle/index.md(note that you can useREADME.mdinstead ofindex.md). This will generate/myarticle/index.htmlwhich almost all static web servers will serve when the user hits/myarticle/.For an example see my blog
One benefit to this workaround is you can store assets (such as images) under the same directory as the
index.mdto keep your posts self-contained.