docs: document how to include custom resources
This commit is contained in:
parent
9a2e2dcbc8
commit
0cfdc3ccd8
|
@ -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.
|
|
@ -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>
|
||||
-->
|
||||
|
|
Loading…
Reference in New Issue