refactor(layout): keep content width fixed and document CSS var override (#934)

* fix(layout): split page and content width configuration

* refactor(layout): consolidate page width settings and update documentation

- Removed separate content width configuration from `hugo.yaml` and set a default value of `72rem` in CSS.
- Updated documentation in multiple languages to reflect the changes in page and content width settings, emphasizing the new fixed content width and customization options.
This commit is contained in:
Xin
2026-02-19 23:54:43 +00:00
committed by GitHub
parent 55659bb9c1
commit 8f6aa1db5b
6 changed files with 58 additions and 16 deletions

View File

@@ -1,7 +1,10 @@
{{- with .Params.width -}}
{{- $pageWidthValues := dict "normal" "80rem" "wide" "90rem" "full" "100%" -}}
{{- $pageWidth := . -}}
{{- $maxPageWidth := (index $pageWidthValues $pageWidth) | default (index $pageWidthValues "normal") -}}
<style>
:root {
--hextra-max-page-width: {{ cond (eq . "wide") "90rem" (cond (eq . "full") "100%" "80rem") }};
--hextra-max-page-width: {{ $maxPageWidth }};
}
</style>
{{- end -}}