docs: document how to include custom resources

This commit is contained in:
Robert Kaussow 2025-03-23 20:55:37 +01:00
parent 9a2e2dcbc8
commit 0cfdc3ccd8
No known key found for this signature in database
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,16 @@
---
title: Customization
---
{{< toc >}}
## Custom resources
To add custom resources to your site e.g. CSS or JavaScript files, create the `layouts/partials/head/custom.html` in the root dir of your project. Add the source files you want to include in the `static/` folder of your project, for example `static/css/custom.css` and `static/js/custom.js`. To include the files in your site, add the following code to `layouts/partials/head/custom.html`:
```html
<link rel="stylesheet" type="text/css" href="/css/custom.css" />
<script type="text/javascript" src="/js/custom.js"></script>
```
Ensure to use the absolute path to the files.

View File

@ -1 +1,9 @@
<!-- You can add custom elements to the page header here. -->
<!--
You can add custom elements to the page header here.
Example:
Ensure to use the absolute path to custom files and place the source files in the `static` folder.
<link rel="stylesheet" type="text/css" href="/custom.css">
<script type="text/javascript" src="/custom.js"></script>
-->