VuePress 1.x: Use Permalink to Remove .html File Extension

May 21, 2019

By default, if you created a file at docs/, the page shall be accessible via /privacy.html.

To remove the .html extension, you can specify permalink in docs/ to access the page as /privacy/.

title: Privacy
permalink: /privacy

# Privacy

NOTE: As of v1.0.0-alpha.48, a trailing slash is required (e.g. /privacy/) to access the page, currently there is no reliable way to remove trailing slash (e.g. /privacy). Luckily, /privacy is redirected to /privacy/ (for development server, at least; haven’t try production yet).


As of v1.0.0-alpha.48, refering to permalink page in markdown via [Privacy](/ will generated link to /privacy.html, but /privacy.html will redirect to /privacy/.

[/privacy](/privacy) -> `/privacy`

[/privacy/](/privacy/) -> `/privacy/`

[/](/ -> `/privacy.html`

NOTE: Source code for fileToPath.ts.


This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.