From 1829f84a28b42545bdd6d3a662c480f35b1aba3a Mon Sep 17 00:00:00 2001 From: Francesco Date: Thu, 3 Apr 2025 01:47:43 +0200 Subject: Update wiki --- wiki/features/advanced-customization.md | 48 +++++++++++++++++++++++++++++++++ wiki/features/custom-css.md | 27 ------------------- wiki/features/hooks.md | 29 -------------------- 3 files changed, 48 insertions(+), 56 deletions(-) create mode 100644 wiki/features/advanced-customization.md delete mode 100644 wiki/features/custom-css.md delete mode 100644 wiki/features/hooks.md (limited to 'wiki') diff --git a/wiki/features/advanced-customization.md b/wiki/features/advanced-customization.md new file mode 100644 index 0000000..7dc8f7c --- /dev/null +++ b/wiki/features/advanced-customization.md @@ -0,0 +1,48 @@ +--- +title: "Advanced Customization" +date: "2024-10-07" +summary: "Advanced customization options" +description: "Advanced customization options" +toc: false +readTime: false +autonumber: true +math: false +showTags: false +hideBackToTop: true +--- + +## Custom CSS + +The theme supports custom css, you can override anything you want by redefining classes in the `assets/css/custom.css` file. + +For instance, changing the main width can be done as follows: + +```css +:root { + --main-width: 1024px; /* overrides default of 780px */ +} +``` + +Note that backward incompatible changes in the CSS will likely not happen, but there might be cases in the future where +backward compatibility is not possible. If you are overriding a huge amount of CSS I suggest you forking the project instead of +defining it here. + +## Hooks + +Hooks allow to customize layouts by injecting custom code at specific points in the layout. +Hooks are defined in the `layouts/partials/hooks` directory. +The following hooks are currently available: + +- `head_start` is inserted at the beginning of the `` tag. +- `head_end` is inserted at the end of the `` tag. +- `body_end` is inserted at the end of the `` tag. +- `footer_start` is inserted at the beginning of the footer. + +To create a hook, add a file named `.html` in the `layouts/partials/hooks` directory. The file should contain the code you want to inject at that point in the layout. +For example, to preload a font, you can create a file named `head_start.html` in the `layouts/partials/hooks` directory with the following content: + +```html + +``` + +The full context is passed to the hook, so any variables available in the page context can be used in the hook. \ No newline at end of file diff --git a/wiki/features/custom-css.md b/wiki/features/custom-css.md deleted file mode 100644 index 9417918..0000000 --- a/wiki/features/custom-css.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Custom CSS" -date: "2024-10-07" -summary: "Custom CSS parameters" -description: "Custom CSS parameters" -toc: false -readTime: false -autonumber: true -math: false -showTags: false -hideBackToTop: true ---- - -The theme supports custom css, you can override anything you want by redefining classes in the `assets/css/custom.css` file. - -For instance, changing the main width can be done as follows: - -```css -:root { - --main-width: 1024px; /* overrides default of 780px */ -} -``` - -Note that backward incompatible changes in the CSS will likely not happen, but there might be cases in the future where -backward compatibility is not possible. If you are overriding a huge amount of CSS I suggest you forking the project instead of -defining it here. - diff --git a/wiki/features/hooks.md b/wiki/features/hooks.md deleted file mode 100644 index 97d0cba..0000000 --- a/wiki/features/hooks.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "Hooks" -date: "2024-10-06" -summary: "Layout hooks" -description: "Layout hooks" -toc: false -readTime: false -autonumber: true -math: false -showTags: false ---- - -Hooks allow to customize layouts by injecting custom code at specific points in the layout. -Hooks are defined in the `layouts/partials/hooks` directory. -The following hooks are currently available: - -- `head_start` is inserted at the beginning of the `` tag. -- `head_end` is inserted at the end of the `` tag. -- `body_end` is inserted at the end of the `` tag. -- `footer_start` is inserted at the beginning of the footer. - -To create a hook, add a file named `.html` in the `layouts/partials/hooks` directory. The file should contain the code you want to inject at that point in the layout. -For example, to preload a font, you can create a file named `head_start.html` in the `layouts/partials/hooks` directory with the following content: - -```html - -``` - -The full context is passed to the hook, so any variables available in the page context can be used in the hook. \ No newline at end of file -- cgit v1.2.3