datalog-theme 0.6.1 → 0.7.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 +4 -4
- data/CHANGELOG.md +50 -0
- data/CITATION.cff +2 -2
- data/README.md +3 -2
- data/_data/js_meta.json +29 -29
- data/_includes/components/author-bio.html +2 -2
- data/_includes/components/hero.html +19 -1
- data/_includes/head.html +5 -10
- data/_includes/header.html +1 -1
- data/_includes/meta/math-config.html +23 -1
- data/_includes/meta/scripts-loader.html +2 -1
- data/_includes/meta/syntax-config.html +19 -0
- data/_includes/scripts.html +1 -9
- data/_includes/search/index-data.json +156 -0
- data/_includes/search/page.html +136 -0
- data/_layouts/home.html +6 -0
- data/_plugins/math_preprocessor.rb +3 -0
- data/_plugins/notebook_converter.rb +0 -39
- data/_plugins/search_pages.rb +73 -0
- data/_sass/_base.scss +7 -1
- data/_sass/_components.scss +25 -3
- data/_sass/_font-fallbacks.scss +43 -0
- data/_sass/_header.scss +10 -0
- data/_sass/_layout.scss +17 -11
- data/_sass/_mathematical.scss +1 -1
- data/_sass/_phase1-enhancements.scss +45 -0
- data/_sass/_search.scss +1 -1
- data/_sass/_syntax-highlighting.scss +2 -2
- data/_sass/_theme.scss +14 -0
- data/_sass/_variables.scss +7 -4
- data/assets/img/hero-detail-640.webp +0 -0
- data/assets/img/hero-detail.webp +0 -0
- data/assets/img/social-card.png +0 -0
- data/assets/js/dist/academic.js +1 -0
- data/assets/js/dist/analytics-dashboard.js +1 -0
- data/assets/js/dist/core.js +1 -0
- data/assets/js/dist/loader.js +1 -0
- data/assets/js/dist/manifest.json +22 -0
- data/assets/js/dist/math.js +1 -0
- data/assets/js/dist/meta.json +371 -0
- data/assets/js/dist/notebook.js +1 -0
- data/assets/js/dist/search.js +1 -0
- data/assets/js/dist/visualizations.js +2 -0
- data/assets/js/search/filters.js +9 -2
- data/datalog-theme.gemspec +10 -2
- data/lib/datalog/cli.rb +19 -1
- data/lib/datalog/theme/version.rb +1 -1
- data/lib/datalog-theme.rb +16 -0
- metadata +34 -20
- data/_data/config/features.yml +0 -262
- data/_data/config/site.yml +0 -42
- data/_data/config/theme.yml +0 -181
- data/assets/img/20220607123041_detail.001.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 044a1ef441ccbf54db7acf3d354bb2c4c1285213894cb0271ec868fd1a1106ba
|
|
4
|
+
data.tar.gz: 76b0d5c472a965169b2dd773209c62d4b3628e93baec673175fdc0e301b43709
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 13394db55c58db0f89ddbe3ebf165823558b5a089a8036dde9c1a0056f73851631306db760e953b868263e4e74e81554601217960f6753be918b50834f010ebc
|
|
7
|
+
data.tar.gz: f972bb963121de7210fff3b1ea607a32bdbb128cfcf211510cfd02da296c79b4ea65e0e2201da2d966e2e8502e2b3662b015f90d2ae9a9d08ab7d7b8f5c2db3e
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [0.7.0] - 2026-09-12
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `tests/test_search_pages.rb` covers the generator: both pages when search is on, neither when it is off or unconfigured, and no duplicate when the site provides its own.
|
|
10
|
+
- The README carries a badge showing the version published on RubyGems, linking to the gem page.
|
|
11
|
+
- `scripts/verify_gem_package.rb` checks that a built gem contains every bundle its manifest references; the release workflow builds the bundles and runs it before publishing.
|
|
12
|
+
- `tests/test_gem_package.rb` covers what a site using the gem needs: the bundles are packaged, the plugins' gem dependencies are declared, and requiring the theme registers its Liquid tags.
|
|
13
|
+
- The search index test checks that tags are whole tags rather than only that the field is an array.
|
|
14
|
+
- The integration suite runs axe-core over six pages in both light and dark mode, so contrast, missing accessible names and misplaced ARIA cannot regress unnoticed.
|
|
15
|
+
- A social card image (`assets/img/social-card.png`), so the Open Graph and Twitter image tags no longer point at a missing file.
|
|
16
|
+
- The release workflow now does a release in one run plus one pull request: "Run workflow" with a version bumps `develop` and opens the PR into `main`; merging it tags `main`, publishes the GitHub release and starts the gem publish.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- MathJax is only loaded on pages that contain math (`theme_options.math.render_on_load: auto`, the new default of the demo site) and Prism only on pages with a code block (`theme_options.syntax_highlighting.load: auto`); pages can still opt in or out with `math:` and `syntax_highlighting:` front matter, and a page with `math: false` is also left alone by the math preprocessor. Pages without either skip about 400 KB of CDN scripts and stylesheets.
|
|
21
|
+
- The IBM Plex web fonts fall back to local fonts scaled to Plex's metrics, so the swap once the web font arrives no longer moves the layout, and the Google Fonts stylesheet no longer blocks rendering.
|
|
22
|
+
- The home hero image is preloaded and small screens get a 640 px variant (`hero_image_small` for pages that set their own `hero_image`).
|
|
23
|
+
- The Lighthouse workflow inlines critical CSS before building, as the deploy does, so it measures the published configuration.
|
|
24
|
+
- CI jobs install only what they use: the Jekyll test job no longer installs libvips (the image plugin uses MiniMagick, which the runners already provide) or keeps redundant pip and `_site` caches, and the accessibility, Lighthouse and deploy workflows no longer set up Python, which only the Rake verification task needs.
|
|
25
|
+
- The hero background is served as a 46 KB WebP instead of a 1.27 MB PNG.
|
|
26
|
+
- Footer text and links, and the skip link in dark mode, meet the 4.5:1 contrast ratio; the blog listing uses second-level headings for its cards.
|
|
27
|
+
- The Tests workflow runs for pull requests into `main` as well as `develop`; the duplicate theme-stability workflow is gone.
|
|
28
|
+
- The configuration guide documents where settings actually live (`_config.yml` plus `_data/config/author.yml`).
|
|
29
|
+
- The gem publish can authenticate with RubyGems trusted publishing (OpenID Connect) instead of a stored API key; the `RUBYGEMS_TRUSTED_PUBLISHING` repository variable selects it.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Sites installing the gem had the search interface and its JavaScript but no search: the page that renders it and the one that builds its index are pages, which a theme gem cannot ship. Both are generated now for any site with `features.search` enabled, and a site that defines either path keeps its own.
|
|
34
|
+
- The published gem could not be used. Jekyll reads `_plugins/` for a site but not for a theme gem, and `lib/datalog-theme.rb` did not load them, so the tags the layouts use were never registered and every consumer site failed to build with `Unknown tag 't'`. Naming the theme under `plugins:` now loads them.
|
|
35
|
+
- The gem shipped `_data/js_manifest.json`, which points every page at the browser bundles, without the bundles themselves: `assets/js/dist/` is build output that git does not track, and the gemspec selected files with `git ls-files`. Sites using the theme loaded no JavaScript at all.
|
|
36
|
+
- The gemspec did not declare `loofah`, which the notebook plugin requires, so loading the theme raised `cannot load such file -- loofah`.
|
|
37
|
+
- The home layout sorted `site.portfolio`, which is nil unless a site declares that collection, and sorting nil stops the build. The section is skipped when the collection is absent.
|
|
38
|
+
- The search index shipped every tag as a list of single characters, so the tag filter on the search page offered 34 buttons reading `a`, `b`, `[`, `"` and so on instead of the 48 real tags. A `split: ''` in the index template turned each tag array into its string form before splitting it.
|
|
39
|
+
- A tag consisting only of whitespace produced a filter button with no accessible name at all, which fails WCAG 4.1.2.
|
|
40
|
+
- The fallback author avatar carried an `aria-label` on a plain `div`, where ARIA prohibits it, so screen readers announced nothing for it. It is now an image role, matching the photo it stands in for.
|
|
41
|
+
- Text set in the teal accent failed WCAG AA everywhere it appeared, reaching only 3.0:1 to 3.5:1 on post badges, skill tags, search highlights and Prism keywords. Teal text now uses a darker tone; the original teal stays for fills and borders.
|
|
42
|
+
- Dark mode had several unreadable components, none of which any check covered: the citation tools kept light backgrounds under light text, leaving a heading white on white at 1.09:1, and difficulty badges kept their light-mode text colour on a near-black pill at 1.93:1.
|
|
43
|
+
- Buttons marked `btn--ghost` were never styled, so they fell back to the browser's own button chrome and could not follow the theme.
|
|
44
|
+
- The Playwright and coverage reports were copied into the built site and published with it. Both are excluded now, and the Playwright report is also ignored by git.
|
|
45
|
+
- `datalog check` reported every dependency as missing on Windows, including bundler, which it treats as a critical failure. The probe called `command -v`, a POSIX shell builtin with no executable behind it; it now searches `PATH` itself, honouring `PATHEXT`.
|
|
46
|
+
- The build and test scripts run on Windows. `npm run test:integration` spawned the Playwright `.cmd` launcher, which Node refuses with `EINVAL`; `npm run build:critical` spawned `bundle`, which is a `.bat` there and failed with `ENOENT`; `bundle exec rake ci:verify` invoked `python3`, which on Windows is a Microsoft Store stub rather than the interpreter; and the CLI tests ran the binstub through its shebang. Node dependencies now run under the current Node binary instead of their launcher shims, and the remaining launchers go through the command interpreter with arguments quoted, so paths containing spaces survive.
|
|
47
|
+
- The site navigation no longer renders expanded and then animates shut on small screens once the script runs, which moved the whole page by about 340 px and put every page's cumulative layout shift near 0.3.
|
|
48
|
+
|
|
49
|
+
### Removed
|
|
50
|
+
|
|
51
|
+
- Percy and its visual suite (`tests/visual/`): Percy never ran without a token and carried the last open npm advisory and about 150 packages, and the suite failed 34 of its 58 specs on CDN waits and strict locators, locally and in CI. The integration specs under `tests/integration/` remain the browser checks and gate every deploy. `npm audit` is clean.
|
|
52
|
+
- The `jekyll-jupyter-notebook` gem and the Jupyter toolchain. Notebook pages are rendered by the theme; only `nbformat` remains, for the notebook validation script.
|
|
53
|
+
- `_data/config/site.yml`, `theme.yml` and `features.yml`, which nothing read.
|
|
54
|
+
|
|
5
55
|
## [0.6.1] - 2026-09-11
|
|
6
56
|
|
|
7
57
|
### Fixed
|
data/CITATION.cff
CHANGED
|
@@ -16,8 +16,8 @@ abstract: >-
|
|
|
16
16
|
It offers integrated notebook publishing, advanced math rendering, interactive
|
|
17
17
|
visualization workflows, and reproducibility tooling optimised for open science communities.
|
|
18
18
|
license: MIT
|
|
19
|
-
version: 0.
|
|
20
|
-
date-released: 2026-09-
|
|
19
|
+
version: 0.7.0
|
|
20
|
+
date-released: 2026-09-12
|
|
21
21
|
keywords:
|
|
22
22
|
- data-science
|
|
23
23
|
- jekyll
|
data/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# DataLog — A Data Science Jekyll Theme
|
|
2
2
|
|
|
3
|
+
[](https://rubygems.org/gems/datalog-theme)
|
|
3
4
|
[](https://github.com/DiogoRibeiro7/analytics-blog-jekyll/actions/workflows/test.yml)
|
|
4
5
|
[](https://github.com/DiogoRibeiro7/analytics-blog-jekyll/actions/workflows/deploy.yml)
|
|
5
6
|
[](https://github.com/DiogoRibeiro7/analytics-blog-jekyll/actions/workflows/gem-release.yml)
|
|
@@ -40,7 +41,7 @@ site; the rest is reference content you can copy from.
|
|
|
40
41
|
| Demo content (this site only) | `_posts/`, `_notebooks/`, `_portfolio/`, `_datasets/`, `_packages/`, `_pages/`, `index.md`, `404.html` |
|
|
41
42
|
| Starter scaffold | `template/` — minimal seed for the [GitHub template repository](docs/template-repository.md); excluded from this site's build |
|
|
42
43
|
| Configuration | `_config.yml`, `_data/`, `Gemfile`, `package.json`, `requirements.txt` |
|
|
43
|
-
| Tests & tooling | `tests/`, `scripts/`, `Rakefile`, `vitest.config.js`, `playwright.config.js`, `pa11yci.json`, `lighthouserc.json
|
|
44
|
+
| Tests & tooling | `tests/`, `scripts/`, `Rakefile`, `vitest.config.js`, `playwright.config.js`, `pa11yci.json`, `lighthouserc.json` |
|
|
44
45
|
| Docs | `docs/`, `README.md`, `CHANGELOG.md`, `CONTRIBUTING.md`, `SECURITY.md`, `TESTING.md` |
|
|
45
46
|
|
|
46
47
|
```
|
|
@@ -95,7 +96,7 @@ site; the rest is reference content you can copy from.
|
|
|
95
96
|
2. **Configure environment** (optional)
|
|
96
97
|
|
|
97
98
|
Copy [`.env.example`](.env.example) to `.env` and fill in any keys you
|
|
98
|
-
need — GA4 credentials,
|
|
99
|
+
need — GA4 credentials, the Codecov token, Playwright base URL, etc.
|
|
99
100
|
All values are optional; the site runs without them, and features that
|
|
100
101
|
require credentials will skip cleanly. See
|
|
101
102
|
[docs/environment-setup.md](docs/environment-setup.md) for the full reference.
|
data/_data/js_meta.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"inputs": {
|
|
3
3
|
"assets/js/core/dark-mode.js": {
|
|
4
|
-
"bytes":
|
|
4
|
+
"bytes": 2409,
|
|
5
5
|
"imports": [],
|
|
6
6
|
"format": "esm"
|
|
7
7
|
},
|
|
8
8
|
"assets/js/core/github-cards.js": {
|
|
9
|
-
"bytes":
|
|
9
|
+
"bytes": 3406,
|
|
10
10
|
"imports": [],
|
|
11
11
|
"format": "esm"
|
|
12
12
|
},
|
|
13
13
|
"assets/js/core/language-filter.js": {
|
|
14
|
-
"bytes":
|
|
14
|
+
"bytes": 2032,
|
|
15
15
|
"imports": [],
|
|
16
16
|
"format": "esm"
|
|
17
17
|
},
|
|
18
18
|
"assets/js/core/navigation.js": {
|
|
19
|
-
"bytes":
|
|
19
|
+
"bytes": 4747,
|
|
20
20
|
"imports": [],
|
|
21
21
|
"format": "esm"
|
|
22
22
|
},
|
|
23
23
|
"assets/js/core/scroll-progress.js": {
|
|
24
|
-
"bytes":
|
|
24
|
+
"bytes": 1511,
|
|
25
25
|
"imports": [],
|
|
26
26
|
"format": "esm"
|
|
27
27
|
},
|
|
28
28
|
"assets/js/core/search-hotkeys.js": {
|
|
29
|
-
"bytes":
|
|
29
|
+
"bytes": 1635,
|
|
30
30
|
"imports": [],
|
|
31
31
|
"format": "esm"
|
|
32
32
|
},
|
|
33
33
|
"assets/js/core/skip-links.js": {
|
|
34
|
-
"bytes":
|
|
34
|
+
"bytes": 1479,
|
|
35
35
|
"imports": [],
|
|
36
36
|
"format": "esm"
|
|
37
37
|
},
|
|
38
38
|
"assets/js/main.js": {
|
|
39
|
-
"bytes":
|
|
39
|
+
"bytes": 746,
|
|
40
40
|
"imports": [
|
|
41
41
|
{
|
|
42
42
|
"path": "assets/js/core/dark-mode.js",
|
|
@@ -77,22 +77,22 @@
|
|
|
77
77
|
"format": "esm"
|
|
78
78
|
},
|
|
79
79
|
"assets/js/loader.js": {
|
|
80
|
-
"bytes":
|
|
80
|
+
"bytes": 4692,
|
|
81
81
|
"imports": [],
|
|
82
82
|
"format": "esm"
|
|
83
83
|
},
|
|
84
84
|
"assets/js/search/analytics.js": {
|
|
85
|
-
"bytes":
|
|
85
|
+
"bytes": 2547,
|
|
86
86
|
"imports": [],
|
|
87
87
|
"format": "esm"
|
|
88
88
|
},
|
|
89
89
|
"assets/js/search/utils.js": {
|
|
90
|
-
"bytes":
|
|
90
|
+
"bytes": 2472,
|
|
91
91
|
"imports": [],
|
|
92
92
|
"format": "esm"
|
|
93
93
|
},
|
|
94
94
|
"assets/js/search/autocomplete.js": {
|
|
95
|
-
"bytes":
|
|
95
|
+
"bytes": 3165,
|
|
96
96
|
"imports": [
|
|
97
97
|
{
|
|
98
98
|
"path": "assets/js/search/utils.js",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"format": "esm"
|
|
104
104
|
},
|
|
105
105
|
"assets/js/search/engine.js": {
|
|
106
|
-
"bytes":
|
|
106
|
+
"bytes": 7122,
|
|
107
107
|
"imports": [
|
|
108
108
|
{
|
|
109
109
|
"path": "assets/js/search/utils.js",
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
"format": "esm"
|
|
115
115
|
},
|
|
116
116
|
"assets/js/search/filters.js": {
|
|
117
|
-
"bytes":
|
|
117
|
+
"bytes": 1269,
|
|
118
118
|
"imports": [],
|
|
119
119
|
"format": "esm"
|
|
120
120
|
},
|
|
121
121
|
"assets/js/search/render.js": {
|
|
122
|
-
"bytes":
|
|
122
|
+
"bytes": 7012,
|
|
123
123
|
"imports": [
|
|
124
124
|
{
|
|
125
125
|
"path": "assets/js/search/utils.js",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"format": "esm"
|
|
131
131
|
},
|
|
132
132
|
"assets/js/search/app.js": {
|
|
133
|
-
"bytes":
|
|
133
|
+
"bytes": 7902,
|
|
134
134
|
"imports": [
|
|
135
135
|
{
|
|
136
136
|
"path": "assets/js/search/analytics.js",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"format": "esm"
|
|
162
162
|
},
|
|
163
163
|
"assets/js/search.js": {
|
|
164
|
-
"bytes":
|
|
164
|
+
"bytes": 10020,
|
|
165
165
|
"imports": [
|
|
166
166
|
{
|
|
167
167
|
"path": "assets/js/search/app.js",
|
|
@@ -172,27 +172,27 @@
|
|
|
172
172
|
"format": "esm"
|
|
173
173
|
},
|
|
174
174
|
"assets/js/math.js": {
|
|
175
|
-
"bytes":
|
|
175
|
+
"bytes": 26480,
|
|
176
176
|
"imports": [],
|
|
177
177
|
"format": "esm"
|
|
178
178
|
},
|
|
179
179
|
"assets/js/visualizations.js": {
|
|
180
|
-
"bytes":
|
|
180
|
+
"bytes": 26322,
|
|
181
181
|
"imports": [],
|
|
182
182
|
"format": "esm"
|
|
183
183
|
},
|
|
184
184
|
"assets/js/notebook.js": {
|
|
185
|
-
"bytes":
|
|
185
|
+
"bytes": 5227,
|
|
186
186
|
"imports": [],
|
|
187
187
|
"format": "esm"
|
|
188
188
|
},
|
|
189
189
|
"assets/js/academic.js": {
|
|
190
|
-
"bytes":
|
|
190
|
+
"bytes": 8556,
|
|
191
191
|
"imports": [],
|
|
192
192
|
"format": "esm"
|
|
193
193
|
},
|
|
194
194
|
"assets/js/analytics-dashboard.js": {
|
|
195
|
-
"bytes":
|
|
195
|
+
"bytes": 12160,
|
|
196
196
|
"imports": [],
|
|
197
197
|
"format": "esm"
|
|
198
198
|
}
|
|
@@ -206,19 +206,19 @@
|
|
|
206
206
|
"entryPoint": "assets/js/main.js",
|
|
207
207
|
"inputs": {
|
|
208
208
|
"assets/js/core/dark-mode.js": {
|
|
209
|
-
"bytesInOutput":
|
|
209
|
+
"bytesInOutput": 750
|
|
210
210
|
},
|
|
211
211
|
"assets/js/core/github-cards.js": {
|
|
212
212
|
"bytesInOutput": 1333
|
|
213
213
|
},
|
|
214
214
|
"assets/js/core/language-filter.js": {
|
|
215
|
-
"bytesInOutput":
|
|
215
|
+
"bytesInOutput": 470
|
|
216
216
|
},
|
|
217
217
|
"assets/js/core/navigation.js": {
|
|
218
218
|
"bytesInOutput": 1851
|
|
219
219
|
},
|
|
220
220
|
"assets/js/core/scroll-progress.js": {
|
|
221
|
-
"bytesInOutput":
|
|
221
|
+
"bytesInOutput": 542
|
|
222
222
|
},
|
|
223
223
|
"assets/js/core/search-hotkeys.js": {
|
|
224
224
|
"bytesInOutput": 563
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
"bytesInOutput": 125
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
|
-
"bytes":
|
|
233
|
+
"bytes": 6200
|
|
234
234
|
},
|
|
235
235
|
"assets/js/dist/loader.js": {
|
|
236
236
|
"imports": [],
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
"entryPoint": "assets/js/search.js",
|
|
256
256
|
"inputs": {
|
|
257
257
|
"assets/js/search/analytics.js": {
|
|
258
|
-
"bytesInOutput":
|
|
258
|
+
"bytesInOutput": 1057
|
|
259
259
|
},
|
|
260
260
|
"assets/js/search/utils.js": {
|
|
261
261
|
"bytesInOutput": 1374
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
"bytesInOutput": 2886
|
|
268
268
|
},
|
|
269
269
|
"assets/js/search/filters.js": {
|
|
270
|
-
"bytesInOutput":
|
|
270
|
+
"bytesInOutput": 631
|
|
271
271
|
},
|
|
272
272
|
"assets/js/search/render.js": {
|
|
273
273
|
"bytesInOutput": 3641
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
"bytesInOutput": 4357
|
|
280
280
|
}
|
|
281
281
|
},
|
|
282
|
-
"bytes":
|
|
282
|
+
"bytes": 19029
|
|
283
283
|
},
|
|
284
284
|
"assets/js/dist/math.js": {
|
|
285
285
|
"imports": [],
|
|
@@ -34,8 +34,8 @@ Parameters:
|
|
|
34
34
|
{%- else -%}
|
|
35
35
|
{%- comment -%} Fallback avatar with initials {%- endcomment -%}
|
|
36
36
|
{%- assign initials = author_name | split: ' ' | map: 'first' | slice: 0, 2 | join: '' | upcase -%}
|
|
37
|
-
<div class="author-bio__avatar-placeholder" aria-label="{{ author_name }}">
|
|
38
|
-
<span>{{ initials }}</span>
|
|
37
|
+
<div class="author-bio__avatar-placeholder" role="img" aria-label="{{ author_name }}">
|
|
38
|
+
<span aria-hidden="true">{{ initials }}</span>
|
|
39
39
|
</div>
|
|
40
40
|
{%- endif -%}
|
|
41
41
|
</div>
|
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
{% assign hero_bg = page.hero_image | default: '/assets/img/
|
|
1
|
+
{% assign hero_bg = page.hero_image | default: '/assets/img/hero-detail.webp' %}
|
|
2
|
+
{% assign hero_bg_small = page.hero_image_small %}
|
|
3
|
+
{% if page.hero_image == nil and hero_bg_small == nil %}
|
|
4
|
+
{% assign hero_bg_small = '/assets/img/hero-detail-640.webp' %}
|
|
5
|
+
{% endif %}
|
|
6
|
+
{%- comment -%}
|
|
7
|
+
The hero is the largest paint on the page. A CSS background is only requested
|
|
8
|
+
once the stylesheet applies, so preload it; small screens get a 640 px
|
|
9
|
+
variant (page.hero_image_small when a page brings its own hero_image).
|
|
10
|
+
{%- endcomment -%}
|
|
11
|
+
{% if hero_bg_small %}
|
|
12
|
+
<link rel="preload" as="image" href="{{ hero_bg_small | relative_url }}" media="(max-width: 640px)" fetchpriority="high" />
|
|
13
|
+
<link rel="preload" as="image" href="{{ hero_bg | relative_url }}" media="(min-width: 641px)" fetchpriority="high" />
|
|
14
|
+
{% else %}
|
|
15
|
+
<link rel="preload" as="image" href="{{ hero_bg | relative_url }}" fetchpriority="high" />
|
|
16
|
+
{% endif %}
|
|
2
17
|
<style nonce="{{ page.csp_nonce }}">
|
|
3
18
|
.hero { --hero-bg: url('{{ hero_bg | relative_url }}'); }
|
|
19
|
+
{% if hero_bg_small %}
|
|
20
|
+
@media (max-width: 640px) { .hero { --hero-bg: url('{{ hero_bg_small | relative_url }}'); } }
|
|
21
|
+
{% endif %}
|
|
4
22
|
</style>
|
|
5
23
|
<section class="hero">
|
|
6
24
|
<div class="hero-overlay"></div>
|
data/_includes/head.html
CHANGED
|
@@ -10,21 +10,14 @@
|
|
|
10
10
|
{% elsif raw_keywords %}
|
|
11
11
|
{% assign keyword_list = raw_keywords | replace: ';', ',' | split: ',' %}
|
|
12
12
|
{% endif %}
|
|
13
|
-
{%
|
|
14
|
-
{% assign math_engine = page.math_engine | default: math_settings.engine | default: 'mathjax' %}
|
|
15
|
-
{% assign math_enabled = page.mathjax %}
|
|
16
|
-
{% if math_enabled == nil %}
|
|
17
|
-
{% assign math_enabled = page.math %}
|
|
18
|
-
{% endif %}
|
|
19
|
-
{% if math_enabled == nil %}
|
|
20
|
-
{% assign math_enabled = math_settings.render_on_load | default: site.features.mathjax %}
|
|
21
|
-
{% endif %}
|
|
13
|
+
{% include meta/math-config.html page=page %}
|
|
22
14
|
{% assign js_manifest = site.data.js_manifest %}
|
|
23
15
|
{% assign syntax_config = site.theme_options.syntax_highlighting %}
|
|
24
16
|
{% assign prism_cdn = syntax_config.cdn | default: 'https://cdn.jsdelivr.net/npm/prismjs@1.29.0' %}
|
|
25
17
|
{% assign prism_theme = syntax_config.themes.dark | default: syntax_config.themes.light | default: 'prism-tomorrow' %}
|
|
26
18
|
{% assign prism_theme_url = prism_cdn | append: '/themes/' | append: prism_theme | append: '.css' %}
|
|
27
19
|
{% assign prism_line_numbers_url = prism_cdn | append: '/plugins/line-numbers/prism-line-numbers.min.css' %}
|
|
20
|
+
{% include meta/syntax-config.html %}
|
|
28
21
|
<meta charset="utf-8" />
|
|
29
22
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
30
23
|
{% include csp-meta.html %}
|
|
@@ -103,14 +96,16 @@
|
|
|
103
96
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
104
97
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
105
98
|
<link rel="preload" href="{{ 'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Serif:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap' | add_sri }}" as="style" />
|
|
106
|
-
<link rel="stylesheet" href="{{ 'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Serif:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap' | add_sri }}" media="print" data-async-style />
|
|
99
|
+
<link rel="stylesheet" href="{{ 'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Serif:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap' | add_sri }}" media="print" data-async-style media="print" data-async-style />
|
|
107
100
|
<noscript>
|
|
108
101
|
<link rel="stylesheet" href="{{ 'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Serif:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap' | add_sri }}" />
|
|
109
102
|
</noscript>
|
|
110
103
|
|
|
111
104
|
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
|
|
105
|
+
{% if prism_enabled %}
|
|
112
106
|
<link rel="stylesheet" href="{{ prism_theme_url | add_sri }}" />
|
|
113
107
|
<link rel="stylesheet" href="{{ prism_line_numbers_url | add_sri }}" />
|
|
108
|
+
{% endif %}
|
|
114
109
|
{% assign critical_config = site.critical_css | default: {} %}
|
|
115
110
|
{% assign critical_enabled = critical_config.enabled | default: false %}
|
|
116
111
|
{% assign main_stylesheet = '/assets/css/main.css' | relative_url %}
|
data/_includes/header.html
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
{% if page.layout %}{% assign page_contexts = page_contexts | push: page.layout %}{% endif %}
|
|
64
64
|
{% if page.collection %}{% assign page_contexts = page_contexts | push: page.collection %}{% endif %}
|
|
65
65
|
{% if page.type %}{% assign page_contexts = page_contexts | push: page.type %}{% endif %}
|
|
66
|
-
<nav id="site-nav" class="site-nav" role="navigation" aria-label="Primary navigation" data-open="
|
|
66
|
+
<nav id="site-nav" class="site-nav" role="navigation" aria-label="Primary navigation" data-open="false">
|
|
67
67
|
{% include header/navigation.html items=nav_items page=page contexts=page_contexts %}
|
|
68
68
|
</nav>
|
|
69
69
|
</div>
|
|
@@ -7,10 +7,16 @@ optional:
|
|
|
7
7
|
---
|
|
8
8
|
Computes math rendering settings shared by layouts.
|
|
9
9
|
Exposes math_enabled, math_engine, math_status_id, and math_has_expressions variables.
|
|
10
|
+
|
|
11
|
+
math_enabled resolves, in order: the page's `mathjax` or `math` front matter,
|
|
12
|
+
then `theme_options.math.render_on_load` (falling back to `features.mathjax`).
|
|
13
|
+
With `render_on_load: auto` the engine is only loaded when the rendered page
|
|
14
|
+
contains math (`$`, `\(`, `\[` or kramdown's `math/tex` scripts) or declares
|
|
15
|
+
`math_expressions`; `true` loads it on every page; `false` only on pages that
|
|
16
|
+
opt in.
|
|
10
17
|
{%- endcomment -%}
|
|
11
18
|
{%- assign math_settings = site.theme_options.math | default: {} -%}
|
|
12
19
|
{%- assign math_engine = include.page.math_engine | default: math_settings.engine | default: 'mathjax' -%}
|
|
13
|
-
{%- assign math_enabled = include.page.mathjax | default: include.page.math | default: math_settings.render_on_load | default: site.features.mathjax -%}
|
|
14
20
|
{%- assign math_status_id = include.status_id | default: 'math-status' -%}
|
|
15
21
|
{%- assign math_expressions = include.page.math_expressions | default: '' -%}
|
|
16
22
|
{%- assign math_has_expressions = false -%}
|
|
@@ -19,3 +25,19 @@ Exposes math_enabled, math_engine, math_status_id, and math_has_expressions vari
|
|
|
19
25
|
{%- assign math_has_expressions = true -%}
|
|
20
26
|
{%- endif -%}
|
|
21
27
|
{%- endif -%}
|
|
28
|
+
{%- assign math_load = math_settings.render_on_load -%}
|
|
29
|
+
{%- if math_load == nil -%}
|
|
30
|
+
{%- assign math_load = site.features.mathjax -%}
|
|
31
|
+
{%- endif -%}
|
|
32
|
+
{%- if include.page.mathjax != nil -%}
|
|
33
|
+
{%- assign math_enabled = include.page.mathjax -%}
|
|
34
|
+
{%- elsif include.page.math != nil -%}
|
|
35
|
+
{%- assign math_enabled = include.page.math -%}
|
|
36
|
+
{%- elsif math_load == 'auto' -%}
|
|
37
|
+
{%- assign math_enabled = math_has_expressions -%}
|
|
38
|
+
{%- if content contains 'math/tex' or content contains '$' or content contains '\(' or content contains '\[' -%}
|
|
39
|
+
{%- assign math_enabled = true -%}
|
|
40
|
+
{%- endif -%}
|
|
41
|
+
{%- else -%}
|
|
42
|
+
{%- assign math_enabled = math_load -%}
|
|
43
|
+
{%- endif -%}
|
|
@@ -12,7 +12,8 @@ Pass location="head" or location="body" to control which block renders.
|
|
|
12
12
|
{%- assign prism_cdn = syntax.cdn | default: 'https://cdn.jsdelivr.net/npm/prismjs@1.29.0' -%}
|
|
13
13
|
{%- assign default_components = 'python|r|sql|julia|javascript' | split: '|' -%}
|
|
14
14
|
{%- assign prism_components = syntax.components | default: default_components -%}
|
|
15
|
-
{%-
|
|
15
|
+
{%- include meta/syntax-config.html -%}
|
|
16
|
+
{%- if include.location == 'head' and prism_enabled -%}
|
|
16
17
|
<script defer src="{{ (prism_cdn | append: '/prism.min.js') | add_sri }}"></script>
|
|
17
18
|
{%- for component in prism_components -%}
|
|
18
19
|
{%- unless component == 'core' -%}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
Decides whether the Prism assets are needed on this page. Exposes prism_enabled.
|
|
3
|
+
|
|
4
|
+
Resolution order: the page's `syntax_highlighting` front matter, then
|
|
5
|
+
`theme_options.syntax_highlighting.load`: `auto` (the default) loads Prism only
|
|
6
|
+
when the rendered page contains a code block; `always` loads it on every page.
|
|
7
|
+
{%- endcomment -%}
|
|
8
|
+
{%- assign syntax_settings = site.theme_options.syntax_highlighting | default: {} -%}
|
|
9
|
+
{%- assign syntax_load = syntax_settings.load | default: 'auto' -%}
|
|
10
|
+
{%- if page.syntax_highlighting != nil -%}
|
|
11
|
+
{%- assign prism_enabled = page.syntax_highlighting -%}
|
|
12
|
+
{%- elsif syntax_load == 'auto' -%}
|
|
13
|
+
{%- assign prism_enabled = false -%}
|
|
14
|
+
{%- if content contains '<pre' or content contains 'class="language-' or content contains 'class="highlight' -%}
|
|
15
|
+
{%- assign prism_enabled = true -%}
|
|
16
|
+
{%- endif -%}
|
|
17
|
+
{%- else -%}
|
|
18
|
+
{%- assign prism_enabled = true -%}
|
|
19
|
+
{%- endif -%}
|
data/_includes/scripts.html
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
{%
|
|
2
|
-
{% assign math_engine = page.math_engine | default: math_settings.engine | default: 'mathjax' %}
|
|
3
|
-
{% assign math_enabled = page.mathjax %}
|
|
4
|
-
{% if math_enabled == nil %}
|
|
5
|
-
{% assign math_enabled = page.math %}
|
|
6
|
-
{% endif %}
|
|
7
|
-
{% if math_enabled == nil %}
|
|
8
|
-
{% assign math_enabled = math_settings.render_on_load | default: site.features.mathjax %}
|
|
9
|
-
{% endif %}
|
|
1
|
+
{% include meta/math-config.html page=page %}
|
|
10
2
|
{% assign js_manifest = site.data.js_manifest %}
|
|
11
3
|
|
|
12
4
|
{% if site.features.search %}
|