-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bfe98d
commit ed701aa
Showing
172 changed files
with
14,656 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
source "https://rubygems.org/" | ||
gem "jekyll-remote-theme" | ||
gem "webrick" | ||
gem "csv" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Document Statement | ||
|
||
## templates | ||
|
||
Template files for this theme | ||
|
||
## common | ||
|
||
Some common variables and code snippets are designed to be shared by multiple themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- include common/rest/site_pages.liquid -%} | ||
|
||
{{- site_pages | jsonify -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
User-agent: * | ||
Allow: / | ||
|
||
Sitemap: {{ "sitemap.xml" | absolute_url }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{%- include common/rest/site_pages.liquid -%} | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
{%- for page in site_pages -%} | ||
<url> | ||
<loc>{{ page.url | absolute_url | xml_escape }}</loc> | ||
<priority>{{ page.content | size | divided_by: 2048.0 | times: 10 | ceil | divided_by: 10.0 | at_least: 0.1 | at_most: 1.0 }}</priority> | ||
</url> | ||
{%- endfor %} | ||
</urlset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
self.addEventListener("activate", function (event) { | ||
const current = ["{{ theme_alias }}"]; | ||
|
||
event.waitUntil( | ||
caches.keys().then(function (keyList) { | ||
return Promise.all( | ||
keyList.map(function (key) { | ||
if (current.indexOf(key) === -1) { | ||
return caches.delete(key); | ||
} | ||
}) | ||
); | ||
}) | ||
); | ||
}); | ||
|
||
self.addEventListener("fetch", function (e) { | ||
if (e.request.url.match("{{ theme_alias }}")) { | ||
e.respondWith( | ||
caches.match(e.request).then(function (resp) { | ||
if (resp !== undefined) { | ||
return resp; | ||
} else { | ||
return fetch(e.request, { | ||
cache: "no-store", | ||
}) | ||
.then(function (resp) { | ||
let clone = resp.clone(); | ||
caches.open("{{ theme_alias }}").then(function (cache) { | ||
cache.put(e.request, clone); | ||
}); | ||
return resp; | ||
}) | ||
.catch(console.log); | ||
} | ||
}) | ||
); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{%- include common/rest/site_pages.liquid -%} | ||
{%- include common/rest/workdir.liquid -%} | ||
|
||
{%- assign base = page.dir | append: "temp/" | split: "/" | size -%} | ||
{%- assign size = workdir_level | minus: base -%} | ||
{%- assign size_p1 = size | plus: 1 -%} | ||
|
||
{%- assign dir = site_pages | where: "url", workdir | first %} | ||
{% include common/rest/tabs.liquid size=size %}- [{{ dir.title | default: dir.url }}]({{ dir.url | relative_url }}) | ||
|
||
{%- for item in workdir_files %} | ||
{% include common/rest/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.name }}]({{ item.url | relative_url }}) | ||
{%- endfor -%} | ||
|
||
{%- for workdir in workdir_dirs %}{% include common/core/_list.liquid %}{% endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{%- include common/rest/site_pages.liquid -%} | ||
{%- include common/rest/workdir.liquid workdir=page.dir -%} | ||
|
||
{%- for item in workdir_files %} | ||
- [{{ item.title | default: item.name }}]({{ item.url | relative_url }}) | ||
{%- endfor -%} | ||
|
||
{%- if include.all -%} | ||
{%- for workdir in workdir_dirs %}{% include common/core/_list.liquid %}{% endfor -%} | ||
{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{%- if site.google.adsense -%} | ||
<script data-ad-client="{{ site.google.adsense }}" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | ||
{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{%- if site.google.gtag -%} | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google.gtag }}"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag() { | ||
dataLayer.push(arguments); | ||
} | ||
gtag("js", new Date()); | ||
gtag("config", "{{ site.google.gtag }}"); | ||
</script> | ||
{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{%- comment %} dns-prefetch {% endcomment %} | ||
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net"> | ||
|
||
{%- comment %} canonical link {% endcomment -%} | ||
{%- if prev -%} | ||
<link rel="prev" href="{{ prev.url | absolute_url }}"> | ||
{%- endif -%} | ||
|
||
{%- if next -%} | ||
<link rel="next" href="{{ next.url | absolute_url }}"> | ||
{%- endif -%} | ||
|
||
<link rel="canonical" href="{{ schema_surl }}"> | ||
|
||
{%- comment %} favicon icon {% endcomment -%} | ||
<link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/images/favicon.svg"> | ||
{%- comment %} alternate {% endcomment -%} | ||
<link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/images/favicon-16x16.png" sizes="16x16"> | ||
<link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/images/favicon-32x32.png" sizes="32x32"> | ||
<link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/images/favicon-96x96.png" sizes="96x96"> | ||
|
||
{%- comment %} safari {% endcomment -%} | ||
<link rel="mask-icon" href="{{ site.baseurl }}/assets/images/favicon.svg" color="{{ theme_color }}"> | ||
|
||
{%- comment %} apple-touch-icon {% endcomment -%} | ||
<link rel="apple-touch-icon" href="{{ site.baseurl }}/assets/images/apple-touch-icon-300x300.jpg"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{%- if page.content contains "$$" -%} | ||
<script> | ||
window.MathJax = {% if site.mathjax %}{{ site.mathjax | jsonify }}{% else %}{}{% endif %}; | ||
</script> | ||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax/es5/tex-svg-full.js"></script> | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{%- if content contains '<code class="language-mermaid">' -%} | ||
{%- if site.mermaid.custom -%} | ||
<script src="{{ site.mermaid.custom }}"></script> | ||
{%- else -%} | ||
<script src="{{ base }}/assets/js/mermaid.min.js"></script> | ||
{%- endif %} | ||
<script> | ||
mermaid.initialize({% if site.mermaid.initialize %}{{ site.mermaid.initialize | jsonify }}{% else %}{}{% endif %}); | ||
</script> | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=no"> | ||
<meta name="description" content="{{ description }}"> | ||
<meta name="revised" content="{{ docs.build_revision }}"> | ||
<meta name="author" content="{{ author }}"> | ||
<meta name="generator" content="{{ generator }} v{{ version }}"> | ||
|
||
{%- for meta in site.meta -%} | ||
<meta name="{{ meta.first }}" content="{{ meta.last }}"> | ||
{%- endfor -%} | ||
|
||
<meta name="theme-color" content="{{ theme_color }}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<meta property="og:title" content="{{ title }}"> | ||
<meta property="og:description" content="{{ description }}"> | ||
<meta property="og:locale" content="{{ lang }}"> | ||
<meta property="og:url" content="{{ schema_surl }}"> | ||
<meta property="og:type" content="article"> | ||
<meta property="article:author" content="{{ author }}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{%- assign content = content | ||
| replace: "’", "'" | ||
| replace: "“", '"' | ||
| replace: "”", '"' | ||
| replace: "<script", '<script async' | ||
| replace: "highlighter-rouge", "highlighter-rouge notranslate" -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{%- include common/rest/site_pages.liquid -%} | ||
{%- include common/rest/i18n.liquid -%} | ||
{%- include common/rest/variables.liquid -%} | ||
{%- include common/rest/content.liquid -%} | ||
{%- include common/rest/nav.liquid -%} | ||
{%- include common/rest/title.liquid -%} | ||
{%- include common/rest/description.liquid -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{%- assign description = content | ||
| strip_html | ||
| split: " " | ||
| join: " " | ||
| escape | ||
| truncate: 150 -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{%- assign __ = site.translate | default: site.data.translate -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{%- include common/rest/workdir.liquid workdir=page.dir -%} | ||
|
||
{% comment %} prev and next {% endcomment %} | ||
{%- assign index = 0 -%} | ||
{%- for item in workdir_files %} | ||
{%- if item.url == page.url %} | ||
{%- assign index = forloop.index -%} | ||
{%- endif %} | ||
{%- endfor -%} | ||
|
||
{%- for item in workdir_files -%} | ||
{%- assign index_prev = index | minus: 1 -%} | ||
{%- assign index_next = index | plus: 1 -%} | ||
{%- if forloop.index == index_prev -%} | ||
{%- assign prev = item -%} | ||
{%- endif %} | ||
{%- if forloop.index == index_next -%} | ||
{%- assign next = item -%} | ||
{%- endif %} | ||
{%- endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{%- assign site_pages = site.html_pages | ||
| sort: "path" | ||
| sort: "sort" | ||
| where_exp: "item", "item.url != '/404.html'" | ||
| where_exp: "item", "item.url != '/search.html'" -%} | ||
|
||
{%- assign site_dirs = site_pages | where_exp: "item", "item.dir == item.url" -%} | ||
{%- assign site_files = site_pages | where_exp: "item", "item.dir != item.url" -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{%- assign tab = " " -%} | ||
{%- for temp in (1..include.size) %}{{ tab }}{% endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{%- case page.url -%} | ||
{%- when "/" -%} | ||
{%- assign title = site.title | ||
| append: " · " | ||
| append: site.description | truncate: 110 -%} | ||
{%- when "/search.html" -%} | ||
{%- assign title = __.search | default: "Search" | ||
| append: " · " | ||
| append: site.title | truncate: 110 -%} | ||
{%- when "/404.html" -%} | ||
{%- assign title = "404" | ||
| append: " · " | ||
| append: site.title | truncate: 110 -%} | ||
{%- else -%} | ||
{%- assign title = page.title | default: page.name | ||
| append: " · " | ||
| append: site.title | truncate: 110 -%} | ||
{%- endcase -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{%- comment %} variables {% endcomment -%} | ||
{%- assign version = theme_alias | split: "@" | last -%} | ||
{%- assign docs = site.github -%} | ||
{%- assign rest = docs.public_repositories | where: "html_url", docs.repository_url | first -%} | ||
|
||
{%- assign rest_created_at = rest.created_at | default: site.time -%} | ||
{%- assign rest_updated_at = rest.updated_at | default: site.time -%} | ||
|
||
{%- comment %} defaults {% endcomment -%} | ||
{%- assign direction = site.direction | default: "auto" -%} | ||
{%- assign lang = site.lang | default: "en" -%} | ||
{%- assign author = docs.owner.name | default: docs.owner_name -%} | ||
|
||
{%- capture generator -%} | ||
{%- if site.remote_theme -%} | ||
{{- theme_alias | split: "@" | first -}} | ||
{%- else -%} | ||
{{- theme_alias | split: "@" | first | split: "/" | last -}} | ||
{%- endif -%} | ||
{%- endcapture -%} | ||
|
||
{%- comment %} schema {% endcomment -%} | ||
{%- assign schema_surl = page.url | absolute_url | xml_escape -%} | ||
|
||
{% comment %} debug {% endcomment %} | ||
{%- if site.debug -%} | ||
{%- assign base = site.baseurl -%} | ||
{%- else -%} | ||
{%- assign base = "https://cdn.jsdelivr.net/gh/" | append: theme_alias -%} | ||
{%- endif -%} | ||
|
||
{% comment %} extra {% endcomment %} | ||
{%- capture extra_scss -%} | ||
{%- include extra/styles.scss -%} {{- site.scss -}} | ||
{%- endcapture -%} | ||
|
||
{%- capture extra_script -%} | ||
{%- include extra/script.js -%} {{- site.script -}} | ||
{%- endcapture -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{%- assign workdir = include.workdir | default: "/" -%} | ||
|
||
{%- assign workdir_level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size -%} | ||
{%- assign workdir_files = site_files | where_exp: "item", "item.dir == workdir" -%} | ||
|
||
{%- capture items -%} | ||
{%- for item in site_dirs -%} | ||
{%- assign current_m1 = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 1 -%} | ||
{%- if workdir_level == current_m1 -%} | ||
{%- assign temp = workdir | append: "@@" -%} | ||
{%- assign dir = item.dir | replace: workdir, temp | split: "@@" | first -%} | ||
{% comment %} In the current subdirectory {% endcomment %} | ||
{%- if workdir == dir -%} | ||
{{ item.dir }}| | ||
{%- endif -%} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
{%- endcapture -%} | ||
{%- assign workdir_dirs = items | split: "|" -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script type="application/ld+json"> | ||
{ | ||
"@context": "https://schema.org", | ||
"@type": "Article", | ||
"mainEntityOfPage": { | ||
"@type": "WebPage", | ||
"@id": "{{ schema_surl }}" | ||
}, | ||
"headline": "{{ title }}", | ||
"image": [{% for image in page.images %}"{{ image }}"{% unless forloop.last %},{% endunless %}{% endfor %}], | ||
"author": { | ||
"@type": "Person", | ||
"name": "{{ author }}" | ||
}, | ||
"publisher": { | ||
"@type": "{{ docs.owner.type }}", | ||
"name": "{{ author }}", | ||
"logo": { | ||
"@type": "ImageObject", | ||
"url": "{{ docs.owner.avatar_url }}" | ||
} | ||
}, | ||
"description": "{{ description }}" | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script> | ||
window.ui = { | ||
title: "{{ site.title }}", | ||
baseurl: "{{ site.baseurl }}", | ||
i18n: { | ||
search_results: "{{ __.search_results | default: 'Search Results' }}", | ||
search_results_found: "{{ __.search_results_found | default: 'Search finished, found # page(s) matching the search query.' }}", | ||
search_results_not_found: "{{ __.search_results_not_found | default: 'Your search did not match any documents, please make sure that all characters are spelled correctly!' }}" | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<title>{{ title }}</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<meta name="twitter:title" content="{{ title }}"> | ||
<meta name="twitter:description" content="{{ description }}"> | ||
<meta name="twitter:card" content="summary"> | ||
<meta name="twitter:site" content="@{{ author }}"> | ||
<meta name="twitter:url" content="{{ schema_surl }}"> | ||
<meta name="twitter:creator" content="@{{ generator }} v{{ version }}"> |
Oops, something went wrong.