mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 12:11:35 +01:00
feat: add inject support
Co-authored-by: st1020 <me@st1020.com>
This commit is contained in:
parent
fe3b3a6e14
commit
a6cf030459
7 changed files with 48 additions and 10 deletions
15
README.md
15
README.md
|
|
@ -12,6 +12,7 @@ This theme is based on Hugo theme [hugo-paper](https://github.com/nanxiaobei/hug
|
|||
|
||||
- Easy to use and modify
|
||||
- No preset limits (This theme does not limit your content directory structure, taxonomy names, etc. It's applicable to all zola sites.)
|
||||
- Inject support
|
||||
- Dark mode
|
||||
- Responsive design
|
||||
- Social icons
|
||||
|
|
@ -49,6 +50,20 @@ theme = "kita"
|
|||
|
||||
See the `extra` section in [config.toml](https://github.com/st1020/kita/blob/main/config.toml) as a example.
|
||||
|
||||
## Inject support
|
||||
|
||||
You can easily use inject to add new features to your side without modifying the theme itself.
|
||||
|
||||
To use inject, you need to add some HTML files to the `templates/injects` directory.
|
||||
|
||||
The available inject points are: `head`, `header_nav`, `body_start`, `body_end`, `page_start`, `page_end`, `footer`, `page_info`.
|
||||
|
||||
For example, to load a custom script, you can add a `templates/injects/head.html` file:
|
||||
|
||||
```html
|
||||
<script src="js-file-path-or-cdn-url.js"></script>
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](https://github.com/st1020/kita/blob/main/LICENSE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue