{
encode gzip zstd
@static path_regexp \.(js|css|svg|png|webp|jxl|jpg|jpeg|woff2)$
header ?Cache-Control "max-age=600"
header @static Cache-Control "max-age=3600"
header -server
reverse_proxy localhost:8080
}
```
If Caddy runs as a docker container, you need to use the Wave container name instead of `localhost`.
Adapt the Cache-Control header to your needs, this config sets a fallback of 600 (10 minutes) and
3600 (60 minutes) for static assets like fonts, images, js and css. Wave will set a Cache-Control
header for certain files, only overwrite them if you know what you are doing.
### Nginx
TODO
## RSS
Wave by default supports retrieving your articles with rss, both the vanilla and the atom flavour.
The RSS endpoints are located at `/rss/rss.xml` and `/rss/atom.xml`. They also allow you to filter for
a category with a `category` query parameter like so: `/rss/atom.xml?category=cats`.
If for some reason you wish to disable these endpoints and RSS with it, set the configuration key
`Features.RSS` to false. Please don't disable it because you think it will make your site more secure
or less scrapable, it does not.
## Email Subscriptions
Wave can allow users to subscribe to E-Mail updates about new articles. In order to enable this feature
you first need to set the configuration key `Features.EmailSubscriptions` to true. You also need to configure
Emails in general, please follow the [Configure an Email Server](#configuring-email) Section for this.
Besides this you will need to provide a mail distributor for these bulk E-Mails. This may be the same
as you have already configured for live E-Mails, in this case just copy the configuration from there, but
especially at larger volumes it is advisable to separate these concerns, and many hosting providers
for large mail distribution will provide you with two sets of credentials for this.
If you have followed all the previous instructions, your E-Mail configuration may look like this:
```yml
Email:
SenderEmail: noreply@example.com
SenderName: Wave
ServiceEmail: contact@example.com # used in various places, including email newsletter ListId Header
Smtp:
Live:
Host: smtp.example.com
Port: 25
Username: user
Password: password
Ssl: true
Bulk:
Host: bulk.smtp.example.com
Port: 465
Username: bulk-user
Password: bulk-password
```
## Customizations
TODO implement more customizations, add description.
Currently supported:
```yml
Customization:
AppName: My cool blog
AppDescription: This is where I write about my cats
AppUrl: https://example.com
DefaultTheme: wave-dark
DefaultLanguage: "en-GB"
LogoLink: https://miawinter.de/img/logo.png
Footer: (c) 2024 [Mia Rose Winter](https://miawinter.de/)
```
## Featured Article Embeds
Wave allows access to the most recent article via the api endpoint `/api/article/featured`.
This returns a json object with data about it, but there is also a script `/featured.js` that
requests this automatically and inserts it into the page.
The simplest embed in your page looks like this:
```
Loading featured article...
```
`data-wave-pfp-size` may be omitted, the default is 150. Wave will inject a default styled
hero into the div with the data tag `data-wave`. If you want to provide your own template,
you can use an html template:
```
```
This is the defautl template by the way. Any property in the json response of `/api/article/featured` corresponds to
a `data-wave-*` attribute. With `author` and `reviewer` having their own nested tags as `data-wave-author-*` and
`data-wave-review-*` respectively.
So to get the name of the article author, one could do this:
```
```
Values will always be inserted with `innerText`, except if the target tag is a link, then `href` is used,
or an image tag, then `src` is used.
## Additional Notes
TODO ?
## License and Attribution
Wave by [Mia Winter](https://miawinter.de/) is licensed under the [MIT License](https://en.wikipedia.org/wiki/MIT_License).
Copyright (c) 2024 Mia Rose Winter