jekyll-theme-modootoday 1.2.3 → 1.3.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: 2267c53131e210e3f7f99a1996f043db0b5705671cfa02010c4f9434c5353bb7
4
- data.tar.gz: f22bf89f56a0098b382d13056e993252a15f86dcde7064935b320ba2a5f60ea4
3
+ metadata.gz: 9eb1c4e782cdbaba12079575f273b74a14e9a0e701139858cbf72bf665409d2d
4
+ data.tar.gz: 41b86c06c720c2ca4077aed45c2e1cf8457aa2774630ffc3e28c8e8aa1041afa
5
5
  SHA512:
6
- metadata.gz: ed8043a8dcf73c34e666104c037f287936d8ad6be73202d31eb699c5aff2a7a08059a6e760e419049716c8fc64a1e229f8ab1ac1683748ce0e4168a28bc4e8ac
7
- data.tar.gz: b50e62f0b1ca1c0d206b1020704b1de403ad599e53cf52e18a25c3ad94451768546273e6305d129200f47a85781c23559cd7a70670ae427eedda175bbcbacd4f
6
+ metadata.gz: fd67889b39a19ad4d5e462543d8eb237d8e5823a2713aeeb9d7189d72ab71bbaf252f83e97a406edfb75ba760b822d9137bd211d8670f8cd47264d39a9c6d197
7
+ data.tar.gz: b7185e039610c3d5641eb29bf34a91bc436bdf3113645dd4ed07036e5d2d55d388bb1ffc74ea932d2ad0c88e70235ac2c123f45a002f902f5da2b3abde263dcf
data/CHANGELOG.md CHANGED
@@ -6,6 +6,15 @@ The content rules have their own version header (`md-components v1`) in [RULES.m
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.3.0] - 2026-10-31
10
+
11
+ ### Added
12
+
13
+ - `reference` layout, opt-in API sidebar: `sidebar: true` puts the member list in a side column that stays in view from 64rem up, with members grouped under their `group:` label (in order of first use); narrower screens show the same list above the page. CSS only, in the docs-extra bundle.
14
+ - `reference` layout, opt-in package table: `packages: [{name, version, text, url, links: [{label, url}]}]` (and an optional `packages_title:` caption) lists packages or crates with name, version, description and links before the body; rows stack into cards on small screens. The table is also available as `{% include modootoday/docs-extra/packages.html items=… %}`. A page with `packages:` may leave out `members:`.
15
+ - `modootoday-check` reports a `sidebar:` that is not true or false, a package with no `name`, and a package link with no `url`.
16
+ - API reference demo (en, ko, ja) and docs for both parts; the docs audit covers the new demo page.
17
+
9
18
  ## [1.2.3] - 2026-10-31
10
19
 
11
20
  ### Changed
@@ -266,7 +275,8 @@ Internal development milestones, never released. They are all part of 1.0.0.
266
275
  - Example: `sass.silence_deprecations: [import]` for Dart Sass; `llms.txt` per language generated instead of hand-written.
267
276
  - Raw `<name>.md` copies in `_site` on GitHub Pages: caused by content files without front matter (rendered by `jekyll-optional-front-matter` and also copied). Front matter is now required and checked.
268
277
 
269
- [Unreleased]: https://github.com/modootoday/jekyll-theme-modootoday/compare/v1.2.3...HEAD
278
+ [Unreleased]: https://github.com/modootoday/jekyll-theme-modootoday/compare/v1.3.0...HEAD
279
+ [1.3.0]: https://github.com/modootoday/jekyll-theme-modootoday/releases/tag/v1.3.0
270
280
  [1.2.3]: https://github.com/modootoday/jekyll-theme-modootoday/releases/tag/v1.2.3
271
281
  [1.2.2]: https://github.com/modootoday/jekyll-theme-modootoday/releases/tag/v1.2.2
272
282
  [1.2.1]: https://github.com/modootoday/jekyll-theme-modootoday/releases/tag/v1.2.1
data/README.ko.md CHANGED
@@ -30,7 +30,7 @@ gem 방식(`theme:`):
30
30
 
31
31
  ```ruby
32
32
  # Gemfile
33
- gem "jekyll-theme-modootoday", "~> 1.2"
33
+ gem "jekyll-theme-modootoday", "~> 1.3"
34
34
  ```
35
35
 
36
36
  ```yaml
@@ -42,7 +42,7 @@ Gemfile 없이 GitHub Pages에서(`remote_theme:`):
42
42
 
43
43
  ```yaml
44
44
  # _config.yml
45
- remote_theme: modootoday/jekyll-theme-modootoday@v1.2.3
45
+ remote_theme: modootoday/jekyll-theme-modootoday@v1.3.0
46
46
  plugins:
47
47
  - jekyll-remote-theme
48
48
  ```
@@ -53,7 +53,7 @@ plugins:
53
53
 
54
54
  ```sh
55
55
  mkdir my-docs && cd my-docs
56
- printf 'source "https://rubygems.org"\ngem "jekyll", "~> 4.4"\ngem "jekyll-theme-modootoday", "~> 1.2"\n' > Gemfile
56
+ printf 'source "https://rubygems.org"\ngem "jekyll", "~> 4.4"\ngem "jekyll-theme-modootoday", "~> 1.3"\n' > Gemfile
57
57
  printf 'theme: jekyll-theme-modootoday\nmarkdown: kramdown\nkramdown: {input: GFM}\nsass: {style: compressed, silence_deprecations: [import, global-builtin]}\n' > _config.yml
58
58
  printf -- '---\nlayout: doc\ntitle: Home\n---\n# Hello\n\n> [!TIP]\n> Plain Markdown, styled.\n' > index.md
59
59
  bundle install && bundle exec jekyll build
data/README.md CHANGED
@@ -27,7 +27,7 @@ As a gem (`theme:`):
27
27
 
28
28
  ```ruby
29
29
  # Gemfile
30
- gem "jekyll-theme-modootoday", "~> 1.2"
30
+ gem "jekyll-theme-modootoday", "~> 1.3"
31
31
  ```
32
32
 
33
33
  ```yaml
@@ -39,7 +39,7 @@ On GitHub Pages without a Gemfile (`remote_theme:`):
39
39
 
40
40
  ```yaml
41
41
  # _config.yml
42
- remote_theme: modootoday/jekyll-theme-modootoday@v1.2.3
42
+ remote_theme: modootoday/jekyll-theme-modootoday@v1.3.0
43
43
  plugins:
44
44
  - jekyll-remote-theme
45
45
  ```
@@ -50,7 +50,7 @@ Pin a tag or a commit. More options: [Install guide](https://modootoday.github.i
50
50
 
51
51
  ```sh
52
52
  mkdir my-docs && cd my-docs
53
- printf 'source "https://rubygems.org"\ngem "jekyll", "~> 4.4"\ngem "jekyll-theme-modootoday", "~> 1.2"\n' > Gemfile
53
+ printf 'source "https://rubygems.org"\ngem "jekyll", "~> 4.4"\ngem "jekyll-theme-modootoday", "~> 1.3"\n' > Gemfile
54
54
  printf 'theme: jekyll-theme-modootoday\nmarkdown: kramdown\nkramdown: {input: GFM}\nsass: {style: compressed, silence_deprecations: [import, global-builtin]}\n' > _config.yml
55
55
  printf -- '---\nlayout: doc\ntitle: Home\n---\n# Hello\n\n> [!TIP]\n> Plain Markdown, styled.\n' > index.md
56
56
  bundle install && bundle exec jekyll build
@@ -0,0 +1,14 @@
1
+ {%- include modootoday/i18n.html -%}
2
+ {%- comment -%}Package table: include.items is [{name, version, text, url, links: [{label, url}]}]; include.caption is optional.
3
+ One row per package (the name is the row header, the text under it); rows stack into cards on narrow screens. CSS in docs-extra.{%- endcomment -%}
4
+ <table class="mt-dx-pkgs">
5
+ {%- if include.caption %}<caption>{{ include.caption }}</caption>{% endif %}
6
+ <thead><tr><th scope="col">{{ mt_t_layouts_name }}</th><th scope="col">{{ mt_t_layouts_version }}</th><th scope="col">{{ mt_t_layouts_links }}</th></tr></thead>
7
+ <tbody>
8
+ {%- for p in include.items %}
9
+ <tr id="{{ p.id | default: p.name | slugify }}"><th scope="row"><code>{% if p.url %}<a href="{% include modootoday/link.html url=p.url %}">{{ p.name }}</a>{% else %}{{ p.name }}{% endif %}</code>{% if p.text %}<span>{{ p.text | markdownify | remove: "<p>" | remove: "</p>" | strip }}</span>{% endif %}</th>
10
+ <td data-label="{{ mt_t_layouts_version }}">{% if p.version %}<code>{{ p.version }}</code>{% endif %}</td>
11
+ <td data-label="{{ mt_t_layouts_links }}">{% if p.links.size > 0 %}<ul>{% for l in p.links %}<li><a href="{% include modootoday/link.html url=l.url %}"{% include modootoday/links/attrs.html on=l.new_window target=l.target url=l.url %}>{{ l.label }}</a></li>{% endfor %}</ul>{% endif %}</td></tr>
12
+ {%- endfor %}
13
+ </tbody>
14
+ </table>
@@ -3,13 +3,22 @@ layout: default
3
3
  mt_bundle: docs-extra
4
4
  mt_main: mt-dx mt-dx-reference
5
5
  ---
6
- {%- comment -%}reference: an API or option reference. members: [{name, signature, text, since, deprecated, id}] become a contents
7
- list and one section each (h2 with the name in code, the signature, the text, since / deprecated notes); the body comes first.{%- endcomment -%}
8
- <article aria-labelledby="mt-dx-title">
6
+ {%- comment -%}reference: an API or option reference. members: [{name, signature, text, since, deprecated, id, group}] become a contents
7
+ list and one section each (h2 with the name in code, the signature, the text, since / deprecated notes); the body comes first.
8
+ Opt-in: sidebar: true puts the contents in a sticky side column (members grouped by group, in order of first use; CSS only, a plain
9
+ list on narrow screens). packages: [{name, version, text, url, links: [{label, url}]}] adds a package table (packages.html) before the body.{%- endcomment -%}
10
+ <article aria-labelledby="mt-dx-title"{% if page.sidebar %} class="mt-dx-api"{% endif %}>
9
11
  {%- include modootoday/docs-extra/head.html %}
10
- {%- if page.members.size > 1 %}
12
+ {%- if page.sidebar and page.members.size > 0 %}
13
+ <nav class="mt-dx-side" aria-label="{{ mt_t_layouts_contents }}"><ul>
14
+ {%- assign _groups = page.members | group_by: "group" %}{% for g in _groups %}
15
+ {%- capture _links %}{% for m in g.items %}<li><a href="#{{ m.id | default: m.name | slugify }}"><code>{{ m.name }}</code></a></li>{% endfor %}{% endcapture %}
16
+ {%- if g.name != "" %}<li><span class="mt-dx-side-h">{{ g.name }}</span><ul>{{ _links }}</ul></li>{% else %}{{ _links }}{% endif %}
17
+ {%- endfor %}</ul></nav>
18
+ {%- elsif page.members.size > 1 %}
11
19
  <nav class="mt-dx-toc" aria-label="{{ mt_t_layouts_contents }}"><ul>{% for m in page.members %}<li><a href="#{{ m.id | default: m.name | slugify }}"><code>{{ m.name }}</code></a></li>{% endfor %}</ul></nav>
12
20
  {%- endif %}
21
+ {%- if page.packages %}{% include modootoday/docs-extra/packages.html items=page.packages caption=page.packages_title %}{% endif %}
13
22
  <div class="mt-dx-body">
14
23
  {{ content }}
15
24
  </div>
@@ -35,3 +35,36 @@
35
35
  .mt-dx-chapters li { padding: .5rem 0; border-bottom: 1px solid mt(border); }
36
36
  @media print { .mt-dx-toc, .mt-dx-letters { display: none; } .mt-dx-col, .mt-dx-member, .mt-dx-release { break-inside: avoid; } }
37
37
  }
38
+ // Opt-in reference parts: the API sidebar (sidebar: true) and the package table (packages:).
39
+ @include mt-layer(components) {
40
+ .mt-dx-side ul { margin: 0 0 1.5rem; padding: 0; list-style: none; }
41
+ .mt-dx-side ul ul { margin: .25rem 0 .75rem; }
42
+ .mt-dx-side a { display: block; padding: .25rem .5rem; border-radius: mt(radius); text-decoration: none; }
43
+ .mt-dx-side a:hover { background: mt(muted); }
44
+ .mt-dx-side-h { display: block; padding: .5rem .5rem .25rem; font-size: .8125rem; font-weight: 600; color: mt(muted-foreground); }
45
+ @media (min-width: 64rem) {
46
+ .mt-dx-api { display: grid; grid-template-columns: 14rem minmax(0, 1fr); column-gap: 2.5rem; }
47
+ .mt-dx-api > * { grid-column: 2; }
48
+ .mt-dx-api > .mt-dx-side { grid-column: 1; grid-row: 1 / span 999; align-self: start; position: sticky; top: 4.5rem; max-height: calc(100vh - 6rem); overflow-y: auto; padding-inline-end: .5rem; border-inline-end: 1px solid mt(border); }
49
+ .mt-dx-api > .mt-dx-side ul { margin-bottom: 0; }
50
+ }
51
+ .mt-dx-pkgs { display: table; width: 100%; margin-bottom: 2rem; }
52
+ .mt-dx-pkgs caption { padding: .75rem .9rem 0; font-weight: 600; text-align: start; }
53
+ .mt-dx-pkgs thead th { color: mt(muted-foreground); }
54
+ .mt-dx-pkgs tbody th { white-space: normal; background: none; font-size: inherit; font-weight: 400; }
55
+ .mt-dx-pkgs tr:last-child > th { border-bottom: 0; }
56
+ .mt-dx-pkgs tbody th > code { font-weight: 600; }
57
+ .mt-dx-pkgs tbody th > span { display: block; margin-top: .25rem; color: mt(muted-foreground); }
58
+ .mt-dx-pkgs ul { display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin: 0; padding: 0; list-style: none; }
59
+ .mt-dx-pkgs li { margin: 0; }
60
+ @media (max-width: 39.99rem) {
61
+ .mt-dx-pkgs, .mt-dx-pkgs caption, .mt-dx-pkgs tbody, .mt-dx-pkgs tr, .mt-dx-pkgs th, .mt-dx-pkgs td { display: block; }
62
+ .mt-dx-pkgs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
63
+ .mt-dx-pkgs tr { padding: .5rem .9rem; border-bottom: 1px solid mt(border); }
64
+ .mt-dx-pkgs tr:last-child { border-bottom: 0; }
65
+ .mt-dx-pkgs tbody th, .mt-dx-pkgs td { padding: .25rem 0; border: 0; }
66
+ .mt-dx-pkgs td:empty { display: none; }
67
+ .mt-dx-pkgs td::before { content: attr(data-label) ": "; color: mt(muted-foreground); font-size: .8125rem; }
68
+ }
69
+ @media print { .mt-dx-side { display: none; } .mt-dx-api { display: block; } }
70
+ }
@@ -17,7 +17,16 @@ module Modootoday
17
17
  send(fm["layout"], errs, w, fm)
18
18
  end
19
19
 
20
- def reference(errs, w, fm) = Shape.list(errs, w, "members", fm["members"], any: %w[name], optional: false)
20
+ # members is required unless the page lists packages; sidebar: is true or false; packages need a name, links a label and url.
21
+ def reference(errs, w, fm)
22
+ Shape.list(errs, w, "members", fm["members"], any: %w[name], optional: fm.key?("packages"))
23
+ errs << "#{w}: sidebar must be true or false" unless [nil, true, false].include?(fm["sidebar"])
24
+ Shape.list(errs, w, "packages", fm["packages"], any: %w[name]) do |p, i|
25
+ Shape.list(errs, w, "packages[#{i}].links", p["links"], any: %w[label]) do |l, j|
26
+ errs << "#{w}: packages[#{i}].links[#{j}].url is required" unless Shape.url?(l["url"])
27
+ end
28
+ end
29
+ end
21
30
 
22
31
  def changelog(errs, w, fm)
23
32
  Shape.list(errs, w, "releases", fm["releases"], any: %w[version], optional: false) do |r, i|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-modootoday
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - modootoday
@@ -79,6 +79,7 @@ files:
79
79
  - _includes/modootoday/doc/twin.html
80
80
  - _includes/modootoday/docs-extra/head.html
81
81
  - _includes/modootoday/docs-extra/jsonld.html
82
+ - _includes/modootoday/docs-extra/packages.html
82
83
  - _includes/modootoday/head-meta.html
83
84
  - _includes/modootoday/home-url.html
84
85
  - _includes/modootoday/i18n.html