Static Website
Add to your project
Section titled “Add to your project”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#v2Static Website reference
Section titled “Static Website reference”Readme
Section titled “Readme”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.
Operation
Section titled “Operation”Getting started
Section titled “Getting started”- In the Dashboard, click Create Project +
- Under Pick Components, choose Static
- Choose Create Repository, which will generate a new GitHub repo
- Click Launch Stack
Development
Section titled “Development”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.
Production
Section titled “Production”Builds a production-ready image containing your static files. Caddy serves them with gzip compression.
Configuration
Section titled “Configuration”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.