We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, Not sure if I got it wrong, but looks like:
Mainroad/layouts/_default/baseof.html
Line 30 in 20d7f24
PaperMod, for example uses this approach:
https://github.com/adityatelange/hugo-PaperMod/blob/master/layouts/partials/head.html#L40
The text was updated successfully, but these errors were encountered:
Something like this will enable the support (and probably easier than just adding a params.customCSS)
diff --git a/themes/mainroad/layouts/_default/baseof.html b/themes/mainroad/layouts/_default/baseof.html index f4d4b6d..965c8f9 100644 --- a/themes/mainroad/layouts/_default/baseof.html +++ b/themes/mainroad/layouts/_default/baseof.html @@ -25,11 +25,22 @@ <link rel="stylesheet" {{ printf `href="%s"` $googleFontsLink | safeHTMLAttr }}> {{- end }} - {{ $style := resources.Get "css/style.css" | resources.ExecuteAsTemplate "css/style.css" . -}} - <link rel="stylesheet" href="{{ $style.RelPermalink }}"> - {{ range .Site.Params.customCSS -}} - <link rel="stylesheet" href="{{ . | relURL }}"> - {{- end }} +{{- /* Styles */}} +{{- $theme_vars := (resources.Get "css/style.css") }} +{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} + + +{{- /* order is important */}} +{{- $stylesheet := (slice $theme_vars $common) | resources.Concat "assets/css/core.css" | minify}} + +{{- if not .Site.Params.assets.disableFingerprinting }} +{{- $stylesheet := $stylesheet | fingerprint }} +<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style"> +{{- else }} +<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style"> +{{- end }} +
Sorry, something went wrong.
No, thanks. I have no plans to change how it works, especially this way. Diff looks like copy-paste, it won't even work correctly, but I get it.
Duplicate #162 (sort of). You can suggest your ideas there.
No branches or pull requests
Hi,
Not sure if I got it wrong, but looks like:
Mainroad/layouts/_default/baseof.html
Line 30 in 20d7f24
PaperMod, for example uses this approach:
https://github.com/adityatelange/hugo-PaperMod/blob/master/layouts/partials/head.html#L40
The text was updated successfully, but these errors were encountered: