jekyll-theme-centos 2.53.0 → 2.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b689e7b6dc4c27d8311c5c7a8f9ecddb43ca8112a2a4b9e1339099b355d1bce
4
- data.tar.gz: 4f9cd748cdae00a61bc2f246935b6cbe41f10adca2c53325d234b5d15b4fec69
3
+ metadata.gz: bdb468b18c687f3ea2d89e228876fb5e950401aa373369a3f5c02cdc4d381cdd
4
+ data.tar.gz: 40a5806469e905febdc66f58fab59d79099e084c09069069a2f201692d3a7693
5
5
  SHA512:
6
- metadata.gz: 1bd46e6096797c3b5f574cecacdb19578d6a183f4858bf9e7aae6422c9289cde11a44a42934f4ead307309879ffcbd8f6777e4a88a212c444a6ac742fc845260
7
- data.tar.gz: 21967ef2faa5686febf3e2a8df96de584e27e5c6fdcc1e543df1b1ed6f2e6612058ceba027efa4ae54ad2fda8c4c604365fe060660daba7677d3f6fe91648b87
6
+ metadata.gz: 982163366a80290122baf41902c6421316837b407531e8fdbd6390fbf622ae0fbaac60491bc595e96fef43f02bba811f29e7e782678ed2ca3ad8c57f3fbb467e
7
+ data.tar.gz: 4df77dbaa773f4c3207ebcc2c0712101b205608c99598aa40895c165ba56e228ee0ca97b5ee492ced26ef7ba497ca78f6633148d498927c82b82049e2648b8ec
@@ -43,8 +43,8 @@ properties:
43
43
  description: >-
44
44
  Upstream stylesheets to load instead of `css_bundle_name`, each from its
45
45
  own file, such as `fontawesome`, `solid`, and `brands`. A project that uses
46
- no regular icons skips the regular and v4 fonts this way. Must be listed in
47
- `x_integrity`, which holds hashes for the default `version` only.
46
+ no regular icons skips the regular and v4 fonts this way. A bundle not listed
47
+ in `x_integrity` isn't loaded. Those hashes match the default `version` only.
48
48
  x_integrity:
49
49
  type: object
50
50
  description: SRI hashes of the stylesheets `css_bundles` can load, keyed by bundle name.
@@ -1,16 +1,15 @@
1
1
  title: Fonts Component Configuration
2
2
  description: >-
3
- Schema for the fonts component, which loads a page's web fonts. Fonts load from
4
- pinned package versions on a CDN, or from a default stylesheet when no packages
5
- are configured.
3
+ Schema for the fonts component, which loads a page's web fonts from pinned
4
+ package versions on a CDN, each verified by an integrity value.
6
5
  type: object
7
6
  properties:
8
7
  with_fonts:
9
8
  type: boolean
10
9
  default: true
11
10
  description: >-
12
- Enables or disables web fonts. On unless set to `false`, so text then uses
13
- the fallback in `$font-family-sans-serif`.
11
+ Enables or disables web fonts. On unless set to `false`. With it off, text
12
+ uses the next fonts in `$font-family-sans-serif` and `$font-family-monospace`.
14
13
  with_fonts_data:
15
14
  type: object
16
15
  description: >-
@@ -20,18 +19,26 @@ properties:
20
19
  type: string
21
20
  default: "https://cdn.jsdelivr.net/npm"
22
21
  description: The base address `families` load from.
23
- default_stylesheet:
24
- type: string
25
- default: "https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Source+Code+Pro:ital,wght@0,400;0,700&display=swap"
26
- description: >-
27
- The stylesheet to load when `families` is unset. It's not versioned and
28
- has no integrity value.
29
22
  families:
30
23
  type: array
31
24
  description: >-
32
- Pinned font packages to load instead of `default_stylesheet`. Set
33
- `$font-family-sans-serif` or `$font-family-monospace` in your stylesheet to
34
- the family name each package declares, such as `Montserrat Variable`.
25
+ Pinned font packages to load. Setting it replaces the whole default list, so
26
+ list every stylesheet you want. To load none, set `with_fonts` to `false`.
27
+ The theme's `$font-family-sans-serif` and `$font-family-monospace` name the
28
+ default families. For another family, set them in your stylesheet to the name
29
+ its package declares.
30
+ default:
31
+ - package: "@fontsource-variable/montserrat"
32
+ version: "5.3.0"
33
+ integrity: "sha384-8jDOv+ApqxPcTcTiickyn3l0lr/mHWtyOHCPEt1u4BpmwMPabmeiJ4CzYRHuAb4w"
34
+ - package: "@fontsource-variable/source-code-pro"
35
+ version: "5.3.1"
36
+ integrity: "sha384-L5Fbf0AbXda7oQ5OSSCWnjFeeBBT7XLlpb6C/VHZaLwOFn9LMDRpgByW+PRMg4Ub"
37
+ - package: "@fontsource-variable/source-code-pro"
38
+ version: "5.3.1"
39
+ stylesheet: "wght-italic.css"
40
+ integrity: "sha384-+T9cq7EeA2KsDGomJPm5/Bsbe6ayOABEuDUgNkHSeHFAzHbAyH49dJdG/wkIXNCR"
41
+
35
42
  items:
36
43
  type: object
37
44
  properties:
@@ -50,8 +57,9 @@ properties:
50
57
  format: sri-hash
51
58
  description: >-
52
59
  The Subresource Integrity (SRI) checksum of that stylesheet. Must be
53
- updated when `version` changes. It doesn't cover the font files the
54
- stylesheet references.
60
+ updated when `version` changes. A family with a missing or blank
61
+ value isn't loaded. It doesn't cover the font files the stylesheet
62
+ references.
55
63
  required:
56
64
  - package
57
65
  - version
@@ -28,10 +28,21 @@ Schema: src/YAML/fontawesome_schema.yml
28
28
  {%- assign fontawesome_css_bundles = with_fontawesome_data.css_bundles %}
29
29
  {%- assign fontawesome_css_integrity = with_fontawesome_schema.css_bundles.x_integrity.properties %}
30
30
 
31
+ {%- comment %} Escaped once here, since every value below goes into an attribute. {%- endcomment %}
32
+ {%- assign fontawesome_version = fontawesome_version | escape %}
33
+ {%- assign fontawesome_cdn = fontawesome_cdn | escape %}
34
+ {%- assign fontawesome_css_bundle_name = fontawesome_css_bundle_name | escape %}
35
+ {%- assign fontawesome_css_bundle_integrity = fontawesome_css_bundle_integrity | escape %}
36
+ {%- assign fontawesome_js_bundle_name = fontawesome_js_bundle_name | escape %}
37
+ {%- assign fontawesome_js_bundle_integrity = fontawesome_js_bundle_integrity | escape %}
38
+
31
39
  {%- capture html_fontawesome_preload %}
32
40
  {%- if fontawesome_mode == "css" and fontawesome_css_bundles %}
33
41
  {%- for bundle in fontawesome_css_bundles %}
34
- <link rel="preload" href="{{ fontawesome_cdn }}/{{ fontawesome_version }}/css/{{ bundle }}.min.css" as="style" fetchpriority="high" integrity="{{ fontawesome_css_integrity[bundle] }}" crossorigin="anonymous" />
42
+ {%- comment %} A bundle with no integrity value in the schema is left out, so nothing loads unverified. {%- endcomment %}
43
+ {%- assign bundle_integrity = fontawesome_css_integrity[bundle] %}
44
+ {%- unless bundle_integrity %}{% continue %}{% endunless %}
45
+ <link rel="preload" href="{{ fontawesome_cdn }}/{{ fontawesome_version }}/css/{{ bundle | escape }}.min.css" as="style" fetchpriority="high" integrity="{{ bundle_integrity | escape }}" crossorigin="anonymous" />
35
46
  {%- endfor %}
36
47
  {%- elsif fontawesome_mode == "css" %}
37
48
  <link rel="preload" href="{{ fontawesome_cdn }}/{{ fontawesome_version }}/css/{{ fontawesome_css_bundle_name }}.min.css" as="style" fetchpriority="high" integrity="{{ fontawesome_css_bundle_integrity }}" crossorigin="anonymous" />
@@ -43,7 +54,10 @@ Schema: src/YAML/fontawesome_schema.yml
43
54
  {%- capture html_fontawesome_head %}
44
55
  {%- if fontawesome_mode == "css" and fontawesome_css_bundles %}
45
56
  {%- for bundle in fontawesome_css_bundles %}
46
- <link rel="stylesheet" href="{{ fontawesome_cdn }}/{{ fontawesome_version }}/css/{{ bundle }}.min.css" integrity="{{ fontawesome_css_integrity[bundle] }}" crossorigin="anonymous" referrerpolicy="no-referrer" />
57
+ {%- comment %} A bundle with no integrity value in the schema is left out, so nothing loads unverified. {%- endcomment %}
58
+ {%- assign bundle_integrity = fontawesome_css_integrity[bundle] %}
59
+ {%- unless bundle_integrity %}{% continue %}{% endunless %}
60
+ <link rel="stylesheet" href="{{ fontawesome_cdn }}/{{ fontawesome_version }}/css/{{ bundle | escape }}.min.css" integrity="{{ bundle_integrity | escape }}" crossorigin="anonymous" referrerpolicy="no-referrer" />
47
61
  {%- endfor %}
48
62
  {%- elsif fontawesome_mode == "css" %}
49
63
  <link rel="stylesheet" href="{{ fontawesome_cdn }}/{{ fontawesome_version }}/css/{{ fontawesome_css_bundle_name }}.min.css" integrity="{{ fontawesome_css_bundle_integrity }}" crossorigin="anonymous" referrerpolicy="no-referrer" />
@@ -1,5 +1,5 @@
1
1
  {% comment %}
2
- fonts: loads the page's web fonts, from pinned packages on a CDN or from the default stylesheet. head.html.liquid calls it with type="hints" and type="preload".
2
+ fonts: loads the page's web fonts from pinned packages on a CDN, each verified by its integrity value. head.html.liquid calls it with type="hints" and type="preload".
3
3
  Data: include.data > page.with_fonts_data > site.data.fonts > site.data.base.fonts
4
4
  Schema: src/YAML/fonts_schema.yml
5
5
  {% endcomment %}
@@ -18,31 +18,22 @@ Schema: src/YAML/fonts_schema.yml
18
18
  {%- assign with_fonts_schema = site.data.base.fonts_schema.properties.with_fonts_data.properties %}
19
19
 
20
20
  {%- if with_fonts %}
21
- {%- assign fonts_cdn = with_fonts_data.cdn | default: with_fonts_schema.cdn.default %}
22
- {%- assign fonts_default_stylesheet = with_fonts_data.default_stylesheet | default: with_fonts_schema.default_stylesheet.default %}
23
- {%- assign fonts_families = with_fonts_data.families %}
24
- {%- assign fonts_family_stylesheet = with_fonts_schema.families.items.properties.stylesheet.default %}
21
+ {%- assign fonts_cdn = with_fonts_data.cdn | default: with_fonts_schema.cdn.default %}
22
+ {%- assign fonts_families = with_fonts_data.families | default: with_fonts_schema.families.default %}
23
+ {%- assign fonts_family_stylesheet = with_fonts_schema.families.items.properties.stylesheet.default %}
25
24
 
26
25
  {%- assign type = include.type %}
27
26
  {%- case type %}
28
27
  {%- when "hints" %}
29
- {%- if fonts_families == nil %}
30
- <link rel="preconnect" href="https://fonts.googleapis.com" />
31
- <link rel="dns-prefetch" href="https://fonts.googleapis.com" />
32
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
33
- <link rel="dns-prefetch" href="https://fonts.gstatic.com" />
34
- {%- elsif fonts_families.size > 0 %}
35
- <link rel="preconnect" href="{{ fonts_cdn }}" crossorigin />
36
- <link rel="dns-prefetch" href="{{ fonts_cdn }}" />
37
- {%- endif %}
28
+ <link rel="preconnect" href="{{ fonts_cdn | escape }}" crossorigin />
29
+ <link rel="dns-prefetch" href="{{ fonts_cdn | escape }}" />
38
30
  {%- when "preload" %}
39
- {%- if fonts_families == nil %}
40
- <link rel="preload" href="{{ fonts_default_stylesheet }}" as="style" onload="this.onload=null;this.rel='stylesheet'" />
41
- <noscript><link rel="stylesheet" href="{{ fonts_default_stylesheet }}" /></noscript>
42
- {%- else %}
31
+ {%- comment %} A family with a missing or blank integrity value is left out, so nothing loads unverified. An empty string is truthy in Liquid, so check its size. {%- endcomment %}
43
32
  {%- for family in fonts_families %}
44
- <link rel="stylesheet" href="{{ fonts_cdn }}/{{ family.package }}@{{ family.version }}/{{ family.stylesheet | default: fonts_family_stylesheet }}" integrity="{{ family.integrity }}" crossorigin="anonymous" referrerpolicy="no-referrer" />
33
+ {%- assign family_integrity = family.integrity | strip %}
34
+ {%- if family_integrity.size == 0 %}{% continue %}{% endif %}
35
+ {%- capture family_href %}{{ fonts_cdn }}/{{ family.package }}@{{ family.version }}/{{ family.stylesheet | default: fonts_family_stylesheet }}{% endcapture %}
36
+ <link rel="stylesheet" href="{{ family_href | escape }}" integrity="{{ family_integrity | escape }}" crossorigin="anonymous" referrerpolicy="no-referrer" />
45
37
  {%- endfor %}
46
- {%- endif %}
47
38
  {%- endcase %}
48
39
  {%- endif %}
@@ -208,8 +208,10 @@ $spacers: (
208
208
  // --------------------------------------------------------------------------------
209
209
  // Typography
210
210
  // --------------------------------------------------------------------------------
211
- $font-family-sans-serif: "Montserrat", sans-serif !default;
212
- $font-family-monospace: "Source Code Pro", monospace !default;
211
+ // The fonts component loads these families from pinned packages, which declare the
212
+ // "Variable" names. The plain names follow, for a site that loads them another way.
213
+ $font-family-sans-serif: "Montserrat Variable", "Montserrat", sans-serif !default;
214
+ $font-family-monospace: "Source Code Pro Variable", "Source Code Pro", monospace !default;
213
215
  $headings-font-weight: 700 !default;
214
216
  $font-size-base: $spacer !default;
215
217
  $h1-font-size: $font-size-base * 2.75 !default;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-centos
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.53.0
4
+ version: 2.54.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alain Reguera Delgado