datalog-theme 0.6.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 +7 -0
- data/CHANGELOG.md +162 -0
- data/CITATION.cff +29 -0
- data/LICENSE +21 -0
- data/README.md +257 -0
- data/_data/academic.yml +217 -0
- data/_data/cdn-integrity.yml +51 -0
- data/_data/config/author.yml +121 -0
- data/_data/config/features.yml +262 -0
- data/_data/config/site.yml +42 -0
- data/_data/config/theme.yml +181 -0
- data/_data/datasets.yml +28 -0
- data/_data/i18n/en.yml +438 -0
- data/_data/i18n/es.yml +438 -0
- data/_data/i18n/pt.yml +438 -0
- data/_data/js_manifest.json +22 -0
- data/_data/js_meta.json +371 -0
- data/_data/navigation.yml +145 -0
- data/_data/projects.yml +41 -0
- data/_data/publications.yml +28 -0
- data/_data/social.yml +73 -0
- data/_data/visualizations.yml +51 -0
- data/_includes/analytics/dashboard.html +149 -0
- data/_includes/analytics.html +9 -0
- data/_includes/components/academic-dashboard.html +347 -0
- data/_includes/components/advanced-search.html +682 -0
- data/_includes/components/api-function.html +94 -0
- data/_includes/components/author-bio.html +166 -0
- data/_includes/components/bookmark-system.html +96 -0
- data/_includes/components/breadcrumbs.html +89 -0
- data/_includes/components/citation-tools.html +94 -0
- data/_includes/components/comments.html +244 -0
- data/_includes/components/content-provenance.html +43 -0
- data/_includes/components/content-recommendations.html +228 -0
- data/_includes/components/difficulty-badge.html +84 -0
- data/_includes/components/email-preferences.html +200 -0
- data/_includes/components/enhanced-code-block.html +212 -0
- data/_includes/components/enhanced-metadata.html +228 -0
- data/_includes/components/enhanced-toc.html +209 -0
- data/_includes/components/hero.html +15 -0
- data/_includes/components/language-switcher.html +396 -0
- data/_includes/components/math-fallback.html +19 -0
- data/_includes/components/navigation-enhancements.html +454 -0
- data/_includes/components/newsletter-signup.html +178 -0
- data/_includes/components/open-science-badges.html +16 -0
- data/_includes/components/package-install.html +194 -0
- data/_includes/components/performance-monitor.html +170 -0
- data/_includes/components/popular-posts.html +233 -0
- data/_includes/components/post-hero.html +62 -0
- data/_includes/components/reading-progress.html +133 -0
- data/_includes/components/reading-time.html +121 -0
- data/_includes/components/responsive-image.html +63 -0
- data/_includes/components/search-facets.html +307 -0
- data/_includes/components/series-navigation.html +124 -0
- data/_includes/components/social-proof.html +34 -0
- data/_includes/components/social-share.html +119 -0
- data/_includes/components/user-preferences.html +566 -0
- data/_includes/components/visualization-card.html +24 -0
- data/_includes/components/viz-table-fallback.html +19 -0
- data/_includes/critical-css/default.html +0 -0
- data/_includes/critical-css/home.html +0 -0
- data/_includes/critical-css/post.html +0 -0
- data/_includes/csp-meta.html +17 -0
- data/_includes/footer/nav-column.html +31 -0
- data/_includes/footer.html +76 -0
- data/_includes/head.html +337 -0
- data/_includes/header/navigation.html +48 -0
- data/_includes/header.html +70 -0
- data/_includes/helpers/array-to-sentence.html +21 -0
- data/_includes/helpers/date-format.html +16 -0
- data/_includes/helpers/link-with-icon.html +26 -0
- data/_includes/layouts/default/article.html +67 -0
- data/_includes/meta/language-attributes.html +25 -0
- data/_includes/meta/math-config.html +21 -0
- data/_includes/meta/schema.html +153 -0
- data/_includes/meta/scripts-loader.html +52 -0
- data/_includes/post/related-posts.html +63 -0
- data/_includes/scripts.html +72 -0
- data/_includes/skip-link.html +1 -0
- data/_includes/toc.html +2 -0
- data/_layouts/archive.html +282 -0
- data/_layouts/dataset.html +52 -0
- data/_layouts/default.html +33 -0
- data/_layouts/home.html +48 -0
- data/_layouts/notebook.html +173 -0
- data/_layouts/package.html +238 -0
- data/_layouts/page.html +16 -0
- data/_layouts/portfolio.html +41 -0
- data/_layouts/post-sidebar.html +183 -0
- data/_layouts/post.html +338 -0
- data/_layouts/project.html +252 -0
- data/_layouts/research.html +504 -0
- data/_plugins/analytics_dashboard.rb +315 -0
- data/_plugins/config_validator.rb +397 -0
- data/_plugins/csp_generator.rb +115 -0
- data/_plugins/datalog_bibliography.rb +19 -0
- data/_plugins/datalog_comments.rb +18 -0
- data/_plugins/datalog_slides.rb +20 -0
- data/_plugins/front_matter_compat.rb +109 -0
- data/_plugins/i18n.rb +160 -0
- data/_plugins/image_optimizer.rb +445 -0
- data/_plugins/math_preprocessor.rb +185 -0
- data/_plugins/notebook_converter.rb +1107 -0
- data/_plugins/plugin_loader.rb +185 -0
- data/_plugins/publications_generator.rb +234 -0
- data/_plugins/reading_time.rb +15 -0
- data/_plugins/search_normalizer.rb +74 -0
- data/_plugins/sri_filter.rb +18 -0
- data/_plugins/toc_filter.rb +68 -0
- data/_plugins/warning_filter.rb +3 -0
- data/_sass/_base.scss +142 -0
- data/_sass/_components.scss +2380 -0
- data/_sass/_header.scss +470 -0
- data/_sass/_interactive.scss +344 -0
- data/_sass/_layout.scss +1760 -0
- data/_sass/_mathematical.scss +368 -0
- data/_sass/_mixins.scss +99 -0
- data/_sass/_package-docs.scss +715 -0
- data/_sass/_phase1-enhancements.scss +721 -0
- data/_sass/_phase3-enhancements.scss +874 -0
- data/_sass/_phase4-enhancements.scss +1214 -0
- data/_sass/_phase5-enhancements.scss +414 -0
- data/_sass/_search.scss +654 -0
- data/_sass/_syntax-highlighting.scss +128 -0
- data/_sass/_theme.scss +79 -0
- data/_sass/_typography.scss +148 -0
- data/_sass/_utilities.scss +334 -0
- data/_sass/_variables.scss +153 -0
- data/_sass/_visualizations.scss +242 -0
- data/assets/css/main.scss +4 -0
- data/assets/img/20220607123041_detail.001.png +0 -0
- data/assets/img/favicons/android-chrome-192x192.png +0 -0
- data/assets/img/favicons/android-chrome-512x512.png +0 -0
- data/assets/img/favicons/apple-touch-icon.png +0 -0
- data/assets/img/favicons/favicon-16x16.png +0 -0
- data/assets/img/favicons/favicon-32x32.png +0 -0
- data/assets/img/favicons/favicon.ico +0 -0
- data/assets/img/favicons/site.webmanifest +21 -0
- data/assets/img/portfolio-placeholder.svg +20 -0
- data/assets/js/academic.js +262 -0
- data/assets/js/analytics-dashboard.js +382 -0
- data/assets/js/core/dark-mode.js +79 -0
- data/assets/js/core/github-cards.js +123 -0
- data/assets/js/core/language-filter.js +69 -0
- data/assets/js/core/navigation.js +184 -0
- data/assets/js/core/scroll-progress.js +45 -0
- data/assets/js/core/search-hotkeys.js +62 -0
- data/assets/js/core/skip-links.js +62 -0
- data/assets/js/loader.js +163 -0
- data/assets/js/main.js +23 -0
- data/assets/js/math.js +818 -0
- data/assets/js/notebook.js +158 -0
- data/assets/js/search/analytics.js +91 -0
- data/assets/js/search/app.js +271 -0
- data/assets/js/search/autocomplete.js +120 -0
- data/assets/js/search/engine.js +260 -0
- data/assets/js/search/filters.js +38 -0
- data/assets/js/search/render.js +217 -0
- data/assets/js/search/utils.js +99 -0
- data/assets/js/search.js +354 -0
- data/assets/js/visualizations.js +816 -0
- data/assets/publications/datalog-publications.bib +8 -0
- data/assets/publications/datalog-publications.ris +9 -0
- data/assets/publications/publications.bib +30 -0
- data/assets/templates/diogo-ribeiro-cv.md +31 -0
- data/assets/templates/diogo-ribeiro-cv.tex +32 -0
- data/bin/datalog +26 -0
- data/datalog-theme.gemspec +72 -0
- data/lib/datalog/cli.rb +563 -0
- data/lib/datalog/plugin_system/dependency_resolver.rb +223 -0
- data/lib/datalog/plugin_system.rb +237 -0
- data/lib/datalog/plugins/citations.rb +182 -0
- data/lib/datalog/plugins/comments.rb +183 -0
- data/lib/datalog/plugins/search.rb +45 -0
- data/lib/datalog/plugins/slides.rb +121 -0
- data/lib/datalog/theme/theme.rb +18 -0
- data/lib/datalog/theme/version.rb +7 -0
- data/lib/datalog/warning_filter.rb +28 -0
- data/lib/datalog-theme.rb +17 -0
- metadata +555 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
---
|
|
3
|
+
required:
|
|
4
|
+
- page
|
|
5
|
+
- content
|
|
6
|
+
optional:
|
|
7
|
+
- date_format
|
|
8
|
+
---
|
|
9
|
+
Renders the standard article scaffold used by the default layout.
|
|
10
|
+
{%- endcomment -%}
|
|
11
|
+
{%- assign article_page = include.page -%}
|
|
12
|
+
{%- assign hero_overlay_title = false -%}
|
|
13
|
+
{%- if article_page.post_hero.image and article_page.post_hero.overlay -%}
|
|
14
|
+
{%- assign hero_overlay_title = true -%}
|
|
15
|
+
{%- endif -%}
|
|
16
|
+
<article class="content-block" itemscope itemtype="https://schema.org/ScholarlyArticle">
|
|
17
|
+
{%- if article_page.post_hero.image -%}
|
|
18
|
+
{% include components/post-hero.html page=article_page %}
|
|
19
|
+
{%- endif -%}
|
|
20
|
+
<header class="article-header">
|
|
21
|
+
{%- unless hero_overlay_title -%}
|
|
22
|
+
{%- if article_page.title -%}
|
|
23
|
+
<h1 class="article-title" itemprop="headline">{{ article_page.title }}</h1>
|
|
24
|
+
{%- endif -%}
|
|
25
|
+
{%- if article_page.subtitle -%}
|
|
26
|
+
<p class="article-subtitle">{{ article_page.subtitle }}</p>
|
|
27
|
+
{%- endif -%}
|
|
28
|
+
{%- endunless -%}
|
|
29
|
+
{%- if article_page.excerpt -%}
|
|
30
|
+
<p class="article-summary" itemprop="abstract">{{ article_page.excerpt | strip_html }}</p>
|
|
31
|
+
{%- endif -%}
|
|
32
|
+
|
|
33
|
+
<dl class="article-meta">
|
|
34
|
+
{%- if article_page.date -%}
|
|
35
|
+
<div>
|
|
36
|
+
<dt class="visually-hidden">{% t 'article.meta.published' %}</dt>
|
|
37
|
+
<dd itemprop="datePublished" content="{{ article_page.date | date_to_xmlschema }}">
|
|
38
|
+
{% include helpers/date-format.html date=article_page.date format=include.date_format %}
|
|
39
|
+
</dd>
|
|
40
|
+
</div>
|
|
41
|
+
{%- endif -%}
|
|
42
|
+
{%- assign modified = article_page.last_modified_at | default: article_page.updated -%}
|
|
43
|
+
{%- if modified -%}
|
|
44
|
+
<div>
|
|
45
|
+
<dt class="visually-hidden">{% t 'article.meta.updated' %}</dt>
|
|
46
|
+
<dd itemprop="dateModified" content="{{ modified | date_to_xmlschema }}">
|
|
47
|
+
{% include helpers/date-format.html date=modified format=include.date_format %}
|
|
48
|
+
</dd>
|
|
49
|
+
</div>
|
|
50
|
+
{%- endif -%}
|
|
51
|
+
{%- assign author_name = article_page.author | default: site.author.name -%}
|
|
52
|
+
{%- comment -%} `show_author: false` hides the byline, for pages that are site chrome rather than articles. {%- endcomment -%}
|
|
53
|
+
{%- if author_name and article_page.show_author != false -%}
|
|
54
|
+
<div>
|
|
55
|
+
<dt class="visually-hidden">{% t 'article.meta.author' %}</dt>
|
|
56
|
+
<dd itemprop="author" itemscope itemtype="https://schema.org/Person">
|
|
57
|
+
<span itemprop="name">{{ author_name }}</span>
|
|
58
|
+
</dd>
|
|
59
|
+
</div>
|
|
60
|
+
{%- endif -%}
|
|
61
|
+
</dl>
|
|
62
|
+
</header>
|
|
63
|
+
|
|
64
|
+
<div class="article-body" itemprop="articleBody">
|
|
65
|
+
{{ include.content }}
|
|
66
|
+
</div>
|
|
67
|
+
</article>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
---
|
|
3
|
+
optional:
|
|
4
|
+
- page
|
|
5
|
+
---
|
|
6
|
+
Calculates normalized language and direction attributes for the html element.
|
|
7
|
+
Sets html_lang and html_dir variables based on site localization settings.
|
|
8
|
+
{%- endcomment -%}
|
|
9
|
+
{%- assign localization_config = site.theme_options.localization | default: {} -%}
|
|
10
|
+
{%- assign lang_raw = include.page.lang | default: page.lang | default: site.locale | default: localization_config.default_locale | default: 'en' -%}
|
|
11
|
+
{%- assign lang_code = lang_raw | downcase | strip | split: '-' | first | split: '_' | first -%}
|
|
12
|
+
{%- assign rtl_locales = localization_config.rtl_locales -%}
|
|
13
|
+
{%- if rtl_locales -%}
|
|
14
|
+
{%- assign rtl_locales = rtl_locales | join: ',' | split: ',' -%}
|
|
15
|
+
{%- else -%}
|
|
16
|
+
{%- assign rtl_locales = 'ar|he|fa|ur' | split: '|' -%}
|
|
17
|
+
{%- endif -%}
|
|
18
|
+
{%- assign html_dir = 'ltr' -%}
|
|
19
|
+
{%- for rtl_code in rtl_locales -%}
|
|
20
|
+
{%- assign rtl_code = rtl_code | downcase | strip -%}
|
|
21
|
+
{%- if rtl_code == lang_code -%}
|
|
22
|
+
{%- assign html_dir = 'rtl' -%}
|
|
23
|
+
{%- endif -%}
|
|
24
|
+
{%- endfor -%}
|
|
25
|
+
{%- assign html_lang = lang_code -%}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
---
|
|
3
|
+
required:
|
|
4
|
+
- page
|
|
5
|
+
optional:
|
|
6
|
+
- status_id
|
|
7
|
+
---
|
|
8
|
+
Computes math rendering settings shared by layouts.
|
|
9
|
+
Exposes math_enabled, math_engine, math_status_id, and math_has_expressions variables.
|
|
10
|
+
{%- endcomment -%}
|
|
11
|
+
{%- assign math_settings = site.theme_options.math | default: {} -%}
|
|
12
|
+
{%- 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
|
+
{%- assign math_status_id = include.status_id | default: 'math-status' -%}
|
|
15
|
+
{%- assign math_expressions = include.page.math_expressions | default: '' -%}
|
|
16
|
+
{%- assign math_has_expressions = false -%}
|
|
17
|
+
{%- if math_expressions != blank and math_expressions != empty -%}
|
|
18
|
+
{%- if math_expressions.size > 0 -%}
|
|
19
|
+
{%- assign math_has_expressions = true -%}
|
|
20
|
+
{%- endif -%}
|
|
21
|
+
{%- endif -%}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
---
|
|
3
|
+
required:
|
|
4
|
+
- page
|
|
5
|
+
optional:
|
|
6
|
+
- type
|
|
7
|
+
---
|
|
8
|
+
Outputs comprehensive JSON-LD metadata for the current page.
|
|
9
|
+
Provides rich structured data for:
|
|
10
|
+
- Article/BlogPosting/TechnicalArticle schema for posts
|
|
11
|
+
- WebPage schema for standard pages
|
|
12
|
+
- Author information with social profile links
|
|
13
|
+
- Publisher organization with branding
|
|
14
|
+
- Images, keywords, and content metadata
|
|
15
|
+
|
|
16
|
+
Defaults to TechnicalArticle for posts, WebPage for other pages.
|
|
17
|
+
{%- endcomment -%}
|
|
18
|
+
{%- assign schema_page = include.page -%}
|
|
19
|
+
{%- assign is_post = false -%}
|
|
20
|
+
{%- if schema_page.layout == 'post' or schema_page.collection == 'posts' -%}
|
|
21
|
+
{%- assign is_post = true -%}
|
|
22
|
+
{%- endif -%}
|
|
23
|
+
{%- assign default_type = 'WebPage' -%}
|
|
24
|
+
{%- if is_post -%}
|
|
25
|
+
{%- assign default_type = 'TechnicalArticle' -%}
|
|
26
|
+
{%- endif -%}
|
|
27
|
+
{%- assign schema_type = include.type | default: schema_page.schema_type | default: default_type -%}
|
|
28
|
+
{%- assign csp_registry = site.data.csp | default: {} -%}
|
|
29
|
+
{%- assign nonce_lookup = csp_registry.nonces | default: {} -%}
|
|
30
|
+
{%- assign schema_nonce = schema_page.csp_nonce | default: page.csp_nonce | default: nonce_lookup[schema_page.path] | default: nonce_lookup[page.path] | default: nonce_lookup[page.url] -%}
|
|
31
|
+
{%- assign description = schema_page.description | default: schema_page.excerpt | strip_html | strip_newlines | truncate: 300 -%}
|
|
32
|
+
{%- assign page_url = schema_page.url | absolute_url -%}
|
|
33
|
+
{%- assign author_name = schema_page.author | default: site.author.name -%}
|
|
34
|
+
{%- assign word_count = schema_page.content | strip_html | number_of_words -%}
|
|
35
|
+
{%- assign modified = schema_page.last_modified_at | default: schema_page.updated | default: schema_page.date -%}
|
|
36
|
+
<script type="application/ld+json" nonce="{{ schema_nonce }}">
|
|
37
|
+
{
|
|
38
|
+
"@context": "https://schema.org",
|
|
39
|
+
"@type": "{{ schema_type }}",
|
|
40
|
+
"mainEntityOfPage": {
|
|
41
|
+
"@type": "WebPage",
|
|
42
|
+
"@id": {{ page_url | jsonify }}
|
|
43
|
+
},
|
|
44
|
+
"headline": {{ schema_page.title | truncate: 110 | jsonify }},
|
|
45
|
+
{%- if description -%}
|
|
46
|
+
"description": {{ description | jsonify }},
|
|
47
|
+
{%- endif -%}
|
|
48
|
+
"url": {{ page_url | jsonify }},
|
|
49
|
+
{%- if schema_page.image or schema_page.og_image -%}
|
|
50
|
+
"image": {
|
|
51
|
+
"@type": "ImageObject",
|
|
52
|
+
"url": {{ schema_page.image | default: schema_page.og_image | absolute_url | jsonify }},
|
|
53
|
+
"width": {{ schema_page.image_width | default: 1200 }},
|
|
54
|
+
"height": {{ schema_page.image_height | default: 630 }}
|
|
55
|
+
},
|
|
56
|
+
{%- elsif site.social.default_image -%}
|
|
57
|
+
"image": {
|
|
58
|
+
"@type": "ImageObject",
|
|
59
|
+
"url": {{ site.social.default_image | absolute_url | jsonify }},
|
|
60
|
+
"width": 1200,
|
|
61
|
+
"height": 630
|
|
62
|
+
},
|
|
63
|
+
{%- endif -%}
|
|
64
|
+
{%- if schema_page.date -%}
|
|
65
|
+
"datePublished": "{{ schema_page.date | date_to_xmlschema }}",
|
|
66
|
+
{%- endif -%}
|
|
67
|
+
"dateModified": "{{ modified | date_to_xmlschema }}",
|
|
68
|
+
{%- if word_count > 0 -%}
|
|
69
|
+
"wordCount": {{ word_count }},
|
|
70
|
+
{%- endif -%}
|
|
71
|
+
{%- if schema_page.tags and schema_page.tags.size > 0 -%}
|
|
72
|
+
"keywords": {{ schema_page.tags | jsonify }},
|
|
73
|
+
{%- endif -%}
|
|
74
|
+
{%- if schema_page.categories and schema_page.categories.size > 0 -%}
|
|
75
|
+
"articleSection": {{ schema_page.categories | first | jsonify }},
|
|
76
|
+
{%- endif -%}
|
|
77
|
+
{%- if is_post -%}
|
|
78
|
+
"inLanguage": "{{ schema_page.lang | default: site.locale | default: 'en' | split: '_' | first }}",
|
|
79
|
+
{%- endif -%}
|
|
80
|
+
"author": {
|
|
81
|
+
"@type": "Person",
|
|
82
|
+
"name": {{ author_name | jsonify }},
|
|
83
|
+
"url": {{ site.url | jsonify }}
|
|
84
|
+
{%- if site.author.orcid -%},
|
|
85
|
+
"sameAs": [
|
|
86
|
+
{{ site.author.orcid | jsonify }}
|
|
87
|
+
{%- if site.author.github -%},
|
|
88
|
+
"https://github.com/{{ site.author.github }}"
|
|
89
|
+
{%- endif -%}
|
|
90
|
+
{%- if site.author.twitter -%},
|
|
91
|
+
"https://twitter.com/{{ site.author.twitter }}"
|
|
92
|
+
{%- endif -%}
|
|
93
|
+
{%- if site.author.linkedin -%},
|
|
94
|
+
"https://linkedin.com/in/{{ site.author.linkedin }}"
|
|
95
|
+
{%- endif -%}
|
|
96
|
+
{%- if site.author.researchgate -%},
|
|
97
|
+
{{ site.author.researchgate | jsonify }}
|
|
98
|
+
{%- endif -%}
|
|
99
|
+
]
|
|
100
|
+
{%- endif -%}
|
|
101
|
+
},
|
|
102
|
+
"publisher": {
|
|
103
|
+
"@type": "Organization",
|
|
104
|
+
"name": {{ site.author.affiliation | default: site.title | jsonify }},
|
|
105
|
+
"url": {{ site.url | jsonify }},
|
|
106
|
+
"logo": {
|
|
107
|
+
"@type": "ImageObject",
|
|
108
|
+
"url": {{ '/assets/img/favicons/android-chrome-512x512.png' | absolute_url | jsonify }},
|
|
109
|
+
"width": 512,
|
|
110
|
+
"height": 512
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
{%- if schema_page.doi -%},
|
|
114
|
+
"identifier": {
|
|
115
|
+
"@type": "PropertyValue",
|
|
116
|
+
"propertyID": "doi",
|
|
117
|
+
"value": {{ schema_page.doi | jsonify }}
|
|
118
|
+
}
|
|
119
|
+
{%- endif -%}
|
|
120
|
+
{%- if schema_page.citation_key -%},
|
|
121
|
+
"citation": {{ schema_page.citation_key | jsonify }}
|
|
122
|
+
{%- endif -%}
|
|
123
|
+
}
|
|
124
|
+
</script>
|
|
125
|
+
{%- comment -%} Add BreadcrumbList schema for posts {%- endcomment -%}
|
|
126
|
+
{%- if is_post -%}
|
|
127
|
+
<script type="application/ld+json" nonce="{{ schema_nonce }}">
|
|
128
|
+
{
|
|
129
|
+
"@context": "https://schema.org",
|
|
130
|
+
"@type": "BreadcrumbList",
|
|
131
|
+
"itemListElement": [
|
|
132
|
+
{
|
|
133
|
+
"@type": "ListItem",
|
|
134
|
+
"position": 1,
|
|
135
|
+
"name": "Home",
|
|
136
|
+
"item": {{ site.url | jsonify }}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"@type": "ListItem",
|
|
140
|
+
"position": 2,
|
|
141
|
+
"name": "Blog",
|
|
142
|
+
"item": {{ '/blog/' | absolute_url | jsonify }}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"@type": "ListItem",
|
|
146
|
+
"position": 3,
|
|
147
|
+
"name": {{ schema_page.title | truncate: 50 | jsonify }},
|
|
148
|
+
"item": {{ page_url | jsonify }}
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
</script>
|
|
153
|
+
{%- endif -%}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
---
|
|
3
|
+
required:
|
|
4
|
+
- location
|
|
5
|
+
optional:
|
|
6
|
+
- syntax_config
|
|
7
|
+
---
|
|
8
|
+
Outputs Prism assets in the head and shared data bootstrapping scripts in the body.
|
|
9
|
+
Pass location="head" or location="body" to control which block renders.
|
|
10
|
+
{%- endcomment -%}
|
|
11
|
+
{%- assign syntax = include.syntax_config | default: site.theme_options.syntax_highlighting | default: {} -%}
|
|
12
|
+
{%- assign prism_cdn = syntax.cdn | default: 'https://cdn.jsdelivr.net/npm/prismjs@1.29.0' -%}
|
|
13
|
+
{%- assign default_components = 'python|r|sql|julia|javascript' | split: '|' -%}
|
|
14
|
+
{%- assign prism_components = syntax.components | default: default_components -%}
|
|
15
|
+
{%- if include.location == 'head' -%}
|
|
16
|
+
<script defer src="{{ (prism_cdn | append: '/prism.min.js') | add_sri }}"></script>
|
|
17
|
+
{%- for component in prism_components -%}
|
|
18
|
+
{%- unless component == 'core' -%}
|
|
19
|
+
<script defer src="{{ (prism_cdn | append: '/components/prism-' | append: component | append: '.min.js') | add_sri }}"></script>
|
|
20
|
+
{%- endunless -%}
|
|
21
|
+
{%- endfor -%}
|
|
22
|
+
<script defer src="{{ (prism_cdn | append: '/plugins/normalize-whitespace/prism-normalize-whitespace.min.js') | add_sri }}"></script>
|
|
23
|
+
{%- elsif include.location == 'body' -%}
|
|
24
|
+
{%- assign publications = site.data.publications | default: {} -%}
|
|
25
|
+
<script nonce="{{ page.csp_nonce }}">
|
|
26
|
+
window.DatalogAcademic = {{ site.data.academic | jsonify }};
|
|
27
|
+
window.DatalogPublications = {
|
|
28
|
+
"metrics": {{ publications.metrics | jsonify }},
|
|
29
|
+
"bibliography": {{ publications.bibliography | jsonify }},
|
|
30
|
+
"citation_totals": {{ publications.citation_totals | jsonify }},
|
|
31
|
+
"yearly_totals": {{ publications.yearly_totals | jsonify }}
|
|
32
|
+
};
|
|
33
|
+
</script>
|
|
34
|
+
{% include scripts.html %}
|
|
35
|
+
<script nonce="{{ page.csp_nonce }}">
|
|
36
|
+
window.DatalogTheme = {{ site.theme_options | jsonify }};
|
|
37
|
+
window.DatalogIntegrations = {{ site.integrations | jsonify }};
|
|
38
|
+
window.DatalogContent = {{ site.content | jsonify }};
|
|
39
|
+
</script>
|
|
40
|
+
<script nonce="{{ page.csp_nonce }}">
|
|
41
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
42
|
+
if (window.Prism && window.Prism.plugins && window.Prism.plugins.NormalizeWhitespace) {
|
|
43
|
+
Prism.plugins.NormalizeWhitespace.setDefaults({
|
|
44
|
+
'remove-trailing': true,
|
|
45
|
+
'remove-indent': true,
|
|
46
|
+
'left-trim': true,
|
|
47
|
+
'right-trim': true
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
</script>
|
|
52
|
+
{%- endif -%}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
---
|
|
3
|
+
required:
|
|
4
|
+
- page
|
|
5
|
+
optional:
|
|
6
|
+
- limit
|
|
7
|
+
- date_format
|
|
8
|
+
---
|
|
9
|
+
Builds a list of related posts based on overlapping tags or categories.
|
|
10
|
+
Falls back to a friendly message when no related content is available.
|
|
11
|
+
{%- endcomment -%}
|
|
12
|
+
{%- assign related_limit = include.limit | default: 3 -%}
|
|
13
|
+
{%- assign source_posts = site.collections.posts.docs | default: site.posts | default: '' | split: '' -%}
|
|
14
|
+
{%- assign layout_filtered = source_posts | where: 'layout', 'post' -%}
|
|
15
|
+
{%- assign collection_filtered = source_posts | where: 'collection', 'posts' -%}
|
|
16
|
+
{%- assign candidate_posts = layout_filtered | concat: collection_filtered -%}
|
|
17
|
+
{%- assign sorted_candidates = candidate_posts | sort: 'date' | reverse -%}
|
|
18
|
+
{%- assign rendered_count = 0 -%}
|
|
19
|
+
<section class="post-related" aria-labelledby="post-related-heading">
|
|
20
|
+
<h2 id="post-related-heading">Related posts</h2>
|
|
21
|
+
<ul class="post-related-list">
|
|
22
|
+
{%- for candidate in sorted_candidates -%}
|
|
23
|
+
{%- if candidate.url != include.page.url and rendered_count < related_limit -%}
|
|
24
|
+
{%- assign overlap = 0 -%}
|
|
25
|
+
{%- if include.page.tags and candidate.tags -%}
|
|
26
|
+
{%- for tag in include.page.tags -%}
|
|
27
|
+
{%- if candidate.tags contains tag -%}
|
|
28
|
+
{%- assign overlap = overlap | plus: 1 -%}
|
|
29
|
+
{%- endif -%}
|
|
30
|
+
{%- endfor -%}
|
|
31
|
+
{%- endif -%}
|
|
32
|
+
{%- assign category_match = false -%}
|
|
33
|
+
{%- if include.page.categories and candidate.categories -%}
|
|
34
|
+
{%- for category in include.page.categories -%}
|
|
35
|
+
{%- if candidate.categories contains category -%}
|
|
36
|
+
{%- assign category_match = true -%}
|
|
37
|
+
{%- endif -%}
|
|
38
|
+
{%- endfor -%}
|
|
39
|
+
{%- endif -%}
|
|
40
|
+
{%- if overlap > 0 or category_match -%}
|
|
41
|
+
{%- assign rendered_count = rendered_count | plus: 1 -%}
|
|
42
|
+
<li>
|
|
43
|
+
<article class="related-post">
|
|
44
|
+
{%- if candidate.teaser -%}
|
|
45
|
+
<a class="related-post__media" href="{{ candidate.url | relative_url }}" tabindex="-1" aria-hidden="true"><img src="{{ candidate.teaser | relative_url }}" alt="" loading="lazy" decoding="async" /></a>
|
|
46
|
+
{%- endif -%}
|
|
47
|
+
<h3><a href="{{ candidate.url | relative_url }}">{{ candidate.title }}</a></h3>
|
|
48
|
+
<p class="related-post-meta">
|
|
49
|
+
{% include helpers/date-format.html date=candidate.date format=include.date_format %} · {{ candidate.excerpt | strip_html | default: '' | truncate: 140 }}
|
|
50
|
+
</p>
|
|
51
|
+
{%- if candidate.tags -%}
|
|
52
|
+
<p class="related-post-tags">Topics: {% include helpers/array-to-sentence.html items=candidate.tags %}</p>
|
|
53
|
+
{%- endif -%}
|
|
54
|
+
</article>
|
|
55
|
+
</li>
|
|
56
|
+
{%- endif -%}
|
|
57
|
+
{%- endif -%}
|
|
58
|
+
{%- endfor -%}
|
|
59
|
+
{%- if rendered_count == 0 -%}
|
|
60
|
+
<li>No related posts yet. Explore the archive for more content.</li>
|
|
61
|
+
{%- endif -%}
|
|
62
|
+
</ul>
|
|
63
|
+
</section>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{% assign math_settings = site.theme_options.math %}
|
|
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 %}
|
|
10
|
+
{% assign js_manifest = site.data.js_manifest %}
|
|
11
|
+
|
|
12
|
+
{% if site.features.search %}
|
|
13
|
+
{% assign search_flag = 'auto' %}
|
|
14
|
+
{% else %}
|
|
15
|
+
{% assign search_flag = 'false' %}
|
|
16
|
+
{% endif %}
|
|
17
|
+
|
|
18
|
+
{% if site.features.visualizations %}
|
|
19
|
+
{% assign visualizations_flag = 'auto' %}
|
|
20
|
+
{% else %}
|
|
21
|
+
{% assign visualizations_flag = 'false' %}
|
|
22
|
+
{% endif %}
|
|
23
|
+
|
|
24
|
+
{% if math_enabled and math_engine == 'mathjax' %}
|
|
25
|
+
{% assign math_flag = 'true' %}
|
|
26
|
+
{% else %}
|
|
27
|
+
{% assign math_flag = 'false' %}
|
|
28
|
+
{% endif %}
|
|
29
|
+
|
|
30
|
+
{% if page.notebook_post %}
|
|
31
|
+
{% assign notebook_flag = 'true' %}
|
|
32
|
+
{% else %}
|
|
33
|
+
{% assign notebook_flag = 'false' %}
|
|
34
|
+
{% endif %}
|
|
35
|
+
|
|
36
|
+
{% if site.features.academic_dashboard or site.features.citation_tracking %}
|
|
37
|
+
{% assign academic_flag = 'auto' %}
|
|
38
|
+
{% else %}
|
|
39
|
+
{% assign academic_flag = 'false' %}
|
|
40
|
+
{% endif %}
|
|
41
|
+
|
|
42
|
+
<script nonce="{{ page.csp_nonce }}">
|
|
43
|
+
(function () {
|
|
44
|
+
const body = document.body;
|
|
45
|
+
if (!body) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
body.dataset.featureSearch = "{{ search_flag }}";
|
|
49
|
+
body.dataset.featureVisualizations = "{{ visualizations_flag }}";
|
|
50
|
+
body.dataset.featureMath = "{{ math_flag }}";
|
|
51
|
+
body.dataset.featureNotebook = "{{ notebook_flag }}";
|
|
52
|
+
body.dataset.featureAcademic = "{{ academic_flag }}";
|
|
53
|
+
})();
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
{% if js_manifest %}
|
|
57
|
+
<script id="datalog-js-manifest" type="application/json" nonce="{{ page.csp_nonce }}">{{ js_manifest | jsonify }}</script>
|
|
58
|
+
{% endif %}
|
|
59
|
+
|
|
60
|
+
{% assign loader_src = js_manifest.loader | default: '/assets/js/loader.js' %}
|
|
61
|
+
<script type="module" src="{{ loader_src | relative_url }}"></script>
|
|
62
|
+
{% if jekyll.environment != 'production' %}
|
|
63
|
+
<script nonce="{{ page.csp_nonce }}">
|
|
64
|
+
window.addEventListener('securitypolicyviolation', function (event) {
|
|
65
|
+
console.warn('CSP violation blocked', {
|
|
66
|
+
blocked: event.blockedURI,
|
|
67
|
+
directive: event.violatedDirective,
|
|
68
|
+
lineNumber: event.lineNumber
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
72
|
+
{% endif %}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<a class="skip-link" href="#main-content">{% t 'global.skip_to_main' %}</a>
|
data/_includes/toc.html
ADDED