Skip to content

Remove .html extension from url #78

Answered by webdiscus
microlabig asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @microlabig

if you want to navigate to a web page without the .html extension, then according to web standards, you should create a directory with the desired name and place the index.html file in this directory.

entry: {
    'de/index': '/home/user/src/pug/pages/index.pug?lang=de', // => dist/de/index.html (web path: de/)
    index: '/home/user/src/pug/pages/index.pug?lang=en', // => dist/index.html (web path: /)
    'de/pricing/index': '/home/user/src/pug/pages/pricing.pug?lang=de', // => dist/de/pricing/index.html (web path: de/pricing/)
    'pricing/index': '/home/user/src/pug/pages/pricing.pug?lang=en', // => dist/pricing/index.html (web path: pricing/)
  },

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by microlabig
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants