Reputation: 487
Is there any way to configure DocPad generate pages without extension, so hosting as static site in url it will look like: http://mysite.com/page1/ ?
Upvotes: 3
Views: 680
Reputation: 48757
Yes, but in a different way.
The cleanurls plugin when generated for a static environment (so docpad generate --env static
) will output say pages/welcome.html
as pages/welcome/index.html
which accomplishes what you're after - which is you can access pages/welcome
in your browser no worries. Document URLs will also be updated to reflect this.
The issue of just outputting pages/welcome
without the extension is that then the server is not aware of the mime type of the file which the browser often needs to know how to process the file correctly.
Upvotes: 3