✨ Bundle all CSS into a single file
This commit is contained in:
parent
25e68ccb23
commit
5ae1a23727
@ -10,11 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Alt text to author image ([#8](https://github.com/jpanther/lynx/pull/8))
|
- Alt text to author image ([#8](https://github.com/jpanther/lynx/pull/8))
|
||||||
|
- Expanded Emoji support in page titles
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Upgrade to Tailwind v3.1.3 and Typography v0.5.2
|
- Upgrade to Tailwind v3.1.3 and Typography v0.5.2
|
||||||
- Adjusted contrast of certain text to improve accessibility
|
- Adjusted contrast of certain text to improve accessibility
|
||||||
|
- All CSS is now bundled into a single file for better performance
|
||||||
|
|
||||||
## [1.1.0] - 2021-11-06
|
## [1.1.0] - 2021-11-06
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
<title>{{ .Site.Title }}</title>
|
<title>{{ .Site.Title }}</title>
|
||||||
<meta name="title" content="{{ .Site.Title }}" />
|
<meta name="title" content="{{ .Site.Title }}" />
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
<title>{{ .Title | emojify }} · {{ .Site.Title | emojify }}</title>
|
||||||
<meta name="title" content="{{ .Title }} · {{ .Site.Title }}" />
|
<meta name="title" content="{{ .Title | emojify }} · {{ .Site.Title | emojify }}" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{/* Metadata */}}
|
{{/* Metadata */}}
|
||||||
{{ with .Params.Description -}}
|
{{ with .Params.Description -}}
|
||||||
@ -32,25 +32,21 @@
|
|||||||
{{ range .AlternativeOutputFormats -}}
|
{{ range .AlternativeOutputFormats -}}
|
||||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{/* Styles */}}
|
{{/* Asset bundles */}}
|
||||||
{{ $mainCSS := resources.Get "css/compiled/main.css" }}
|
{{ $assets := newScratch }}
|
||||||
{{ $mainStyles := $mainCSS | resources.Minify | resources.Fingerprint "sha512" }}
|
{{ $cssMain := resources.Get "css/compiled/main.css" }}
|
||||||
<link
|
{{ $assets.Add "css" (slice $cssMain) }}
|
||||||
type="text/css"
|
{{ $cssCustom := resources.Get "css/custom.css" }}
|
||||||
rel="stylesheet"
|
{{ if $cssCustom }}
|
||||||
href="{{ $mainStyles.RelPermalink }}"
|
{{ $assets.Add "css" (slice $cssCustom) }}
|
||||||
integrity="{{ $mainStyles.Data.Integrity }}"
|
|
||||||
/>
|
|
||||||
{{ $customCSS := resources.Get "css/custom.css" }}
|
|
||||||
{{ if $customCSS }}
|
|
||||||
{{ $customStyles := $customCSS | resources.Minify | resources.Fingerprint "sha512" }}
|
|
||||||
<link
|
|
||||||
type="text/css"
|
|
||||||
rel="stylesheet"
|
|
||||||
href="{{ $customStyles.RelPermalink }}"
|
|
||||||
integrity="{{ $customStyles.Data.Integrity }}"
|
|
||||||
/>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ $bundleCSS := $assets.Get "css" | resources.Concat "css/main.bundle.css" | resources.Minify | resources.Fingerprint "sha512" }}
|
||||||
|
<link
|
||||||
|
type="text/css"
|
||||||
|
rel="stylesheet"
|
||||||
|
href="{{ $bundleCSS.RelPermalink }}"
|
||||||
|
integrity="{{ $bundleCSS.Data.Integrity }}"
|
||||||
|
/>
|
||||||
{{/* Icons */}}
|
{{/* Icons */}}
|
||||||
{{ if templates.Exists "partials/favicons.html" }}
|
{{ if templates.Exists "partials/favicons.html" }}
|
||||||
{{ partialCached "favicons.html" .Site }}
|
{{ partialCached "favicons.html" .Site }}
|
||||||
|
Loading…
Reference in New Issue
Block a user