From 67d43d0a8a647b8b4b09cdb0103001e87e7b104c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Wed, 19 Mar 2025 22:52:36 +0100 Subject: [PATCH] docs: add migration findings --- .../content/configuration/branding/colors/_index.en.md | 10 ++++++++++ docs/content/introduction/releasenotes/7/2.en.md | 7 ++++++- docs/content/introduction/releasenotes/7/5.en.md | 2 +- layouts/partials/version.txt | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/content/configuration/branding/colors/_index.en.md b/docs/content/configuration/branding/colors/_index.en.md index 714f324175..ff24cf3520 100644 --- a/docs/content/configuration/branding/colors/_index.en.md +++ b/docs/content/configuration/branding/colors/_index.en.md @@ -171,6 +171,16 @@ In case you like a shipped variant but only want to tweak some aspects, you have In comparison to _copy and change_, this has the advantage that you profit from any adjustments to the `relearn-light` variant while keeping your modifications. +### Non-standard Modifications + +You may feel tempted to add further modifications besides just setting CSS variables in your custom variant stylesheet. + +While this is possible, please note that due to the way the theme uses the variant files, the following will not work + +- `@font-face` rules - they need to be moved to `assets/css/fonts.css`, `assets/css/custom.css` or `layouts/partials/custom-header.html` +- rules selecting the `html` element - replace `html` with `:root` + + ### React to Variant Switches in JavaScript Once a color variant is fully loaded, either initially or by switching the color variant manually with the variant selector, the custom event `themeVariantLoaded` on the `document` will be dispatched. You can add an event listener and react to changes. diff --git a/docs/content/introduction/releasenotes/7/2.en.md b/docs/content/introduction/releasenotes/7/2.en.md index 37c6f59e6c..03c53958d4 100644 --- a/docs/content/introduction/releasenotes/7/2.en.md +++ b/docs/content/introduction/releasenotes/7/2.en.md @@ -18,7 +18,12 @@ weight = -2 Fixing this resulted in major changes how stylesheets are bundled during built and ultimately leads to different stylesheets been loaded in the browser. If you haven't done any undocumented stuff with the stylesheets, this change should not have any negative effects to your site. - Anyways, please note that now the [variant generator](configuration/branding/generator) is not included in the theme release anymore but is only available in the docs. As a sideeffect, less JavaScript will be loaded on your site. + You need to make changes to your custom theme variant stylesheet if it contains + + - `@font-face` rules - they need to be moved to `assets/css/fonts.css`, `assets/css/custom.css` or `layouts/partials/custom-header.html` + - rules selecting the `html` element - replace `html` with `:root` + + Also, please note that now the [variant generator](configuration/branding/generator) is not included in the theme release anymore but is only available in the docs. As a side effect, less JavaScript will be loaded on your site. ### New diff --git a/docs/content/introduction/releasenotes/7/5.en.md b/docs/content/introduction/releasenotes/7/5.en.md index c25638a500..f90b052cf8 100644 --- a/docs/content/introduction/releasenotes/7/5.en.md +++ b/docs/content/introduction/releasenotes/7/5.en.md @@ -18,7 +18,7 @@ weight = -5 The directory structure will be adjusted so all 3rd-party dependencies are stored in their appropriate module sub directory. So what previously was `static/js/js-yaml.js` will become `assets/j/js-yaml/js-yaml.js`. - Take a look into the [new `assets` directory](https://github.com/McShelby/hugo-theme-relearn/tree/main/assets). If you have overridden some of these files, you will have to adjust their paths accordingly. + Take a look into the [new `assets` directory](https://github.com/McShelby/hugo-theme-relearn/tree/main/assets). **Only if you have overridden some of these files**, you will have to adjust their paths accordingly. All other additional files should stay where they are. - {{% badge style="note" title=" " %}}Change{{% /badge %}} Buttons for languages written right to left are now rendered correctly, so you will experience visual differences in those cases. This applies to diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index 4955806d1c..cadccaa06d 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -7.5.0+35d29a198f974e48f0f398fb813421077eb057a3 \ No newline at end of file +7.5.0+4753a3e2e302597e65b9f9327e8bde5cd0a6dabe \ No newline at end of file