diff --git a/README.md b/README.md index ba8c9ea..45cc53d 100644 --- a/README.md +++ b/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 + +``` + ## License [MIT License](https://github.com/st1020/kita/blob/main/LICENSE) diff --git a/templates/index.html b/templates/index.html index a557258..a84afab 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,6 +5,9 @@
{% include "partials/header.html" %} + + {% include "injects/body_start.html" ignore missing %} +