jekyll-rtd-theme 1.0.4 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd0100e421bd3ccbc2da040ef98ccdbc657f8aad2224c6544f2baeded4761d5d
4
- data.tar.gz: 6162401684e143cd3690c51dd1e8dcf4430dfe60c3fa670bd9b0928bbd134160
3
+ metadata.gz: 17d21728bc57e4cf176a94b347ec1fa282bc3330a2fb1fafd4fae290a81c6f9a
4
+ data.tar.gz: 5b7a0c810f57c8c819e5eb204e05fb9a364c7ab917b8a261c3764b060901cac1
5
5
  SHA512:
6
- metadata.gz: 30acf708a39d44c221d0a01a74791df3ed94bf5384122ac472574ebd9196fcd25bfe1031c6ec32508e746f5c9444da6fdc2f0e02d896f94b521f627621bbf77a
7
- data.tar.gz: 946c8bf42fb42359567acb26ab3c6ee2cd029d5a7ea5d412524d087081f83223b62bc24a1ba936bfbd4853c2e2cad09de7da1fc6cadceddd4bc49138bad6ae82
6
+ metadata.gz: 25d5137a9c12bfcae20f06eccf5a63f6468be384a7e8e3d2449da2d6a042a0f57a4aef8e5238ff69328103ae85328b5f5382360de935ae712c3b2ad2082777b7
7
+ data.tar.gz: c98a582a2bf2f770e4d167242983832fdb3443a74d7428deee6db8cf809f04dacb8b24862e439e25ffff83cd34035ff0283a56017419312797a3b99488d15c44
data/README.md CHANGED
@@ -5,39 +5,35 @@
5
5
  [![](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)][cdn]
6
6
  [![](https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme/badge)][codefactor]
7
7
  [![](https://img.shields.io/badge/featured%20on-JekyllThemes-red.svg)](https://jekyll-themes.com)
8
+ [![](https://badges.gitter.im/rundocs/jekyll-rtd-theme.svg)][gitter]
8
9
 
9
- Just another documentation theme compatible with GitHub Pages, based on sphinx_rtd_theme
10
+ GitHub-flavored docs theme for Jekyll, based on sphinx_rtd_theme
10
11
 
11
- ![][demo]
12
+ <img class="shadow-box" width="50%" alt="jekyll-rtd-theme" src="https://user-images.githubusercontent.com/68011645/89026666-ad3a8680-d35b-11ea-9f4b-d3fe26ae12ed.png">
12
13
 
13
- ## Notable features
14
- - Write documents directly, automatically generate toctree based on directory
15
- - Only need one file `_config.yml` to configure site
16
- - Bundled as a "theme gem" for easier installation/upgrading.
17
- - Compatible with GitHub Pages.
18
- - Optimized for search engines with support for Open Graph data.
19
- - Optimized for search engines with `robots.txt` and `sitemap.xml`.
20
- - Search engine (RegExp supported)
21
- - Commenting support
22
- - Google,Baidu,CNZZ Analytics support.
23
- - Multi-language supported
24
- - And many features waiting for you to discover.
14
+ ## Quick start
15
+ ```yml
16
+ remote_theme: rundocs/jekyll-rtd-theme
17
+ ```
18
+ You can [generate](https://github.com/rundocs/starter-slim/generate) with the same files and folders from [rundocs/starter-slim](https://github.com/rundocs/starter-slim/)
25
19
 
26
- ## Roadmap
27
- See the [open issues][issues] for a list of proposed features (and known issues).
20
+ ## Features
21
+ - Automatically generate nested sidebar based on directory
22
+ - Multi-language supported
23
+ - Search engine optimized
24
+ - Document search (RegExp supported)
25
+ - Support third-party comments
26
+ - Google, Baidu, CNZZ Analytics supported
27
+ - Just need one file `_config.yml` to configure site
28
28
 
29
29
  ## Documents
30
- For full documentation, see: [https://jekyll-rtd-theme.rundocs.io][site]
31
-
32
- ## The License
33
- The theme is available as open source under the terms of the [MIT License][license].
30
+ For full documentation, please refer to [rundocs.io](https://rundocs.io/), You can also view [the theme related tests documentation](https://rundocs.github.io/jekyll-rtd-theme)
34
31
 
32
+ ## License
33
+ The theme is available as open source under the terms of the [MIT License](https://github.com/rundocs/jekyll-rtd-theme/blob/master/LICENSE).
35
34
 
36
35
  [repository]: https://github.com/rundocs/jekyll-rtd-theme
37
- [issues]: https://github.com/rundocs/jekyll-rtd-theme/issues
38
- [license]: https://github.com/rundocs/jekyll-rtd-theme/blob/master/LICENSE
39
- [site]: https://jekyll-rtd-theme.rundocs.io
40
36
  [rubygem]: https://rubygems.org/gems/jekyll-rtd-theme
41
37
  [cdn]: https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme/
42
38
  [codefactor]: https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme
43
- [demo]: https://user-images.githubusercontent.com/68011645/88376699-87980500-cdd0-11ea-8900-7bab8c811bc9.png
39
+ [gitter]: https://gitter.im/rundocs/jekyll-rtd-theme?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
@@ -2,13 +2,7 @@
2
2
  <dt>{{ __statistics }}</dt>
3
3
  <dd>
4
4
  <a href="https://github.com/rundocs/analytics" target="_blank">
5
- {{ __total_visits }} <span id="counter"></span> <i class="fa fa-eye"></i>
5
+ {{ __total_visits }} <span id="counter"><span class="progress"></span></span> <i class="fa fa-eye"></i>
6
6
  </a>
7
7
  </dd>
8
8
  </dl>
9
-
10
- <script>
11
- $(document).ready(function() {
12
- $.getJSON("https://rundocs-analytics.glitch.me/analytics?host=" + location.host, (data) => $("#counter").html(data.count));
13
- });
14
- </script>
@@ -1,6 +1,24 @@
1
1
  $(document).ready(function() {
2
+ let analytics = new URL("https://rundocs-analytics.glitch.me/collect?v={{ version }}&lang={{ lang }}");
2
3
  let highlight = new URL(location.href).searchParams.get("highlight");
3
4
 
5
+ /* content toc */
6
+ $(".wy-menu-vertical li.current").append(function() {
7
+ let level = parseInt($(this).attr("class").match(/toctree-l(\d)/)[1]) + 1;
8
+ let toc = ["<ul>"];
9
+
10
+ $(".document").find("h2,h3,h4,h5,h6").each(function() {
11
+ toc.push(`<li class="toctree-l${level}"><a class="reference internal" href="#${this.id}">${$(this).html()}</a></li>`);
12
+ });
13
+ toc.push("</ul>");
14
+ /* return is apend */
15
+ if (toc.length == 2) {
16
+ return "";
17
+ } else {
18
+ return toc.join("");
19
+ }
20
+ });
21
+
4
22
  SphinxRtdTheme.Navigation.reset = function() {
5
23
  const link = $(".wy-menu-vertical").find(`[href="${location.pathname}"]`);
6
24
  if (link.length > 0) {
@@ -32,9 +50,13 @@ $(document).ready(function() {
32
50
  }
33
51
  });
34
52
  }
35
- for (let item in ui.admonition) {
36
- let content = $(`.language-${item}`).html();
37
- $(`.language-${item}`).replaceWith(`<div class="admonition ${item}"><p class="admonition-title">${ui.admonition[item]}</p><p>${content}</p></div>`);
38
- }
53
+ $(".admonition-title").each(function() {
54
+ $(this).html(ui.admonition[$(this).attr("ui")]);
55
+ });
39
56
  anchors.add();
57
+
58
+ analytics.searchParams.append("user_lang", navigator.language);
59
+ analytics.searchParams.append("host", location.host);
60
+ analytics.searchParams.append("platform", navigator.platform);
61
+ $.getJSON(analytics.toString(), (data) => $("#counter").html(data.count));
40
62
  });
@@ -1,18 +1,22 @@
1
1
  {%- include reset/workdir.liquid %}
2
2
 
3
+ {% comment %} display the directory name {% endcomment %}
3
4
  {%- assign dir = site_pages | where: "url", workdir | first -%}
4
5
  {%- if site_lang != lang -%}
6
+ {% comment %} current in language directory (level-1) {% endcomment %}
5
7
  {%- assign workdir_level = workdir_level | minus: 1 -%}
6
8
  {%- endif -%}
7
9
  {%- if workdir_level == 2 %}
10
+ {% comment %} display the root sub-directory as "p.caption" {% endcomment %}
8
11
  <p class="caption"><span class="caption-text">{{ dir.title | default: dir.url }}</span></p>
9
12
  {%- else %}
10
13
  <a class="reference internal" href="{{ dir.url | relative_url }}">{{ dir.title | default: dir.url }}</a>
11
14
  {%- endif -%}
12
15
 
13
16
  <ul>
17
+ {% comment %} list file {% endcomment %}
14
18
  {%- for item in workdir_files -%}
15
- {%- assign level = item.dir | append: "temp/" | split: "/" | size | minus: 2 -%}
19
+ {%- assign level = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 1 -%}
16
20
  {%- capture current -%}
17
21
  {%- if page.url == item.url %}current{% endif -%}
18
22
  {%- endcapture %}
@@ -30,8 +34,10 @@
30
34
  </a>
31
35
  </li>
32
36
  {%- endfor -%}
37
+
38
+ {% comment %} list dirs {% endcomment %}
33
39
  {%- for workdir in workdir_dirs -%}
34
- {%- assign level = workdir | append: "temp/" | split: "/" | size | minus: 3 %}
40
+ {%- assign level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 2 %}
35
41
  {%- if site_lang != lang -%}
36
42
  {%- assign level = level | minus: 1 -%}
37
43
  {%- endif -%}
@@ -31,7 +31,7 @@
31
31
  </p>
32
32
  </div>
33
33
  {%- endif -%}
34
- <div role="contentinfo" class="copyright-rtd">
35
- Powered by <a href="https://rundocs.io">rundocs.io</a>
34
+ <div role="contentinfo" class="copyright rundocs">
35
+ <p>Powered by <a href="https://rundocs.io">rundocs.io</a> using the jekyll docs theme <a href="https://rundocs.github.io/jekyll-rtd-theme">jekyll-rtd-theme</a></p>
36
36
  </div>
37
37
  </footer>
@@ -0,0 +1,29 @@
1
+ {% comment %} Spanish {% endcomment %}
2
+ {%- assign __github = "Github" -%}
3
+ {%- assign __homepage = "Página principal" -%}
4
+ {%- assign __issues = "Cuestiones" -%}
5
+ {%- assign __download = "Descargar" -%}
6
+ {%- assign __plugins = "Complementos temáticos" -%}
7
+ {%- assign __translations = "Traducciones" -%}
8
+ {%- assign __statistics = "Estadísticas" -%}
9
+ {%- assign __total_visits = "Visitas totales:" -%}
10
+
11
+ {%- assign __note = "Observaciones" -%}
12
+ {%- assign __tip = "Consejos" -%}
13
+ {%- assign __warning = "Advertencia" -%}
14
+ {%- assign __danger = "Peligro" -%}
15
+
16
+ {%- assign __next = "Siguiente página" -%}
17
+ {%- assign __previous = "Pagina anterior" -%}
18
+ {%- assign __copyright = "Derechos de autor" -%}
19
+ {%- assign __revision = "Revisión" -%}
20
+
21
+ {%- assign __404 = "404" -%}
22
+ {%- assign __not_found = "¡Esta página aún no existe!" -%}
23
+
24
+ {%- assign __searching = "Buscando" -%}
25
+ {%- assign __search = "Buscar" -%}
26
+ {%- assign __search_docs = "Buscar documentos" -%}
27
+ {%- assign __search_results = "Resultados de la búsqueda" -%}
28
+ {%- assign __search_results_found = "Búsqueda finalizada, se encontraron # páginas que coinciden con la consulta de búsqueda." -%}
29
+ {%- assign __search_results_not_found = "Su búsqueda no coincide con ningún documento, asegúrese de que todos los caracteres estén escritos correctamente." -%}
@@ -0,0 +1,29 @@
1
+ {% comment %} Swedish {% endcomment %}
2
+ {%- assign __github = "Github" -%}
3
+ {%- assign __homepage = "Hemsida" -%}
4
+ {%- assign __issues = "frågor" -%}
5
+ {%- assign __download = "Ladda ner" -%}
6
+ {%- assign __plugins = "Tema Plugins" -%}
7
+ {%- assign __translations = "översättningar" -%}
8
+ {%- assign __statistics = "Statistik" -%}
9
+ {%- assign __total_visits = "Totalt antal besök:" -%}
10
+
11
+ {%- assign __note = "Anmärkningar" -%}
12
+ {%- assign __tip = "tips" -%}
13
+ {%- assign __warning = "Varning" -%}
14
+ {%- assign __danger = "Fara" -%}
15
+
16
+ {%- assign __next = "Nästa sida" -%}
17
+ {%- assign __previous = "Föregående sida" -%}
18
+ {%- assign __copyright = "upphovsrätt" -%}
19
+ {%- assign __revision = "Revision" -%}
20
+
21
+ {%- assign __404 = "404" -%}
22
+ {%- assign __not_found = "Den här sidan finns inte ännu!" -%}
23
+
24
+ {%- assign __searching = "Sökande" -%}
25
+ {%- assign __search = "Sök" -%}
26
+ {%- assign __search_docs = "Sök i dokument" -%}
27
+ {%- assign __search_results = "sökresultat" -%}
28
+ {%- assign __search_results_found = "Sökningen är klar, hittade # sida (er) som matchar sökfrågan." -%}
29
+ {%- assign __search_results_not_found = "Din sökning matchade inga dokument, se till att alla tecken stavas korrekt!" -%}
@@ -1,13 +1,14 @@
1
1
  {%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
2
- {%- assign version = "1.0.4" -%}
2
+ {%- assign version = "1.1.3" -%}
3
3
  {%- assign addons = "github, i18n, plugins, analytics" | split: ", " -%}
4
4
 
5
- {%- assign schema_lastmod = site.time | date_to_xmlschema -%}
6
- {%- assign schema_url = page.url | absolute_url | replace: 'http://', 'https://' | xml_escape -%}
5
+ {%- assign schema_date = page.date | default: site.time | date_to_xmlschema -%}
6
+ {%- assign schema_modi = site.time | date_to_xmlschema -%}
7
+ {%- assign schema_surl = page.url | absolute_url | replace: 'http://', 'https://' | xml_escape -%}
7
8
 
8
9
  {% comment %} scss {% endcomment %}
9
10
  {%- capture site_scss -%}
10
- @import "site.scss";
11
+ @import "jekyll-rtd-theme.scss";
11
12
  {% if site.fluid %}@import "fluid.scss";{% endif %}
12
13
  {% include assets/custom.scss %} {{ site.scss }}
13
14
  {%- endcapture -%}
@@ -21,25 +22,15 @@
21
22
 
22
23
  {% comment %} github-metadata {% endcomment %}
23
24
  {%- if site.github_metadata != false -%}
24
- {%- if jekyll.environment == "production" -%}
25
- {%- assign author = site.author | default: site.github.owner_name -%}
26
- {%- assign branch = site.github.source.branch -%}
27
- {%- assign commit = site.github.build_revision | slice: 0, 7 -%}
28
- {%- assign repository_url = site.github.repository_url -%}
29
- {%- assign issues_url = site.github.issues_url -%}
30
- {%- assign zip_url = site.github.zip_url -%}
31
- {%- capture github_edit_link %}{% github_edit_link %}{% endcapture -%}
32
- {%- else -%}
33
- {%- assign author = site.author | default: "[author]" -%}
34
- {%- assign branch = "[branch]" -%}
35
- {%- assign commit = "[commit]" -%}
36
- {%- assign repository_url = "#" -%}
37
- {%- assign issues_url = "#" -%}
38
- {%- assign zip_url = "#" -%}
39
- {%- assign github_edit_link = "#" -%}
40
- {%- endif -%}
25
+ {%- assign author = site.author | default: site.github.owner_name -%}
26
+ {%- assign branch = site.github.source.branch -%}
27
+ {%- assign commit = site.github.build_revision | slice: 0, 7 -%}
28
+ {%- assign repository_url = site.github.repository_url -%}
29
+ {%- assign issues_url = site.github.issues_url -%}
30
+ {%- assign zip_url = site.github.zip_url -%}
31
+ {%- capture github_edit_link %}{% github_edit_link %}{% endcapture -%}
41
32
  {%- else -%}
42
- {%- assign author = site.author | default: "[author]" -%}
33
+ {%- assign author = site.author -%}
43
34
  {%- assign branch = "" -%}
44
35
  {%- assign commit = "" -%}
45
36
  {%- assign repository_url = "" -%}
@@ -8,12 +8,12 @@
8
8
  {%- endif -%}
9
9
  {%- endif -%}
10
10
 
11
- {%- assign workdir_level = workdir | append: "temp/" | split: "/" | size | minus: 1 -%}
11
+ {%- assign workdir_level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size -%}
12
12
  {%- assign workdir_files = site_files | where_exp: "item", "item.dir == workdir" -%}
13
13
 
14
14
  {%- capture items -%}
15
15
  {%- for item in site_dirs -%}
16
- {%- assign current_m1 = item.dir | append: "temp/" | split: "/" | size | minus: 2 -%}
16
+ {%- assign current_m1 = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 1 -%}
17
17
  {%- if workdir_level == current_m1 -%}
18
18
  {%- assign temp = workdir | append: "@@" -%}
19
19
  {%- assign dir = item.dir | replace: workdir, temp | split: "@@" | first -%}
@@ -1,8 +1,12 @@
1
1
  {%- include reset/workdir.liquid %}
2
2
 
3
+ {% comment %} list the root files {% endcomment %}
3
4
  <ul>
4
5
  {%- for item in workdir_files -%}
5
- {%- assign level = item.dir | append: "temp/" | split: "/" | size | minus: 1 -%}
6
+ {%- assign level = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size -%}
7
+ {%- if site_lang != lang -%}
8
+ {%- assign level = level | minus: 1 -%}
9
+ {%- endif -%}
6
10
  {%- capture current -%}
7
11
  {%- if page.url == item.url %}current{% endif -%}
8
12
  {%- endcapture %}
@@ -14,4 +18,5 @@
14
18
  {%- endfor %}
15
19
  </ul>
16
20
 
21
+ {% comment %} list the root dirs {% endcomment %}
17
22
  {%- for workdir in workdir_dirs %}{% include extend/toctree.liquid %}{% endfor -%}
@@ -14,7 +14,7 @@ layout: plugins/compress
14
14
  {%- endif %}
15
15
  -->
16
16
 
17
- <html amp class="writer-html5" lang="{{ lang }}">
17
+ <html class="writer-html5" lang="{{ lang }}">
18
18
 
19
19
  <head>
20
20
  <meta charset="utf-8">
@@ -41,14 +41,16 @@ layout: plugins/compress
41
41
  <meta name="author" content="{{ author }}">
42
42
  <meta name="revised" content="{{ commit }}">
43
43
  <meta name="generator" content="jekyll-rtd-theme v{{ version }}">
44
- <!-- meta-og -->
44
+ <!-- meta-ogp -->
45
+ {% comment %} https://ogp.me {% endcomment %}
45
46
  <meta property="og:title" content="{{ title }}">
46
47
  <meta property="og:description" content="{{ description }}">
47
48
  <meta property="og:locale" content="{{ lang }}">
48
- <meta property="og:url" content="{{ schema_url }}">
49
+ <meta property="og:url" content="{{ schema_surl }}">
49
50
  <meta property="og:type" content="article">
50
51
  <meta property="article:author" content="{{ author }}">
51
- <meta property="article:modified_time" content="{{ schema_lastmod }}">
52
+ <meta property="article:published_time" content="{{ schema_date }}">
53
+ <meta property="article:modified_time" content="{{ schema_modi }}">
52
54
  <!-- meta-custom -->
53
55
  {% for meta in site.meta -%}
54
56
  <meta name="{{ meta.first }}" content="{{ meta.last }}">
@@ -60,7 +62,7 @@ layout: plugins/compress
60
62
  "@type": "Article",
61
63
  "mainEntityOfPage": {
62
64
  "@type": "WebPage",
63
- "@id": "{{ schema_url }}"
65
+ "@id": "{{ schema_surl }}"
64
66
  },
65
67
  "headline": "{{ title | truncate: 110 }}",
66
68
  "image": [{% for image in page.images %}"{{ image }}"{% unless forloop.last %},{% endunless %}{% endfor %}],
@@ -68,8 +70,8 @@ layout: plugins/compress
68
70
  "@type": "Person",
69
71
  "name": "{{ author }}"
70
72
  },
71
- "datePublished": "{{ page.date | default: site.time | date_to_xmlschema }}",
72
- "dateModified": "{{ schema_lastmod }}",
73
+ "datePublished": "{{ schema_date }}",
74
+ "dateModified": "{{ schema_modi }}",
73
75
  "publisher": {
74
76
  "@type": "Organization",
75
77
  "name": "RunDocs",
@@ -77,19 +79,20 @@ layout: plugins/compress
77
79
  "@type": "ImageObject",
78
80
  "url": "https://rundocs.io/logo.png"
79
81
  }
80
- }
82
+ },
83
+ "description": "{{ description }}"
81
84
  }
82
85
  </script>
83
86
  <!-- link -->
84
- <link rel="canonical" href="{{ schema_url }}">
87
+ <link rel="canonical" href="{{ schema_surl }}">
85
88
  {% if prev %}<link rel="prev" href="{{ prev.url | absolute_url | replace: 'http://', 'https://' }}">{% endif %}
86
89
  {% if next %}<link rel="next" href="{{ next.url | absolute_url | replace: 'http://', 'https://' }}">{% endif %}
87
90
  <!-- theme -->
88
91
  <link rel="stylesheet" href="{{ cdn }}/assets/css/theme.css">
89
92
  <link rel="stylesheet" href="{{ cdn }}/assets/css/rougify/{{ site.rougify | default: 'github' }}.css">
90
- <style>{{ site_scss | scssify }}</style>
93
+ <style>{{ site_scss | scssify | strip_newlines }}</style>
91
94
  <!-- icon -->
92
- <link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/favicon.svg">
95
+ <link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/favicon.svg">
93
96
  <!-- script -->
94
97
  <!--[if lt IE 9]><script src="{{ cdn }}/assets/js/html5shiv.min.js"></script><![endif]-->
95
98
  <script src="{{ cdn }}/assets/js/jquery.min.js"></script>
@@ -106,15 +109,6 @@ layout: plugins/compress
106
109
  }
107
110
  };
108
111
  </script>
109
- {%- if jekyll.environment == "production" -%}
110
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-174262874-1"></script>
111
- <script>
112
- gtag("set", {
113
- "user_id": location.host
114
- });
115
- gtag("config", "UA-174262874-1");
116
- </script>
117
- {%- endif -%}
118
112
  </head>
119
113
 
120
114
  <body class="wy-body-for-nav">
@@ -147,19 +141,24 @@ layout: plugins/compress
147
141
  <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
148
142
  <!-- MOBILE NAV -->
149
143
  <nav class="wy-nav-top" aria-label="top navigation">
150
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
151
- <a href="{{ site.baseurl }}/{% if site_lang != lang %}{{ lang }}/{% endif %}">{{ site.title }}</a>
144
+ <div class="flex">
145
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
146
+ <div class="wy-nav-title">
147
+ <a href="{{ site.baseurl }}/{% if site_lang != lang %}{{ lang }}/{% endif %}">{{ site.title }}</a>
148
+ </div>
149
+ </div>
152
150
  </nav>
153
151
  <div class="wy-nav-content">
154
152
  <div class="rst-content">
155
153
  {% include breadcrumbs.liquid %}
156
- <div class="document" role="main">
157
- {%- if page.url == "/search.html" -%}
158
- {{ content }}
159
- {%- else -%}
160
- <div class="section">{{ content }}</div>
161
- {%- endif -%}
162
-
154
+ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
155
+ <div itemprop="articleBody">
156
+ {%- if page.url == "/search.html" -%}
157
+ {{ content }}
158
+ {%- else -%}
159
+ <div class="section">{{ content }}</div>
160
+ {%- endif -%}
161
+ </div>
163
162
  {% comment %} comments {% endcomment %}
164
163
  {% if site.disqus %}
165
164
  <div id="disqus_thread" class="articleComments"></div>
@@ -181,6 +180,11 @@ layout: plugins/compress
181
180
  <!-- script -->
182
181
  <script src="{{ cdn }}/assets/js/theme.js"></script>
183
182
  <script src="{{ cdn }}/assets/js/anchor.min.js"></script>
183
+ {% comment %} mermaid {% endcomment %}
184
+ {%- if content contains '<pre class="language-mermaid">' -%}
185
+ <script src="{{ cdn }}/assets/js/mermaid.min.js"></script>
186
+ <script>mermaid.initialize({startOnLoad: true});</script>
187
+ {%- endif -%}
184
188
  <script>
185
189
  {% include assets/common.js %}
186
190
  {% include assets/custom.js %} {{ site.script }}
@@ -215,7 +219,6 @@ layout: plugins/compress
215
219
 
216
220
  {% comment %} Google Analytics {% endcomment %}
217
221
  {%- if site.google.gtag -%}
218
- <!-- -->
219
222
  <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google.gtag }}"></script>
220
223
  <script>
221
224
  gtag("config", "{{ site.google.gtag }}");