jekyll-rtd-theme 2.0.2 → 2.0.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: 9f4f4168adf2ae575fe0c262155ebb5449ce2a2d69c5c9be9c811287ab0527d6
4
- data.tar.gz: 7d70ba9d589a881660140fda943b585ae9f77b392f2bdb1720adfe40bee375b4
3
+ metadata.gz: 71e0be728a36e78ef8a38db4242292a0981347013258726fb82074c3d38fdc0d
4
+ data.tar.gz: e41c8381aa8cf0af5780449b0567f222d3a8959a00c5a73aa51daf028f99e1c7
5
5
  SHA512:
6
- metadata.gz: 467ea12e4724b57506b3389b08bbeec30721572cb2c5ab00b7211c906a5deffa2674b34fb69778e8b156b8ead4d928f433466b82f0d3248df4900e7387e09f60
7
- data.tar.gz: b4a165867d9e4090b97a1443194204fcde0551a069477cfad57cca4140e1816a11e26969595b8c912943da63340ce59a502d783a966ea741e97ab8033c105dc8
6
+ metadata.gz: ed35e6eff3b3b0ab73924527a16f52adea7f7ba95845f51e43def520b8136d3bc9c88594921a7b0b93875c75a0aa9c1b69efb3bba18e431ca344aac1c5574726
7
+ data.tar.gz: 40b26d3027d9f8f379a284cc3025c51c4740346921439aec81d4d87df114b633db7644badf7cc7ef2f90bb307aa52beb326495175ef797a0804da6ad78b0ce07
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 RunDocs
3
+ Copyright (c) 2020 RunDocs & contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # jekyll-rtd-theme
2
2
 
3
- ![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)
3
+ ![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg?branch=v2)
4
4
  ![jsDelivr](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)
5
5
 
6
6
  Opinionated github flavored standard document theme for open source projects, with few options, but everything!
@@ -41,9 +41,6 @@ readme_index:
41
41
  meta:
42
42
  key1: value1
43
43
  key2: value2
44
- .
45
- .
46
- .
47
44
 
48
45
  google:
49
46
  gtag:
@@ -83,7 +80,7 @@ plugins:
83
80
  - jekyll-mentions
84
81
  ```
85
82
 
86
- ## Waiting
83
+ ## Writing
87
84
 
88
85
  Document writing specifications, please refer to [rundocs.io](https://rundocs.io) for details
89
86
 
@@ -1,11 +1,11 @@
1
1
  self.addEventListener("activate", function (event) {
2
- let cacheWhitelist = ["rundocs-{{ version }}"];
2
+ const current = ["rundocs-{{ version }}"];
3
3
 
4
4
  event.waitUntil(
5
5
  caches.keys().then(function (keyList) {
6
6
  return Promise.all(
7
7
  keyList.map(function (key) {
8
- if (cacheWhitelist.indexOf(key) === -1) {
8
+ if (current.indexOf(key) === -1) {
9
9
  return caches.delete(key);
10
10
  }
11
11
  })
@@ -15,11 +15,7 @@ self.addEventListener("activate", function (event) {
15
15
  });
16
16
 
17
17
  self.addEventListener("fetch", function (e) {
18
- if (
19
- /^https:\/\/cdn\.jsdelivr\.net\/gh\/rundocs\/jekyll-rtd-theme@.+/.exec(
20
- e.request.url
21
- )
22
- ) {
18
+ if (e.request.url.match("rundocs/jekyll-rtd-theme@{{ version }}")) {
23
19
  e.respondWith(
24
20
  caches.match(e.request).then(function (resp) {
25
21
  if (resp !== undefined) {
@@ -10,9 +10,9 @@
10
10
  <li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
11
11
  <a class="d-flex flex-items-baseline {{ current }}" href="{{ item.url | relative_url }}">
12
12
  {%- if item.sort -%}
13
- {{ item.sort }}. {{ item.title | default: item.url }}
13
+ {{ item.sort }}. {{ item.title | default: item.name }}
14
14
  {%- else -%}
15
- {{ item.title | default: item.url }}
15
+ {{ item.title | default: item.name }}
16
16
  {%- endif -%}
17
17
  </a>
18
18
  </li>
@@ -9,7 +9,7 @@
9
9
  {% include reset/tabs.liquid size=size %}- [{{ dir.title | default: dir.url }}]({{ dir.url | relative_url }})
10
10
 
11
11
  {%- for item in workdir_files %}
12
- {% include reset/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.url }}]({{ item.url | relative_url }})
12
+ {% include reset/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.name }}]({{ item.url | relative_url }})
13
13
  {%- endfor -%}
14
14
 
15
15
  {%- for workdir in workdir_dirs %}{% include extend/list.liquid %}{% endfor -%}
@@ -25,9 +25,9 @@
25
25
  <li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
26
26
  <a class="d-flex flex-items-baseline {{ current }}" href="{{ item.url | relative_url }}">
27
27
  {%- if item.sort -%}
28
- {{ item.sort }}. {{ item.title | default: item.url }}
28
+ {{ item.sort }}. {{ item.title | default: item.name }}
29
29
  {%- else -%}
30
- {{ item.title | default: item.url }}
30
+ {{ item.title | default: item.name }}
31
31
  {%- endif -%}
32
32
  </a>
33
33
  </li>
@@ -2,7 +2,7 @@
2
2
  {%- include reset/workdir.liquid workdir=page.dir -%}
3
3
 
4
4
  {%- for item in workdir_files %}
5
- - [{{ item.title | default: item.url }}]({{ item.url | relative_url }})
5
+ - [{{ item.title | default: item.name }}]({{ item.url | relative_url }})
6
6
  {%- endfor -%}
7
7
 
8
8
  {%- if include.all -%}
@@ -16,5 +16,9 @@
16
16
  {% comment %} theme {% endcomment %}
17
17
  <link rel="stylesheet" href="{{ cdn }}/assets/css/theme{% if site.debug.dist != false %}.min{% endif %}.css">
18
18
 
19
+ {%- if custom_scss.size > 0 -%}
20
+ <style>{{ custom_scss | scssify | strip_newlines }}</style>
21
+ {%- endif -%}
22
+
19
23
  {% comment %} icon {% endcomment %}
20
24
  <link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/favicon.svg">
@@ -1,8 +1,7 @@
1
1
  <script>
2
2
  window.ui = {
3
+ collect: new URL("{{ collect }}?v={{ version }}&lang={{ lang }}"),
3
4
  title: "{{ site.title }}",
4
- lang: "{{ lang }}",
5
- version: "{{ version }}",
6
5
  baseurl: "{{ site.baseurl }}",
7
6
  i18n: {
8
7
  search_results: "{{ __.search_results | default: 'Search Results' }}",
@@ -12,4 +11,9 @@
12
11
  };
13
12
  </script>
14
13
  <script src="{{ cdn }}/assets/js/jquery.min.js"></script>
14
+
15
+ {%- if custom_script.size > 0 -%}
16
+ <script>{{ custom_script }}</script>
17
+ {%- endif -%}
18
+
15
19
  <script src="{{ cdn }}/assets/js/theme{% if site.debug.dist != false %}.min{% endif %}.js"></script>
@@ -0,0 +1,5 @@
1
+ {%- assign content = content
2
+ | replace: "’", "'"
3
+ | replace: "“", '"'
4
+ | replace: "”", '"'
5
+ | replace: "highlighter-rouge", "highlighter-rouge notranslate" -%}
@@ -1,69 +1,11 @@
1
1
  {%- include reset/site_pages.liquid -%}
2
2
  {%- include reset/i18n.liquid -%}
3
+ {%- include reset/version.liquid -%}
3
4
 
4
- {%- comment %} variables {% endcomment -%}
5
- {%- assign version = "2.0.2" -%}
6
- {%- assign docs = site.github -%}
7
- {%- assign rest = docs.public_repositories | where: "html_url", docs.repository_url | first -%}
5
+ {%- include reset/variables.liquid -%}
8
6
 
9
- {%- assign rest_created_at = rest.created_at | default: site.time -%}
10
- {%- assign rest_updated_at = rest.updated_at | default: site.time -%}
7
+ {%- include reset/content.liquid -%}
11
8
 
12
- {%- assign lang = site.lang | default: "en" -%}
13
- {%- assign author = docs.owner.name | default: docs.owner_name -%}
14
-
15
- {%- comment %} schema {% endcomment -%}
16
- {%- assign schema_date = page.date | default: rest_created_at | date_to_xmlschema -%}
17
- {%- assign schema_modi = site.time | date_to_xmlschema -%}
18
- {%- assign schema_surl = page.url | absolute_url | xml_escape -%}
19
-
20
- {%- comment %} title {% endcomment -%}
21
- {%- case page.url -%}
22
- {%- when "/" -%}
23
- {%- assign title = site.title | append: " · " | append: site.description | truncate: 110 -%}
24
- {%- when "/search.html" -%}
25
- {%- assign title = __.search | default: "Search" | append: " · " | append: site.title | truncate: 110 -%}
26
- {%- when "/404.html" -%}
27
- {%- assign title = "404" | append: " · " | append: site.title | truncate: 110 -%}
28
- {%- else -%}
29
- {%- assign title = page.title | default: page.url | append: " · " | append: site.title | truncate: 110 -%}
30
- {%- endcase -%}
31
-
32
- {%- comment %} description {% endcomment -%}
33
- {%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
34
-
35
- {% comment %} debug {% endcomment %}
36
- {%- if site.debug -%}
37
- {%- assign cdn = site.baseurl -%}
38
- {%- else -%}
39
- {%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
40
- {%- endif -%}
41
-
42
- {% comment %} content {% endcomment %}
43
- {%- assign content = content
44
- | replace: "’", "'"
45
- | replace: "“", '"'
46
- | replace: "”", '"'
47
- | replace: "highlighter-rouge", "highlighter-rouge notranslate" -%}
48
-
49
-
50
- {% comment %} prev and next {% endcomment %}
51
- {%- assign workdir_files = site_files | where_exp: "item", "item.dir == page.dir" -%}
52
-
53
- {%- assign index = 0 -%}
54
- {%- for item in workdir_files %}
55
- {%- if item.url == page.url %}
56
- {%- assign index = forloop.index -%}
57
- {%- endif %}
58
- {%- endfor -%}
59
-
60
- {%- for item in workdir_files -%}
61
- {%- assign index_prev = index | minus: 1 -%}
62
- {%- assign index_next = index | plus: 1 -%}
63
- {%- if forloop.index == index_prev -%}
64
- {%- assign prev = item -%}
65
- {%- endif %}
66
- {%- if forloop.index == index_next -%}
67
- {%- assign next = item -%}
68
- {%- endif %}
69
- {%- endfor -%}
9
+ {%- include reset/navigation.liquid -%}
10
+ {%- include reset/title.liquid -%}
11
+ {%- include reset/description.liquid -%}
@@ -0,0 +1,6 @@
1
+ {%- assign description = content
2
+ | strip_html
3
+ | split: " "
4
+ | join: " "
5
+ | escape
6
+ | truncate: 150 -%}
@@ -0,0 +1,20 @@
1
+ {%- include reset/workdir.liquid workdir=page.dir -%}
2
+
3
+ {% comment %} prev and next {% endcomment %}
4
+ {%- assign index = 0 -%}
5
+ {%- for item in workdir_files %}
6
+ {%- if item.url == page.url %}
7
+ {%- assign index = forloop.index -%}
8
+ {%- endif %}
9
+ {%- endfor -%}
10
+
11
+ {%- for item in workdir_files -%}
12
+ {%- assign index_prev = index | minus: 1 -%}
13
+ {%- assign index_next = index | plus: 1 -%}
14
+ {%- if forloop.index == index_prev -%}
15
+ {%- assign prev = item -%}
16
+ {%- endif %}
17
+ {%- if forloop.index == index_next -%}
18
+ {%- assign next = item -%}
19
+ {%- endif %}
20
+ {%- endfor -%}
@@ -0,0 +1,18 @@
1
+ {%- case page.url -%}
2
+ {%- when "/" -%}
3
+ {%- assign title = site.title
4
+ | append: " · "
5
+ | append: site.description | truncate: 110 -%}
6
+ {%- when "/search.html" -%}
7
+ {%- assign title = __.search | default: "Search"
8
+ | append: " · "
9
+ | append: site.title | truncate: 110 -%}
10
+ {%- when "/404.html" -%}
11
+ {%- assign title = "404"
12
+ | append: " · "
13
+ | append: site.title | truncate: 110 -%}
14
+ {%- else -%}
15
+ {%- assign title = page.title | default: page.name
16
+ | append: " · "
17
+ | append: site.title | truncate: 110 -%}
18
+ {%- endcase -%}
@@ -0,0 +1,31 @@
1
+ {%- comment %} variables {% endcomment -%}
2
+ {%- assign collect = "https://rundocs-analytics.glitch.me/collect" -%}
3
+ {%- assign docs = site.github -%}
4
+ {%- assign rest = docs.public_repositories | where: "html_url", docs.repository_url | first -%}
5
+
6
+ {%- assign rest_created_at = rest.created_at | default: site.time -%}
7
+ {%- assign rest_updated_at = rest.updated_at | default: site.time -%}
8
+
9
+ {%- assign lang = site.lang | default: "en" -%}
10
+ {%- assign author = docs.owner.name | default: docs.owner_name -%}
11
+
12
+ {%- comment %} schema {% endcomment -%}
13
+ {%- assign schema_date = page.date | default: rest_created_at | date_to_xmlschema -%}
14
+ {%- assign schema_modi = site.time | date_to_xmlschema -%}
15
+ {%- assign schema_surl = page.url | absolute_url | xml_escape -%}
16
+
17
+ {% comment %} debug {% endcomment %}
18
+ {%- if site.debug -%}
19
+ {%- assign cdn = site.baseurl -%}
20
+ {%- else -%}
21
+ {%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
22
+ {%- endif -%}
23
+
24
+ {% comment %} custom {% endcomment %}
25
+ {%- capture custom_scss -%}
26
+ {%- include assets/custom.scss -%} {{- site.scss -}}
27
+ {%- endcapture -%}
28
+
29
+ {%- capture custom_script -%}
30
+ {%- include assets/custom.js -%} {{- site.script -}}
31
+ {%- endcapture -%}
@@ -0,0 +1 @@
1
+ {%- assign version = "2.0.3" -%}
@@ -11,7 +11,6 @@ layout: plugins/compress
11
11
 
12
12
  {%- include node/title.liquid -%}
13
13
  {%- include node/links.liquid -%}
14
-
15
14
  {%- include node/script.schema.liquid -%}
16
15
 
17
16
  {%- include extra/head.html -%}
@@ -22,8 +21,8 @@ layout: plugins/compress
22
21
  {%- include class/addons-wrap.liquid -%}
23
22
 
24
23
  {%- include node/script.liquid -%}
25
- {%- include node/custom.liquid -%}
26
24
  {%- include node/script.extension.liquid -%}
25
+
27
26
  {%- include extra/footer.html -%}
28
27
  </body>
29
28
  </html>
@@ -15,9 +15,8 @@
15
15
  {%- assign custom = content_block | replace_first: '><code class="language-', "" | replace_first: '">', "<temp/>" | split: "<temp/>" -%}
16
16
  {%- assign lang = custom.first -%}
17
17
  {%- assign codes = custom.last | split: "</code>" | first -%}
18
- {%- assign others = custom.last | split: "</code>" | last -%}
19
18
  {%- if shortcodes contains lang -%}
20
- {%- include shortcodes/{{ lang }}.liquid -%} {{- others -}}
19
+ {%- include shortcodes/{{ lang }}.liquid -%} {{- pre_blocks.last -}}
21
20
  {%- else -%}
22
21
  <pre{{ pre_blocks.first }}</pre> {{ pre_blocks.last }}
23
22
  {%- endif -%}
@@ -46,9 +46,12 @@ label {
46
46
  background-color: #f3f4f6; // custom gray
47
47
  }
48
48
 
49
- // Ensures inputs don't zoom on mobile but are body-font size on desktop
50
- @include breakpoint(md) {
51
- font-size: $body-font-size;
49
+ // Ensures inputs don't zoom on mobile iPhone but are body-font size on iPad
50
+ @supports (-webkit-touch-callout: none) {
51
+ font-size: $h4-size;
52
+ @include breakpoint(md) {
53
+ font-size: $body-font-size;
54
+ }
52
55
  }
53
56
  }
54
57
 
@@ -46,6 +46,7 @@
46
46
  }
47
47
 
48
48
  li {
49
+ // TODO@16.0.0: Remove this. See https://github.com/primer/css/pull/1137.
49
50
  word-wrap: break-all;
50
51
  }
51
52
 
@@ -9,6 +9,7 @@ $border: $border-width $border-color $border-style !default;
9
9
  // Border Radius
10
10
  $border-radius-1: 4px !default;
11
11
  $border-radius-2: 6px !default;
12
+ $border-radius-3: 8px !default;
12
13
  $border-radius: $border-radius-2 !default;
13
14
 
14
15
  // Box shadow
@@ -72,6 +72,9 @@
72
72
  .rounded#{$variant}-2 {
73
73
  border-radius: $border-radius-2 !important;
74
74
  }
75
+ .rounded#{$variant}-3 {
76
+ border-radius: $border-radius-3 !important;
77
+ }
75
78
 
76
79
  @each $edge, $corners in $edges {
77
80
  .rounded#{$variant}-#{$edge}-0 {
@@ -82,19 +85,19 @@
82
85
 
83
86
  .rounded#{$variant}-#{$edge}-1 {
84
87
  @each $corner in $corners {
85
- border-#{$corner}-radius: $border-radius / 2 !important;
88
+ border-#{$corner}-radius: $border-radius-1 !important;
86
89
  }
87
90
  }
88
91
 
89
92
  .rounded#{$variant}-#{$edge}-2 {
90
93
  @each $corner in $corners {
91
- border-#{$corner}-radius: $border-radius !important;
94
+ border-#{$corner}-radius: $border-radius-2 !important;
92
95
  }
93
96
  }
94
97
 
95
98
  .rounded#{$variant}-#{$edge}-3 {
96
99
  @each $corner in $corners {
97
- border-#{$corner}-radius: $border-radius * 2 !important;
100
+ border-#{$corner}-radius: $border-radius-3 !important;
98
101
  }
99
102
  }
100
103
  }
@@ -23,6 +23,9 @@
23
23
  .flex#{$variant}-nowrap {
24
24
  flex-wrap: nowrap !important;
25
25
  }
26
+ .flex#{$variant}-wrap-reverse {
27
+ flex-wrap: wrap-reverse !important;
28
+ }
26
29
 
27
30
  .flex#{$variant}-justify-start {
28
31
  justify-content: flex-start !important;
@@ -1,7 +1,7 @@
1
1
  // Layout
2
2
  // stylelint-disable block-opening-brace-space-after, block-opening-brace-space-before, comment-empty-line-before
3
3
 
4
- // Loop through the breakpoint values
4
+ /* Position */
5
5
  @each $breakpoint, $variant in $responsive-variants {
6
6
  @include breakpoint($breakpoint) {
7
7
  @each $position in $responsive-positions {
@@ -12,21 +12,34 @@
12
12
  }
13
13
  }
14
14
 
15
- /* Set top 0 */
16
- .top-0 {
17
- top: 0 !important;
18
- }
19
- /* Set right 0 */
20
- .right-0 {
21
- right: 0 !important;
22
- }
23
- /* Set bottom 0 */
24
- .bottom-0 {
25
- bottom: 0 !important;
26
- }
27
- /* Set left 0 */
28
- .left-0 {
29
- left: 0 !important;
15
+ /* Final position */
16
+ @each $breakpoint, $variant in $responsive-variants {
17
+ @include breakpoint($breakpoint) {
18
+ .top#{$variant}-0 {
19
+ top: 0 !important;
20
+ }
21
+ .right#{$variant}-0 {
22
+ right: 0 !important;
23
+ }
24
+ .bottom#{$variant}-0 {
25
+ bottom: 0 !important;
26
+ }
27
+ .left#{$variant}-0 {
28
+ left: 0 !important;
29
+ }
30
+ .top#{$variant}-auto {
31
+ top: auto !important;
32
+ }
33
+ .right#{$variant}-auto {
34
+ right: auto !important;
35
+ }
36
+ .bottom#{$variant}-auto {
37
+ bottom: auto !important;
38
+ }
39
+ .left#{$variant}-auto {
40
+ left: auto !important;
41
+ }
42
+ }
30
43
  }
31
44
 
32
45
  /* Vertical align middle */
@@ -55,15 +68,19 @@
55
68
  }
56
69
 
57
70
  // Overflow utilities
58
- @each $overflow in (visible, hidden, auto, scroll) {
59
- .overflow-#{$overflow} {
60
- overflow: $overflow !important;
61
- }
62
- .overflow-x-#{$overflow} {
63
- overflow-x: $overflow !important;
64
- }
65
- .overflow-y-#{$overflow} {
66
- overflow-y: $overflow !important;
71
+ @each $breakpoint, $variant in $responsive-variants {
72
+ @include breakpoint($breakpoint) {
73
+ @each $overflow in (visible, hidden, auto, scroll) {
74
+ .overflow#{$variant}-#{$overflow} {
75
+ overflow: $overflow !important;
76
+ }
77
+ .overflow#{$variant}-x-#{$overflow} {
78
+ overflow-x: $overflow !important;
79
+ }
80
+ .overflow#{$variant}-y-#{$overflow} {
81
+ overflow-y: $overflow !important;
82
+ }
83
+ }
67
84
  }
68
85
  }
69
86