✨ 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
|
||||
|
||||
- Alt text to author image ([#8](https://github.com/jpanther/lynx/pull/8))
|
||||
- Expanded Emoji support in page titles
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade to Tailwind v3.1.3 and Typography v0.5.2
|
||||
- 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
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<meta name="title" content="{{ .Site.Title }}" />
|
||||
{{- else -}}
|
||||
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
||||
<meta name="title" content="{{ .Title }} · {{ .Site.Title }}" />
|
||||
<title>{{ .Title | emojify }} · {{ .Site.Title | emojify }}</title>
|
||||
<meta name="title" content="{{ .Title | emojify }} · {{ .Site.Title | emojify }}" />
|
||||
{{- end }}
|
||||
{{/* Metadata */}}
|
||||
{{ with .Params.Description -}}
|
||||
@ -32,25 +32,21 @@
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
{{/* Styles */}}
|
||||
{{ $mainCSS := resources.Get "css/compiled/main.css" }}
|
||||
{{ $mainStyles := $mainCSS | resources.Minify | resources.Fingerprint "sha512" }}
|
||||
<link
|
||||
type="text/css"
|
||||
rel="stylesheet"
|
||||
href="{{ $mainStyles.RelPermalink }}"
|
||||
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 }}"
|
||||
/>
|
||||
{{/* Asset bundles */}}
|
||||
{{ $assets := newScratch }}
|
||||
{{ $cssMain := resources.Get "css/compiled/main.css" }}
|
||||
{{ $assets.Add "css" (slice $cssMain) }}
|
||||
{{ $cssCustom := resources.Get "css/custom.css" }}
|
||||
{{ if $cssCustom }}
|
||||
{{ $assets.Add "css" (slice $cssCustom) }}
|
||||
{{ 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 */}}
|
||||
{{ if templates.Exists "partials/favicons.html" }}
|
||||
{{ partialCached "favicons.html" .Site }}
|
||||
|
Loading…
Reference in New Issue
Block a user