jekyll-rtd-theme 1.1.7 → 2.0.0.pre.beta
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/README.md +9 -9
- data/_includes/addons/analytics.liquid +5 -12
- data/_includes/addons/github.liquid +16 -18
- data/_includes/assets/sw.caches.js +38 -28
- data/_includes/breadcrumbs.liquid +20 -36
- data/_includes/extend/toctree.liquid +6 -15
- data/_includes/footer.liquid +29 -32
- data/_includes/reset/defaults.liquid +3 -37
- data/_includes/reset/workdir.liquid +1 -14
- data/_includes/safe/shortcodes.liquid +9 -0
- data/_includes/shortcodes/danger.liquid +7 -0
- data/_includes/shortcodes/mermaid.liquid +1 -0
- data/_includes/shortcodes/note.liquid +7 -0
- data/_includes/shortcodes/tip.liquid +7 -0
- data/_includes/shortcodes/warning.liquid +7 -0
- data/_includes/toctree.liquid +2 -5
- data/_layouts/default.liquid +90 -147
- data/_layouts/plugins/compress.liquid +13 -10
- data/_layouts/plugins/extension.liquid +30 -22
- data/_sass/@primer/base/base.scss +90 -0
- data/_sass/@primer/base/index.scss +6 -0
- data/_sass/@primer/base/kbd.scss +21 -0
- data/_sass/@primer/base/normalize.scss +423 -0
- data/_sass/@primer/base/typography-base.scss +100 -0
- data/_sass/@primer/breadcrumb/breadcrumb.scss +28 -0
- data/_sass/@primer/breadcrumb/index.scss +3 -0
- data/_sass/@primer/buttons/button-group.scss +91 -0
- data/_sass/@primer/buttons/button.scss +296 -0
- data/_sass/@primer/buttons/index.scss +4 -0
- data/_sass/@primer/buttons/misc.scss +205 -0
- data/_sass/@primer/forms/form-control.scss +278 -0
- data/_sass/@primer/forms/form-group.scss +279 -0
- data/_sass/@primer/forms/form-select.scss +38 -0
- data/_sass/@primer/forms/form-validation.scss +369 -0
- data/_sass/@primer/forms/index.scss +7 -0
- data/_sass/@primer/forms/input-group.scss +53 -0
- data/_sass/@primer/forms/radio-group.scss +43 -0
- data/_sass/@primer/markdown/blob-csv.scss +31 -0
- data/_sass/@primer/markdown/code.scss +73 -0
- data/_sass/@primer/markdown/headings.scss +72 -0
- data/_sass/@primer/markdown/images.scss +131 -0
- data/_sass/@primer/markdown/index.scss +8 -0
- data/_sass/@primer/markdown/lists.scss +76 -0
- data/_sass/@primer/markdown/markdown-body.scss +99 -0
- data/_sass/@primer/markdown/tables.scss +38 -0
- data/_sass/@primer/support/index.scss +11 -0
- data/_sass/@primer/support/mixins/buttons.scss +184 -0
- data/_sass/@primer/support/mixins/layout.scss +55 -0
- data/_sass/@primer/support/mixins/misc.scss +32 -0
- data/_sass/@primer/support/mixins/typography.scss +88 -0
- data/_sass/@primer/support/variables/color-system.scss +243 -0
- data/_sass/@primer/support/variables/colors.scss +55 -0
- data/_sass/@primer/support/variables/layout.scss +149 -0
- data/_sass/@primer/support/variables/misc.scss +42 -0
- data/_sass/@primer/support/variables/typography.scss +43 -0
- data/_sass/@primer/utilities/animations.scss +187 -0
- data/_sass/@primer/utilities/borders.scss +184 -0
- data/_sass/@primer/utilities/box-shadow.scss +25 -0
- data/_sass/@primer/utilities/colors.scss +185 -0
- data/_sass/@primer/utilities/details.scss +34 -0
- data/_sass/@primer/utilities/flexbox.scss +121 -0
- data/_sass/@primer/utilities/index.scss +14 -0
- data/_sass/@primer/utilities/layout.scss +134 -0
- data/_sass/@primer/utilities/margin.scss +68 -0
- data/_sass/@primer/utilities/padding.scss +59 -0
- data/_sass/@primer/utilities/typography.scss +325 -0
- data/_sass/@primer/utilities/visibility-display.scss +82 -0
- data/_sass/_font-face.scss +65 -0
- data/_sass/_icons.scss +53 -0
- data/_sass/_layout.scss +76 -0
- data/_sass/_reset.scss +21 -0
- data/_sass/_root.scss +9 -0
- data/_sass/_variables.scss +29 -0
- data/_sass/class/addons-wrap.scss +39 -0
- data/_sass/class/container.scss +11 -0
- data/_sass/class/content-wrap.scss +4 -0
- data/_sass/class/header.scss +10 -0
- data/_sass/class/highlight.scss +214 -0
- data/_sass/class/markdown-body.scss +49 -0
- data/_sass/class/sidebar-wrap.scss +72 -0
- data/_sass/class/title.scss +13 -0
- data/_sass/theme.scss +29 -0
- data/assets/404.liquid +2 -4
- data/assets/css/theme.min.css +1 -0
- data/assets/css/theme.scss +4 -0
- data/assets/js/mermaid.min.js +6 -5
- data/assets/js/search.js +90 -0
- data/assets/js/theme.js +228 -0
- data/assets/js/theme.min.js +1 -0
- data/assets/search.liquid +5 -12
- metadata +79 -56
- data/_includes/addons.liquid +0 -28
- data/_includes/addons/i18n.liquid +0 -13
- data/_includes/addons/plugins.liquid +0 -6
- data/_includes/album.liquid +0 -7
- data/_includes/assets/common.js +0 -167
- data/_includes/assets/custom.js +0 -0
- data/_includes/assets/custom.scss +0 -0
- data/_includes/assets/search.js +0 -76
- data/_includes/extra/footer.html +0 -0
- data/_includes/extra/head.html +0 -0
- data/_includes/i18n/en.liquid +0 -29
- data/_includes/i18n/es.liquid +0 -29
- data/_includes/i18n/fr.liquid +0 -29
- data/_includes/i18n/it.liquid +0 -29
- data/_includes/i18n/ja.liquid +0 -29
- data/_includes/i18n/ko.liquid +0 -29
- data/_includes/i18n/ru.liquid +0 -29
- data/_includes/i18n/sv.liquid +0 -29
- data/_includes/i18n/zh-cn.liquid +0 -29
- data/_includes/reset/i18n.liquid +0 -31
- data/_includes/reset/languages.liquid +0 -110
- data/_sass/_album.scss +0 -19
- data/_sass/_embed.scss +0 -23
- data/_sass/fluid.scss +0 -7
- data/_sass/jekyll-rtd-theme.scss +0 -162
- data/assets/css/rougify/base16.css +0 -1
- data/assets/css/rougify/base16.dark.css +0 -1
- data/assets/css/rougify/base16.light.css +0 -1
- data/assets/css/rougify/base16.monokai.css +0 -1
- data/assets/css/rougify/base16.monokai.dark.css +0 -1
- data/assets/css/rougify/base16.monokai.light.css +0 -1
- data/assets/css/rougify/base16.solarized.css +0 -1
- data/assets/css/rougify/base16.solarized.dark.css +0 -1
- data/assets/css/rougify/base16.solarized.light.css +0 -1
- data/assets/css/rougify/bw.css +0 -1
- data/assets/css/rougify/colorful.css +0 -1
- data/assets/css/rougify/github.css +0 -1
- data/assets/css/rougify/gruvbox.css +0 -1
- data/assets/css/rougify/gruvbox.dark.css +0 -1
- data/assets/css/rougify/gruvbox.light.css +0 -1
- data/assets/css/rougify/igorpro.css +0 -1
- data/assets/css/rougify/magritte.css +0 -1
- data/assets/css/rougify/molokai.css +0 -1
- data/assets/css/rougify/monokai.css +0 -1
- data/assets/css/rougify/monokai.sublime.css +0 -1
- data/assets/css/rougify/pastie.css +0 -1
- data/assets/css/rougify/thankful_eyes.css +0 -1
- data/assets/css/rougify/tulip.css +0 -1
- data/assets/css/theme.css +0 -4
- data/assets/js/anchor.min.js +0 -9
- data/assets/js/html5shiv.min.js +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div class="mermaid overflow-x-auto">{{ codes }}</div>
|
data/_includes/toctree.liquid
CHANGED
|
@@ -4,14 +4,11 @@
|
|
|
4
4
|
<ul>
|
|
5
5
|
{%- for item in workdir_files -%}
|
|
6
6
|
{%- assign level = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size -%}
|
|
7
|
-
{%- if site_lang != lang -%}
|
|
8
|
-
{%- assign level = level | minus: 1 -%}
|
|
9
|
-
{%- endif -%}
|
|
10
7
|
{%- capture current -%}
|
|
11
8
|
{%- if page.url == item.url %}current{% endif -%}
|
|
12
9
|
{%- endcapture %}
|
|
13
|
-
<li class="
|
|
14
|
-
<a class="
|
|
10
|
+
<li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
|
|
11
|
+
<a class="d-flex {{ current }}" href="{{ item.url | relative_url }}">
|
|
15
12
|
{%- if item.sort and site.show_sorted != false -%}
|
|
16
13
|
{{ item.sort }}. {{ item.title | default: item.url }}
|
|
17
14
|
{%- else -%}
|
data/_layouts/default.liquid
CHANGED
|
@@ -5,54 +5,26 @@ layout: plugins/compress
|
|
|
5
5
|
{%- include reset/defaults.liquid -%}
|
|
6
6
|
|
|
7
7
|
<!DOCTYPE html>
|
|
8
|
-
|
|
9
|
-
<!--
|
|
10
|
-
{% if site.remote_theme -%}
|
|
11
|
-
rundocs.io, remote_theme: {{ site.remote_theme }}, based on v{{ version }}
|
|
12
|
-
{%- else -%}
|
|
13
|
-
rundocs.io, theme: {{ site.theme | default: "jekyll-rtd-theme, based on" }} v{{ version }}
|
|
14
|
-
{%- endif %}
|
|
15
|
-
-->
|
|
16
|
-
|
|
17
|
-
<html class="writer-html5" lang="{{ lang }}">
|
|
8
|
+
<html lang="{{ site.lang }}">
|
|
18
9
|
|
|
19
10
|
<head>
|
|
20
11
|
<meta charset="utf-8">
|
|
21
12
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
22
13
|
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
|
23
14
|
<title>{{ title | truncate: 110 }}</title>
|
|
24
|
-
<script>
|
|
25
|
-
window.dataLayer = window.dataLayer || [];
|
|
26
|
-
|
|
27
|
-
function gtag() {
|
|
28
|
-
dataLayer.push(arguments);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function debug() {
|
|
32
|
-
console.debug.apply(console, arguments);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
gtag("js", new Date());
|
|
36
|
-
|
|
37
|
-
if ("serviceWorker" in navigator) {
|
|
38
|
-
navigator.serviceWorker.register("{{ site.baseurl }}/sw.caches.js");
|
|
39
|
-
} else {
|
|
40
|
-
debug("Service Worker not supported!");
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
15
|
<!-- meta -->
|
|
44
16
|
<meta name="description" content="{{ description }}">
|
|
45
|
-
<meta name="author" content="{{
|
|
46
|
-
<meta name="revised" content="{{
|
|
17
|
+
<meta name="author" content="{{ site.github.owner_name }}">
|
|
18
|
+
<meta name="revised" content="{{ site.github.build_revision }}">
|
|
47
19
|
<meta name="generator" content="jekyll-rtd-theme v{{ version }}">
|
|
48
20
|
<!-- meta-ogp -->
|
|
49
21
|
{% comment %} https://ogp.me {% endcomment %}
|
|
50
22
|
<meta property="og:title" content="{{ title }}">
|
|
51
23
|
<meta property="og:description" content="{{ description }}">
|
|
52
|
-
<meta property="og:locale" content="{{ lang }}">
|
|
24
|
+
<meta property="og:locale" content="{{ site.lang }}">
|
|
53
25
|
<meta property="og:url" content="{{ schema_surl }}">
|
|
54
26
|
<meta property="og:type" content="article">
|
|
55
|
-
<meta property="article:author" content="{{
|
|
27
|
+
<meta property="article:author" content="{{ site.github.owner_name }}">
|
|
56
28
|
<meta property="article:published_time" content="{{ schema_date }}">
|
|
57
29
|
<meta property="article:modified_time" content="{{ schema_modi }}">
|
|
58
30
|
<!-- meta-custom -->
|
|
@@ -72,7 +44,7 @@ layout: plugins/compress
|
|
|
72
44
|
"image": [{% for image in page.images %}"{{ image }}"{% unless forloop.last %},{% endunless %}{% endfor %}],
|
|
73
45
|
"author": {
|
|
74
46
|
"@type": "Person",
|
|
75
|
-
"name": "{{
|
|
47
|
+
"name": "{{ site.github.owner_name }}"
|
|
76
48
|
},
|
|
77
49
|
"datePublished": "{{ schema_date }}",
|
|
78
50
|
"dateModified": "{{ schema_modi }}",
|
|
@@ -92,105 +64,107 @@ layout: plugins/compress
|
|
|
92
64
|
{% if prev %}<link rel="prev" href="{{ prev.url | absolute_url }}">{% endif %}
|
|
93
65
|
{% if next %}<link rel="next" href="{{ next.url | absolute_url }}">{% endif %}
|
|
94
66
|
<!-- theme -->
|
|
95
|
-
<link rel="stylesheet" href="{{ cdn }}/assets/css/theme.css">
|
|
96
|
-
<link rel="stylesheet" href="{{ cdn }}/assets/css/rougify/{{ site.rougify | default: 'github' }}.css">
|
|
97
|
-
<style>{{ site_scss | scssify | strip_newlines }}</style>
|
|
67
|
+
<link rel="stylesheet" href="{{ cdn }}/assets/css/theme{% if site.debug.dist != false %}.min{% endif %}.css">
|
|
98
68
|
<!-- icon -->
|
|
99
69
|
<link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/favicon.svg">
|
|
100
70
|
<!-- script -->
|
|
101
|
-
<!--[if lt IE 9]><script src="{{ cdn }}/assets/js/html5shiv.min.js"></script><![endif]-->
|
|
102
|
-
<script src="{{ cdn }}/assets/js/jquery.min.js"></script>
|
|
103
71
|
<script>
|
|
104
|
-
|
|
72
|
+
window.ui = {
|
|
105
73
|
baseurl: "{{ site.baseurl }}",
|
|
106
74
|
title: "{{ site.title }}",
|
|
107
|
-
lang: "{{ lang }}",
|
|
108
75
|
admonition: {
|
|
109
76
|
note: "{{ __note }}",
|
|
110
77
|
tip: "{{ __tip }}",
|
|
111
78
|
warning: "{{ __warning }}",
|
|
112
79
|
danger: "{{ __danger }}"
|
|
113
|
-
}
|
|
80
|
+
},
|
|
81
|
+
lang: "{{ site.lang }}",
|
|
82
|
+
version: "{{ version }}"
|
|
114
83
|
};
|
|
115
84
|
</script>
|
|
116
|
-
|
|
85
|
+
<!-- script -->
|
|
86
|
+
<script src="{{ cdn }}/assets/js/jquery.min.js"></script>
|
|
87
|
+
<script src="{{ cdn }}/assets/js/theme{% if site.debug.dist != false %}.min{% endif %}.js"></script>
|
|
88
|
+
|
|
117
89
|
</head>
|
|
118
90
|
|
|
119
|
-
<body class="
|
|
120
|
-
<div class="
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
{% endif %}
|
|
132
|
-
{% if site.nav_version and site.github_metadata != false %}
|
|
133
|
-
<div class="version">{{ site.github.latest_release.name }}</div>
|
|
134
|
-
{% endif %}
|
|
135
|
-
<div role="search">
|
|
136
|
-
<form id="rtd-search-form" class="wy-form" action="{{ site.baseurl }}/search.html" method="get" autocomplete="off">
|
|
137
|
-
<input type="text" name="q" placeholder="{{ __search_docs }}...">
|
|
138
|
-
<input type="hidden" name="lang" value="{{ lang }}">
|
|
139
|
-
</form>
|
|
140
|
-
</div>
|
|
91
|
+
<body class="container">
|
|
92
|
+
<div class="sidebar-wrap overflow-hidden">
|
|
93
|
+
<div class="sidebar d-flex flex-column height-full overflow-y-scroll overflow-x-hidden">
|
|
94
|
+
<div class="header d-flex flex-column p-3 text-center">
|
|
95
|
+
<div class="title pb-1 no-underline">
|
|
96
|
+
<a class="h4 py-1 px-2 rounded-1" href="{{ site.baseurl }}/">
|
|
97
|
+
{% if site.logo %}
|
|
98
|
+
<img class="logo" src="{{ site.baseurl }}/{{ site.logo }}" alt="{{ site.title }}">
|
|
99
|
+
{% else %}
|
|
100
|
+
<i class="fa fa-home"></i> {{ site.title }}
|
|
101
|
+
{% endif %}
|
|
102
|
+
</a>
|
|
141
103
|
</div>
|
|
142
|
-
<
|
|
143
|
-
{
|
|
144
|
-
<
|
|
145
|
-
|
|
104
|
+
<span class="version text-gray">{{ site.github.latest_release.name }}</span>
|
|
105
|
+
<form class="search pt-2" action="{{ site.baseurl }}/search.html" method="get" autocomplete="off">
|
|
106
|
+
<input class="form-control input-block input-sm" type="text" name="q" placeholder="{{ site.data.translate.search_docs | default: 'Search docs' }}...">
|
|
107
|
+
</form>
|
|
146
108
|
</div>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
154
|
-
<div class="wy-nav-title">
|
|
155
|
-
<a href="{{ site.baseurl }}/{% if site_lang != lang %}{{ lang }}/{% endif %}">{{ site.title }}</a>
|
|
156
|
-
</div>
|
|
109
|
+
<div class="toctree py-2" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
110
|
+
{% include toctree.liquid %}
|
|
111
|
+
</div>
|
|
112
|
+
<div class="embed-wrap">
|
|
113
|
+
<div class="embed p-2 m-3 rounded-2 text-blue bg-white">
|
|
114
|
+
{{ site.embed }}
|
|
157
115
|
</div>
|
|
158
|
-
</
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
script.setAttribute("data-timestamp", +new Date());
|
|
177
|
-
document.head.appendChild(script);
|
|
178
|
-
})(document.createElement("script"));
|
|
179
|
-
</script>
|
|
180
|
-
{% endif %}
|
|
181
|
-
</div>
|
|
182
|
-
{% include footer.liquid %}
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="content-wrap">
|
|
120
|
+
<div class="header d-flex flex-justify-between p-2 hide-lg hide-xl" aria-label="top navigation">
|
|
121
|
+
<button id="toggle" class="btn-octicon p-2 m-0 text-white" type="button">
|
|
122
|
+
<i class="fa fa-bars"></i>
|
|
123
|
+
</button>
|
|
124
|
+
<div class="title flex-1 no-underline d-flex flex-justify-center">
|
|
125
|
+
<a class="h4 py-1 px-2 rounded-1" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="content p-5">
|
|
129
|
+
{% include breadcrumbs.liquid %}
|
|
130
|
+
<hr>
|
|
131
|
+
<div role="main" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
132
|
+
<div class="markdown-body" itemprop="articleBody">
|
|
133
|
+
{{ content }}
|
|
183
134
|
</div>
|
|
184
135
|
</div>
|
|
185
|
-
|
|
136
|
+
{% include footer.liquid %}
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="addons-wrap d-flex flex-column overflow-y-auto">
|
|
140
|
+
<div class="status d-flex flex-justify-between p-2">
|
|
141
|
+
<div class="title p-1">
|
|
142
|
+
<i class="fa fa-book"></i> {{ site.title }}
|
|
143
|
+
</div>
|
|
144
|
+
<div class="branch p-1">
|
|
145
|
+
<span class="name">
|
|
146
|
+
{{ site.github.source.branch }}
|
|
147
|
+
</span>
|
|
148
|
+
<i class="fa fa-caret-down"></i>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="addons d-flex flex-column height-full p-2 d-none">
|
|
152
|
+
{%- assign items = "github, analytics" | split: ", " -%}
|
|
153
|
+
{% for item in items -%}
|
|
154
|
+
{% include addons/{{ item }}.liquid %}
|
|
155
|
+
{% endfor -%}
|
|
156
|
+
<hr>
|
|
157
|
+
<div class="generator f6 pb-2">
|
|
158
|
+
Built with
|
|
159
|
+
<a href="https://github.com/rundocs/jekyll-rtd-theme" target="_blank" title="{% if site.remote_theme %}remote{% endif %} theme v{{ version }}">jekyll-rtd-theme</a>
|
|
160
|
+
provided by
|
|
161
|
+
<a href="https://rundocs.io" target="_blank">RunDocs</a>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
186
164
|
</div>
|
|
187
|
-
{%- if site.addons %}{% include addons.liquid %}{% endif %}
|
|
188
|
-
{% include extra/footer.html %}
|
|
189
|
-
<!-- script -->
|
|
190
|
-
<script src="{{ cdn }}/assets/js/anchor.min.js"></script>
|
|
191
165
|
|
|
192
|
-
{
|
|
193
|
-
{%- if content contains '<
|
|
166
|
+
{%- comment %} mermaid {% endcomment -%}
|
|
167
|
+
{%- if content contains '<code class="language-mermaid">' -%}
|
|
194
168
|
{%- if site.mermaid.custom -%}
|
|
195
169
|
<script src="{{ site.mermaid.custom }}"></script>
|
|
196
170
|
{%- else -%}
|
|
@@ -200,50 +174,19 @@ layout: plugins/compress
|
|
|
200
174
|
mermaid.initialize({% if site.mermaid.initialize %}{{ site.mermaid.initialize | jsonify }}{% else %}{}{% endif %});
|
|
201
175
|
</script>
|
|
202
176
|
{%- endif %}
|
|
203
|
-
<script>
|
|
204
|
-
{% include assets/common.js %}
|
|
205
|
-
{% include assets/custom.js %} {{ site.script }}
|
|
206
|
-
</script>
|
|
207
|
-
|
|
208
|
-
{% comment %} Baidu link submit {% endcomment %}
|
|
209
|
-
{%- if site.baidu.linksubmit -%}
|
|
210
|
-
<script>
|
|
211
|
-
(function(script) {
|
|
212
|
-
script.src = "https://zz.bdstatic.com/linksubmit/push.js";
|
|
213
|
-
document.head.appendChild(script);
|
|
214
|
-
})(document.createElement("script"));
|
|
215
|
-
</script>
|
|
216
|
-
{%- endif -%}
|
|
217
|
-
|
|
218
|
-
{% comment %} Baidu Analytics {% endcomment %}
|
|
219
|
-
{%- if site.baidu.hm -%}
|
|
220
|
-
<script>
|
|
221
|
-
var _hmt = _hmt || [];
|
|
222
|
-
(function(script) {
|
|
223
|
-
script.src = "https://hm.baidu.com/hm.js?{{ site.baidu.hm }}";
|
|
224
|
-
document.head.appendChild(script);
|
|
225
|
-
})(document.createElement("script"));
|
|
226
|
-
</script>
|
|
227
|
-
{%- endif -%}
|
|
228
|
-
|
|
229
|
-
{% comment %} CNZZ Analytics {% endcomment %}
|
|
230
|
-
{%- if site.cnzz -%}
|
|
231
|
-
<span id="cnzz_stat_icon_{{ site.cnzz }}" style="display: none;"></span>
|
|
232
|
-
<script async src="https://v1.cnzz.com/z_stat.php?id={{ site.cnzz }}"></script>
|
|
233
|
-
{%- endif -%}
|
|
234
177
|
|
|
235
178
|
{% comment %} Google Analytics {% endcomment %}
|
|
236
179
|
{%- if site.google.gtag -%}
|
|
237
180
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google.gtag }}"></script>
|
|
238
181
|
<script>
|
|
182
|
+
window.dataLayer = window.dataLayer || [];
|
|
183
|
+
function gtag() {
|
|
184
|
+
dataLayer.push(arguments);
|
|
185
|
+
}
|
|
186
|
+
gtag("js", new Date());
|
|
239
187
|
gtag("config", "{{ site.google.gtag }}");
|
|
240
188
|
</script>
|
|
241
189
|
{%- endif -%}
|
|
242
|
-
|
|
243
|
-
{% comment %} Google AdSense {% endcomment %}
|
|
244
|
-
{%- if site.google.adsense -%}
|
|
245
|
-
<script data-ad-client="{{ site.google.adsense }}" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
|
246
|
-
{%- endif -%}
|
|
247
190
|
</body>
|
|
248
191
|
|
|
249
192
|
</html>
|
|
@@ -5,14 +5,17 @@ layout: plugins/extension
|
|
|
5
5
|
{%- if site.debug.compress == false -%}
|
|
6
6
|
{{ content }}
|
|
7
7
|
{%- else -%}
|
|
8
|
-
{%-
|
|
9
|
-
|
|
10
|
-
{%-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{%-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
{%- if content contains "<pre" -%}
|
|
9
|
+
{%- assign content_blocks = content | split: "<pre" -%}
|
|
10
|
+
{%- for content_block in content_blocks -%}
|
|
11
|
+
{%- if content_block contains "</pre>" -%}
|
|
12
|
+
{%- assign pre_blocks = content_block | split: "</pre>" -%}
|
|
13
|
+
<pre{{ pre_blocks.first }}</pre> {{ pre_blocks.last | split: " " | join: " " -}}
|
|
14
|
+
{%- else -%}
|
|
15
|
+
{{- content_block | split: " " | join: " " -}}
|
|
16
|
+
{%- endif -%}
|
|
17
|
+
{%- endfor -%}
|
|
18
|
+
{%- else -%}
|
|
19
|
+
{{- content | split: " " | join: " " -}}
|
|
20
|
+
{%- endif -%}
|
|
18
21
|
{%- endif -%}
|
|
@@ -1,24 +1,32 @@
|
|
|
1
|
-
{%-
|
|
2
|
-
{%- for block in blocks -%}
|
|
3
|
-
{%- assign child_blocks = block | split: "</pre>" %}
|
|
4
|
-
{%- if child_blocks.size == 1 -%}
|
|
5
|
-
{{ block }}
|
|
6
|
-
{%- else -%}
|
|
7
|
-
{%- comment %} admonitions card {% endcomment -%}
|
|
8
|
-
{%- assign admonitions = "note, tip, warning, danger" | split: ", " -%}
|
|
9
|
-
{%- comment %} get pre code and type {% endcomment -%}
|
|
10
|
-
{%- assign pre_blocks = child_blocks.first | replace_first: ">", "```<temp>```" | split: "```<temp>```" -%}
|
|
11
|
-
{%- assign pre_type = pre_blocks.first | replace: '"', '' | replace: " class=notranslate language-", "" -%}
|
|
1
|
+
{%- include safe/shortcodes.liquid -%}
|
|
12
2
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{%-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
{%- if site.debug.extension == false -%}
|
|
4
|
+
{{ content }}
|
|
5
|
+
{%- else -%}
|
|
6
|
+
{%- if content contains "<pre" -%}
|
|
7
|
+
{%- assign content_blocks = content | split: "<pre" -%}
|
|
8
|
+
{%- for content_block in content_blocks -%}
|
|
9
|
+
{%- if content_block contains "</pre>" -%}
|
|
10
|
+
{%- assign pre_blocks = content_block | split: "</pre>" -%}
|
|
11
|
+
{%- if content_block contains '><code class="language-' -%}
|
|
12
|
+
{%- comment %} shortcodes: <pre><code class="language-**"> {% endcomment -%}
|
|
13
|
+
{%- assign custom = content_block | replace_first: '><code class="language-', "" | replace_first: '">', "<temp/>" | split: "<temp/>" -%}
|
|
14
|
+
{%- assign lang = custom.first -%}
|
|
15
|
+
{%- assign codes = custom.last | split: "</code>" | first -%}
|
|
16
|
+
{%- assign others = custom.last | split: "</code>" | last -%}
|
|
17
|
+
{%- if shortcodes contains lang -%}
|
|
18
|
+
{%- include shortcodes/{{ lang }}.liquid -%} {{- others -}}
|
|
19
|
+
{%- else -%}
|
|
20
|
+
<pre{{ pre_blocks.first }}</pre> {{ pre_blocks.last }}
|
|
21
|
+
{%- endif -%}
|
|
22
|
+
{%- else -%}
|
|
23
|
+
<pre{{ pre_blocks.first }}</pre> {{ pre_blocks.last -}}
|
|
24
|
+
{%- endif -%}
|
|
25
|
+
{%- else -%}
|
|
26
|
+
{{- content_block -}}
|
|
27
|
+
{%- endif -%}
|
|
28
|
+
{%- endfor -%}
|
|
29
|
+
{%- else -%}
|
|
30
|
+
{{- content -}}
|
|
23
31
|
{%- endif -%}
|
|
24
|
-
{%-
|
|
32
|
+
{%- endif -%}
|