jekyll-theme-amethyst 2.3.2 → 2.4.0

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: f9183ef83dbf1137a9bde691ba1ef2de927b5d462d72f497c16953d69f6a60a8
4
- data.tar.gz: c34a3002b361467e1da307fb20277691c53a4d8d455c7e8d956de1aca6ab82be
3
+ metadata.gz: e7f11beef32f5b5cc736636e1b5d63b1c86748283ca110978ad6df7a80728828
4
+ data.tar.gz: 495dc843aad3c03bb37724e53de8b65a2ace700507a190199a034a8419d77dca
5
5
  SHA512:
6
- metadata.gz: d77f6bfa7efb0ccec5e268b972232b5c994400384afee1f7ee5a9718f3643693d77b40200959afdca5cc698b9f0d41efc9c7aa06d338a2eb8b77da0f89f1b81a
7
- data.tar.gz: d7fce1b18a930b8805378210c5856618443b99fdff886852c9ab01efbf5c8aefc85196842c85a4e442a74fd64907adbad2dc4f2f54bc7ab0fb37238e4c1a7f8e
6
+ metadata.gz: d3d69301f63db1a7f91b452e8e359c62cf0aa95d7e4466fa41f1f2eb880c4ba9543dab1405a19d1b66926945eeea76430376d706156b6eacae792dafacf412ee
7
+ data.tar.gz: 55c367a7ebaee78f18b8d7ec3f6f843755e9151267b65ed37346e0216f260be1b0c6bfd8921a87c43e42cfa0e26b6e6fd1eeebeee8ffbc886d2cbbc3c583ee3d
data/_layouts/group.html CHANGED
@@ -15,7 +15,7 @@ amethyst:
15
15
  <div class="posts">
16
16
  {%- assign pages = site.pages | where: 'groups', page.group | sort_natural: 'title' -%}
17
17
  {% for page in pages %}
18
- <h2 id="{{ page.title | slugify }}"><a href="{{ page.url | relative_url }}">{{ page.title }}</a></h2>
18
+ <h2 id="{{ page.title | slugify }}" class="no_toc"><a href="{{ page.url | relative_url }}">{{ page.title }}</a></h2>
19
19
  <p>
20
20
  {%- if page.version_removed %}<strong>REMOVED</strong> {% endif -%}
21
21
  {%- if page.version_removed == nil and page.version_deprecated %}<strong>DEPRECATED</strong> {% endif -%}
@@ -56,8 +56,23 @@ do that here for convenience.
56
56
  {{ content }}
57
57
  </article>
58
58
  </div>
59
+ {%- comment -%}
60
+
61
+ * Pages that directly use "page-api" layout always have a TOC,
62
+ and this cannot be disabled.
63
+ E.g. all /api/*/*/ pages such as /api/foo/egg/.
64
+
65
+ * Custom layouts may extend "page-api" and may use `layout.amethyst.toc: false`
66
+ to disable the TOC on their pages by default.
67
+ The "group" layout does this, e.g. /api/foo/.
68
+
69
+ * Pages that use such custom layout may set `page.amethyst.toc: true`
70
+ to enable the TOC.
71
+ The "lorem" group index does this, at /api/lorem/.
72
+
73
+ {%- endcomment -%}
59
74
  {%- assign toc = true -%}
60
- {%- if layout.amethyst.toc == false -%}
75
+ {%- if layout.amethyst.toc == false and page.amethyst.toc != true -%}
61
76
  {%- assign toc = false -%}
62
77
  {%- endif %}
63
78
  {% include sidebar.html blocks="sidebar_api" toc=toc %}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-amethyst
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timo Tijhof
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-01-16 00:00:00.000000000 Z
12
+ date: 2025-01-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll