feat: support wide and full page modes (#69)

* feat: add page width config and partial

* feat: use page-width partial in layouts

* chore: revert changes in navbar and footer

* feat: customize footer width from site config

* chore: update styles

* docs: add page width

* feat: allow overriding navbar width

* fix: navbar width variable

* docs: add instruction for navbar and footer
This commit is contained in:
Xin
2023-09-20 23:36:00 +01:00
committed by GitHub
parent c799160e86
commit b51bfa3177
15 changed files with 87 additions and 13 deletions

View File

@ -180,3 +180,20 @@ Include both `favicon.ico` and `favicon.svg` files in your project to ensure you
While `favicon.ico` is generally for older browsers, `favicon.svg` is supported by modern ones. The optional `favicon-dark.svg` can be included for a tailored experience in dark mode.
Feel free to use tools like [favicon.io](https://favicon.io/) or [favycon](https://github.com/ruisaraiva19/favycon) to generate these icons.
### Page Width
The width of the page can be customized by the `params.page.width` parameter in the config file:
```yaml {filename="hugo.yaml"}
params:
page:
# full (100%), wide (90rem), normal (1280px)
width: wide
```
There are three available options: `full`, `wide`, and `normal`.
By default, the page width is set to `normal`.
Similarly, the width of the navbar and footer can be customized by the `params.navbar.width` and `params.footer.width` parameters.

View File

@ -30,7 +30,7 @@ languages:
module:
hugoVersion:
extended: true
min: "0.111.0"
min: "0.112.0"
workspace: hugo.work
imports:
@ -93,13 +93,19 @@ params:
logo:
path: images/logo.svg
dark: images/logo-dark.svg
# link: /
# width: 40
# height: 20
# link: /
width: wide
page:
# full (100%), wide (90rem), normal (1280px)
width: normal
footer:
displayCopyright: true
displayPoweredBy: true
width: normal
displayUpdatedDate: true
dateFormat: "January 2, 2006"