Serve Clean URLs
Buzz can serve HTML pages without exposing .html or index.html in their URLs. Arrange the output files to match the paths you want visitors to use.
Prerequisites
Section titled “Prerequisites”Prepare a static build directory and follow Deploy Sites to publish it.
Choose A File Layout
Section titled “Choose A File Layout”To serve https://my-site.buzz.example.com/about, include either of these files:
dist/about.htmldist/about/index.htmlTo serve https://my-site.buzz.example.com/docs/, include:
dist/docs/index.htmlBuzz checks an extensionless path in this order:
- An exact file match.
- The path with
.htmlappended. index.htmlinside the path.
A path ending in / maps directly to index.html inside that directory.
An extensionless file shadows the corresponding HTML file. For example, dist/about is served before dist/about.html and uses application/octet-stream, so do not include both forms for an HTML route.
Add A Not Found Page
Section titled “Add A Not Found Page”Place 404.html at the root of the build directory to return custom content with HTTP status 404 when no file matches:
dist/404.htmlA site containing 200.html uses that file as a fallback before Buzz checks for 404.html. Use 200.html only when the site needs client-side routing. Read Deploy A Single-Page App for that behavior.