just-the-docs 0.4.2 → 0.5.1

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: b2a75d7008e3b7f782d50b4b3aed5e53db9f94f0b57a2c748cc252e0b41b39db
4
- data.tar.gz: a529b1bd98602fa0db7105a1203e8139ee84c93277e1fa8afee98fd540b5e79c
3
+ metadata.gz: 83da987642bb3ab4e6effd437df8ba6f9bfeffc3a165d3b616acacd02557d6a9
4
+ data.tar.gz: 5e8c992d3e888e62762b1cfc0a6c09687f4846273241b30afb9f504f3ee93011
5
5
  SHA512:
6
- metadata.gz: ecb0456688508db5ea904d3ee2a638ff9ecaa8eea80da2f36734f457ec9160497b152f1de3a158e27a27308641fc08ec456f5d6c18bfec7b433db5c1458a7144
7
- data.tar.gz: d50d2faa91d48465e5e33f1e37ca5f2364f9ec399f421aed57aefb8d11df27c025512992ec06987b36c2589a888cb6a66f0e694d329bc118b52d159766f4b8ae
6
+ metadata.gz: f0102310b666323d527447ed3c0794a119801730b41c058aa6467921dbccb1d145d57f6776046a539395181b9d154448098178f2aa19b13ab493dcc646191d60
7
+ data.tar.gz: c44bcffa016a9769b09105d567c3280aaa9e2e60914622d20438ddfb7aeac938adafdf98bc382edb61176c994ed9b518320be248189107033a7e072945dfce50
data/CHANGELOG.md CHANGED
@@ -16,7 +16,7 @@ The project underwent a major maintenance shift in March 2022.
16
16
  This website is built from the `HEAD` of the `main` branch of the theme repository.
17
17
 
18
18
  {: .warning }
19
- This website includes docs for some new features that are not available in `v0.4.2`!
19
+ This website includes docs for some new features that are not available in `v0.5.0`!
20
20
 
21
21
  Code changes to `main` that are *not* in the latest release:
22
22
 
@@ -26,6 +26,103 @@ Docs changes in `main` that are *not* in the latest release:
26
26
 
27
27
  - N/A
28
28
 
29
+ ## Release v0.5.1
30
+
31
+ Hi all, this is a very small minor patch release that has two small behavioral bugfixes: fixing a regression introduced in `v0.5.0` on Safari versions `<16.4` (broken media query), and the copy code button providing incorrect feedback in insecure browser contexts. This should be a smooth upgrade with no breaking changes.
32
+
33
+ As always, we'd love your feedback. [Open an issue](https://github.com/just-the-docs/just-the-docs/issues) or [start a discussion](https://github.com/just-the-docs/just-the-docs/discussions) for bug reports, feature requests, and any other feedback. Thanks for continuing to use Just the Docs!
34
+
35
+ ### Using Release `v0.5.1`
36
+
37
+ Users who have not pinned the theme version will be **automatically upgraded to `v0.5.1` the next time they build their site**.
38
+
39
+ To use this release explicitly as a remote theme:
40
+
41
+ ```yml
42
+ remote_theme: just-the-docs/just-the-docs@v0.5.1
43
+ ```
44
+
45
+ To use this version explicitly as a gem-based theme, pin the version in your `Gemfile` and re-run `bundle install` or `bundle update just-the-docs`:
46
+
47
+ ```ruby
48
+ gem "just-the-docs", "0.5.1"
49
+ ```
50
+
51
+ To use and pin a previous version of the theme, replace the `0.5.1` with the desired release tag.
52
+
53
+ ### Bugfixes
54
+
55
+
56
+ - Fixed: disable copy code button in insecure contexts [@rmoff] in [#1226]
57
+ - Fixed: context-based media feature not supported by Safari `<16.4` by [@mattxwang] in [#1240]
58
+
59
+ ### Documentation
60
+
61
+ - Added: document copy code button requiring secure context by [@rmoff] in [#1225]
62
+ - Fixed: typo ("them" → "theme") in MIGRATION.md by [@waldyrious] in [#1219]
63
+ - Fixed: `font-weight` typo (Utilities > Typography) by [@mattxwang] in [#1229]
64
+ - Fixed: `just the docs` typo in migration guide by [@mattxwang] in [#1230]
65
+
66
+ ### New Contributors
67
+ - [@rmoff] made their first contribution in [#1225]
68
+
69
+ [#1219]: https://github.com/just-the-docs/just-the-docs/pull/1219
70
+ [#1225]: https://github.com/just-the-docs/just-the-docs/pull/1225
71
+ [#1226]: https://github.com/just-the-docs/just-the-docs/pull/1226
72
+ [#1229]: https://github.com/just-the-docs/just-the-docs/pull/1229
73
+ [#1230]: https://github.com/just-the-docs/just-the-docs/pull/1230
74
+ [#1240]: https://github.com/just-the-docs/just-the-docs/pull/1240
75
+
76
+ [@rmoff]: https://github.com/rmoff
77
+
78
+ ## Release v0.5.0
79
+
80
+ Hope your April is going well! This new release of Just the Docs is relatively minor. It has one **breaking change**: we've reverted the import order of `setup.scss` to be *before* color schemes. In addition, we include two requested fixes: color contrast issues with `::selection` and using Just the Docs with mermaid versions `>=10`.
81
+
82
+ We've marked this as a minor version bump due to the breaking change. In the next section, we briefly outline what migration steps should be. Users who did not migrate to `v0.4.2` or who do not have a custom `setup.scss` are guaranteed no breaking changes.
83
+
84
+ As always, we'd love your feedback. [Open an issue](https://github.com/just-the-docs/just-the-docs/issues) or [start a discussion](https://github.com/just-the-docs/just-the-docs/discussions) for bug reports, feature requests, and any other feedback. Thanks for continuing to use Just the Docs!
85
+
86
+ ### Migrating to `v0.5.0`
87
+
88
+ **Migration**: users with a custom `setup.scss` cannot rely on variables or functions defined in `color_scheme`. This reverts to the behaviour in `v0.4.1`. Users should instead move those variables or functions to the `color_scheme` files themselves.
89
+
90
+ For more, refer to the [migration guide](https://just-the-docs.github.io/just-the-docs/MIGRATION/).
91
+
92
+ ### Using Release `v0.5.0`
93
+
94
+ Users who have not pinned the theme version will be **automatically upgraded to `v0.5.0` the next time they build their site**.
95
+
96
+ To use this release explicitly as a remote theme:
97
+
98
+ ```yml
99
+ remote_theme: just-the-docs/just-the-docs@v0.5.0
100
+ ```
101
+
102
+ To use this version explicitly as a gem-based theme, pin the version in your `Gemfile` and re-run `bundle install` or `bundle update just-the-docs`:
103
+
104
+ ```ruby
105
+ gem "just-the-docs", "0.5.0"
106
+ ```
107
+
108
+ To use and pin a previous version of the theme, replace the `0.5.0` with the desired release tag.
109
+
110
+ ### Bugfixes
111
+
112
+ - **Reverted (breaking)**: "Fix import order for `setup.scss` (#1184)" by [@mattxwang] in [#1209]
113
+ - Fixed: color contrast issues with `::selection` (reverting to browser defaults) [@mattxwang] in [#1208]
114
+ - Fixed: mermaid `v10`, bundle all mermaid code in component by [@mattxwang] in [#1190]
115
+ - Removed: unused images (`just-the-docs.png`, `search.svg`) by [@mattxwang] in [#1107]
116
+ - Removed: `CODE_OF_CONDUCT`, `docker-compose`, and `Dockerfile` files from site by [@mattxwang] in [#1187]
117
+
118
+ **Full Changelog**: [https://github.com/just-the-docs/just-the-docs/compare/v0.4.2...v0.5.0](https://github.com/just-the-docs/just-the-docs/compare/v0.4.2...v0.5.0)
119
+
120
+ [#1107]: https://github.com/just-the-docs/just-the-docs/pull/1107
121
+ [#1187]: https://github.com/just-the-docs/just-the-docs/pull/1187
122
+ [#1190]: https://github.com/just-the-docs/just-the-docs/pull/1190
123
+ [#1208]: https://github.com/just-the-docs/just-the-docs/pull/1208
124
+ [#1209]: https://github.com/just-the-docs/just-the-docs/pull/1209
125
+
29
126
  ## Release v0.4.2
30
127
 
31
128
  Hello! We're back again with another small release. Like `v0.4.1`, this release is a [semver patch](https://semver.org/): it only includes bugfixes, and is fully backwards-compatible.
@@ -1,5 +1,45 @@
1
+ {% comment %}
2
+ The complexity of this file comes from a breaking change in Mermaid v10; mermaid.init has been deprecated (and supposedly, didn't work earlier?).
3
+
4
+ So, we check whether the user's Mermaid version is >= 10; if not, we fall back to the previous init syntax.
5
+
6
+ If a user is using a custom mermaid file and doesn't specify a version, we default to the < v10 behaviour. Users who use version v10 or above should specify this in the version key.
7
+ {% endcomment %}
8
+
9
+ {% if site.mermaid.version %}
10
+ {% assign mermaid_major_version = site.mermaid.version | split: "." | first | plus: 0 %}
11
+ {% else %}
12
+ {% assign mermaid_major_version = 9 %}
13
+ {% endif %}
14
+
15
+ {% if mermaid_major_version > 9 %}
16
+
17
+ <script type="module">
18
+ {% if site.mermaid.path %}
19
+ import mermaid from '{{ site.mermaid.path | relative_url }}';
20
+ {% else %}
21
+ import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@{{ site.mermaid.version }}/dist/mermaid.esm.min.mjs';
22
+ {% endif %}
23
+
24
+ var config = {% include mermaid_config.js %};
25
+ mermaid.initialize(config);
26
+ mermaid.run({
27
+ querySelector: '.language-mermaid',
28
+ });
29
+ </script>
30
+
31
+ {% else %}
32
+
33
+ {% if site.mermaid.path %}
34
+ <script src="{{ site.mermaid.path | relative_url }}"></script>
35
+ {% else %}
36
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@{{ site.mermaid.version }}/dist/mermaid.min.js"></script>
37
+ {% endif %}
38
+
1
39
  <script>
2
40
  var config = {% include mermaid_config.js %};
3
41
  mermaid.initialize(config);
4
42
  window.mermaid.init(undefined, document.querySelectorAll('.language-mermaid'));
5
43
  </script>
44
+
45
+ {% endif %}
@@ -2,11 +2,11 @@
2
2
  $logo: "{{ site.logo | relative_url }}";
3
3
  {% endif %}
4
4
  @import "./support/support";
5
+ @import "./custom/setup";
5
6
  @import "./color_schemes/light";
6
7
  {% unless include.color_scheme == "light" %}
7
8
  @import "./color_schemes/{{ include.color_scheme }}";
8
9
  {% endunless %}
9
- @import "./custom/setup";
10
10
  @import "./modules";
11
11
  {% include css/callouts.scss.liquid color_scheme = include.color_scheme %}
12
12
  {% include css/custom.scss.liquid %}
data/_includes/head.html CHANGED
@@ -22,14 +22,6 @@
22
22
  <script src="{{ '/assets/js/vendor/lunr.min.js' | relative_url }}"></script>
23
23
  {% endif %}
24
24
 
25
- {% if site.mermaid %}
26
- {% if site.mermaid.path %}
27
- <script src="{{ site.mermaid.path | relative_url }}"></script>
28
- {% else %}
29
- <script src="https://cdn.jsdelivr.net/npm/mermaid@{{ site.mermaid.version }}/dist/mermaid.min.js"></script>
30
- {% endif %}
31
- {% endif %}
32
-
33
25
  <script src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>
34
26
 
35
27
  <meta name="viewport" content="width=device-width, initial-scale=1">
data/_sass/base.scss CHANGED
@@ -5,11 +5,6 @@
5
5
  box-sizing: border-box;
6
6
  }
7
7
 
8
- ::selection {
9
- color: $white;
10
- background: $link-color;
11
- }
12
-
13
8
  html {
14
9
  @include fs-4;
15
10
 
@@ -200,9 +200,6 @@ pre.highlight {
200
200
  .highlight .gi {
201
201
  color: #43d089;
202
202
  }
203
- .highlight ::selection {
204
- background-color: #fff;
205
- }
206
203
  .highlight .language-json .w + .s2 {
207
204
  color: #e35549;
208
205
  }
@@ -488,6 +488,11 @@ jtd.onReady(function(){
488
488
 
489
489
  jtd.onReady(function(){
490
490
 
491
+ if (!window.isSecureContext) {
492
+ console.log('Window does not have a secure context, therefore code clipboard copy functionality will not be available. For more details see https://web.dev/async-clipboard/#security-and-permissions');
493
+ return;
494
+ }
495
+
491
496
  var codeBlocks = document.querySelectorAll('div.highlighter-rouge, div.listingblock > div.content, figure.highlight');
492
497
 
493
498
  // note: the SVG svg-copied and svg-copy is only loaded as a Jekyll include if site.enable_copy_code_button is true; see _includes/icons/icons.html
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just-the-docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Marsceill
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-03-15 00:00:00.000000000 Z
12
+ date: 2023-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -163,7 +163,6 @@ files:
163
163
  - assets/css/just-the-docs-dark.scss
164
164
  - assets/css/just-the-docs-default.scss
165
165
  - assets/css/just-the-docs-light.scss
166
- - assets/images/search.svg
167
166
  - assets/js/just-the-docs.js
168
167
  - assets/js/vendor/lunr.min.js
169
168
  - assets/js/zzzz-search-data.json
@@ -1 +0,0 @@
1
- <svg width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><title>Search</title><g fill-rule="nonzero" fill="#959396"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"/><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"/></g></svg>