Skip to content

Static Website

Paste this entry into the components list in diploi.yaml to add Static Website to your project.

components:
- name: Static Website
identifier: static
package: https://github.com/diploi/component-static#v2

A component for hosting static websites on Diploi. Drop in your HTML, CSS, and JavaScript files and get a production-ready, gzip-compressed site served over HTTPS.

Uses the official Caddy Docker image.

  1. In the Dashboard, click Create Project +
  2. Under Pick Components, choose Static
  3. Choose Create Repository, which will generate a new GitHub repo
  4. Click Launch Stack

The component serves files directly from your repository root. Edit your HTML, CSS, and JavaScript files and the changes are reflected immediately after a refresh.

Builds a production-ready image containing your static files. Caddy serves them with gzip compression.

The component includes a Caddyfile that you can freely edit to configure Caddy. You can easily add redirects, custom headers, or URL rewriting rules, for example.