mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-03-20 16:15:09 +00:00
docs: add migration findings
This commit is contained in:
parent
4753a3e2e3
commit
67d43d0a8a
4 changed files with 18 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.5.0+35d29a198f974e48f0f398fb813421077eb057a3
|
||||
7.5.0+4753a3e2e302597e65b9f9327e8bde5cd0a6dabe
|
Loading…
Add table
Reference in a new issue