mirror of
https://github.com/imfing/hextra.git
synced 2025-08-24 08:36:39 -04:00
feat(banner): add top banner (#777)
* feat: add top banner * chore: use inside the example site * chore: generate * fix: banner with the burger navbar * fix: compute the banner height to allow mutliple lines * chore: better p style
This commit is contained in:

committed by
GitHub

parent
990d24906b
commit
f297d24189
@@ -423,3 +423,22 @@ params:
|
||||
- "/img/config-image.jpg"
|
||||
audio: "config-talk.mp3"
|
||||
```
|
||||
|
||||
### Banner
|
||||
|
||||
To add a banner to your site, add the following to your `hugo.yaml`:
|
||||
|
||||
```yaml
|
||||
params:
|
||||
banner:
|
||||
key: 'announcement-xxx'
|
||||
message: |
|
||||
🎉 Welcome! [Hextra](https://github.com/hextra/hextra) is a static site generator that helps you build modern websites.
|
||||
```
|
||||
|
||||
The banner will be displayed on all pages.
|
||||
|
||||
The field `message` supports Markdown syntax.
|
||||
|
||||
If you want to use template syntax, you can define the partial in `layouts/_partials/custom/banner.html`.
|
||||
In this case, the field `message` will be ignored.
|
||||
|
Reference in New Issue
Block a user