jekyll-theme-modootoday 1.4.0 → 1.4.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: 56331c6dac359c696c167df9919dc66dbe9616362e056b597aa95c57ca11bcb2
4
- data.tar.gz: ec6fca55ae534ff1326c889fbbdb4f477aed4c759b99b26659012b738a4d06c3
3
+ metadata.gz: ba068af52c4217d7469bbaf5d086362b4704281f9a3ce7b9a96ca826e66c6f11
4
+ data.tar.gz: ea56a35d36bbb798fabe491a206314227f6253f0228370f62330a3bb0f4aa040
5
5
  SHA512:
6
- metadata.gz: afe53d2405f415fa08cb9f590512b804e9ca4c7128ef7005d0a1f0d128784fd84ef7db7a7350d59475e45799d218443c0aa10384a6a6e95c80f570e16b859ea4
7
- data.tar.gz: 0c2fee882f3647b394dd5bcf2c17683880b2336862d868c6ff194a7ce8e172786c0b0b0101b54f91271b4e9af61876a88983ff11290649f00686034b816a1235
6
+ metadata.gz: 9cb0516b1496e14dc54c91c99f08b490eb3b314f62e1946e647a02d9377f7f19331d3ac979ab483285a97b4322eedd28168b1cc7483ea798596d61578a1c2b2a
7
+ data.tar.gz: 33f345936a60b53e2097eb4a6177bf6490f43711143584fd361ad6caa2ac8a93497efa5ee8f9de85f44441195154ceefefd4f1048f0545c5dda8bc451f09f80d
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ The content rules have their own version header (`md-components v1`) in [RULES.m
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.4.1] - 2026-10-31
10
+
11
+ ### Fixed
12
+
13
+ - Markdown twins and `llms-full.txt` now include a `reference` page's `packages:` table as a Markdown table (with `packages_title`, before or after the body as `packages_position` sets, without the text when `packages_compact: true`); pipes in cells are escaped. `modootoday-check --twins` accepts that table around the byte-identical body. Pages without `packages:` are unchanged.
14
+
9
15
  ## [1.4.0] - 2026-10-31
10
16
 
11
17
  ### Added
@@ -287,7 +293,8 @@ Internal development milestones, never released. They are all part of 1.0.0.
287
293
  - Example: `sass.silence_deprecations: [import]` for Dart Sass; `llms.txt` per language generated instead of hand-written.
288
294
  - 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.
289
295
 
290
- [Unreleased]: https://github.com/modootoday/jekyll-theme-modootoday/compare/v1.4.0...HEAD
296
+ [Unreleased]: https://github.com/modootoday/jekyll-theme-modootoday/compare/v1.4.1...HEAD
297
+ [1.4.1]: https://github.com/modootoday/jekyll-theme-modootoday/releases/tag/v1.4.1
291
298
  [1.4.0]: https://github.com/modootoday/jekyll-theme-modootoday/releases/tag/v1.4.0
292
299
  [1.3.0]: https://github.com/modootoday/jekyll-theme-modootoday/releases/tag/v1.3.0
293
300
  [1.2.3]: https://github.com/modootoday/jekyll-theme-modootoday/releases/tag/v1.2.3
data/README.ko.md CHANGED
@@ -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.4.0
45
+ remote_theme: modootoday/jekyll-theme-modootoday@v1.4.1
46
46
  plugins:
47
47
  - jekyll-remote-theme
48
48
  ```
data/README.md CHANGED
@@ -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.4.0
42
+ remote_theme: modootoday/jekyll-theme-modootoday@v1.4.1
43
43
  plugins:
44
44
  - jekyll-remote-theme
45
45
  ```
@@ -0,0 +1,22 @@
1
+ {%- comment -%}md-components v1: the package table of include.page (reference layout, packages:) as Markdown, for the twin and
2
+ llms-full layouts. Optional bold packages_title line, then | Name | Version | Links |; the name links to url, its text follows
3
+ after ": " unless packages_compact; pipes are escaped and newlines become spaces. Ends with a newline. Empty without packages.{%- endcomment -%}
4
+ {%- assign _pp = include.page -%}
5
+ {%- if _pp.layout == "reference" and _pp.packages.size > 0 -%}
6
+ {%- include modootoday/i18n.html -%}
7
+ {%- assign _nl = "
8
+ " -%}
9
+ {%- if _pp.packages_title %}**{{ _pp.packages_title | replace: _nl, " " | replace: "|", "\|" }}**
10
+
11
+ {% endif -%}
12
+ | {{ mt_t_layouts_name }} | {{ mt_t_layouts_version }} | {{ mt_t_layouts_links }} |
13
+ | --- | --- | --- |
14
+ {% for p in _pp.packages -%}
15
+ {%- capture _n %}`{{ p.name }}`{% endcapture -%}
16
+ {%- if p.url %}{% capture _u %}{% include modootoday/link.html url=p.url %}{% endcapture %}{% assign _n = "[" | append: _n | append: "](" | append: _u | append: ")" %}{% endif -%}
17
+ {%- if p.text and _pp.packages_compact != true %}{% assign _n = _n | append: ": " | append: p.text %}{% endif -%}
18
+ {%- capture _ls %}{% for l in p.links %}{% unless forloop.first %}, {% endunless %}[{{ l.label }}]({% include modootoday/link.html url=l.url %}){% endfor %}{% endcapture -%}
19
+ {%- capture _v %}{% if p.version %}`{{ p.version }}`{% endif %}{% endcapture -%}
20
+ | {{ _n | replace: _nl, " " | replace: "|", "\|" }} | {{ _v | replace: "|", "\|" }} | {{ _ls | replace: _nl, " " | replace: "|", "\|" }} |
21
+ {% endfor -%}
22
+ {%- endif -%}
@@ -1,6 +1,14 @@
1
- {%- comment -%}md-components v1: the source body of include.file (path relative to the current page), front matter removed. Used by the twin and llms-full layouts.{%- endcomment -%}
1
+ {%- comment -%}md-components v1: the source body of include.file (path relative to the current page), front matter removed. Used by the twin and llms-full layouts.
2
+ With include.page (the source page), a reference page's packages: table is added before the body, or after it with packages_position: after.{%- endcomment -%}
2
3
  {%- capture _raw -%}{% include_relative {{ include.file }} %}{%- endcapture -%}
3
4
  {%- assign _fm = _raw | split: "---" -%}
4
5
  {%- assign _front = "---" | append: _fm[1] | append: "---
5
6
  " -%}
6
- {{- _raw | remove_first: _front -}}
7
+ {%- assign _body = _raw | remove_first: _front -%}
8
+ {%- capture _pkmd %}{% if include.page %}{% include modootoday/markdown/packages.html page=include.page %}{% endif %}{% endcapture -%}
9
+ {%- if _pkmd == "" -%}{{- _body -}}
10
+ {%- elsif include.page.packages_position == "after" -%}{{- _body }}
11
+ {{ _pkmd -}}
12
+ {%- else -%}{{- _pkmd }}
13
+ {{ _body -}}
14
+ {%- endif -%}
@@ -1,8 +1,8 @@
1
- {%- comment -%}md-components v1 llms-full.txt: the source body of every page of this language under this directory, byte-for-byte, separated by a blank line. Use from a stub: front matter `layout: llms-full` only.{%- endcomment -%}
1
+ {%- comment -%}md-components v1 llms-full.txt: the source body of every page of this language under this directory, byte-for-byte (plus a reference page's packages: table as Markdown), separated by a blank line. Use from a stub: front matter `layout: llms-full` only.{%- endcomment -%}
2
2
  {%- include modootoday/markdown/llms-pages.html -%}
3
3
  {%- for _p in _llms_pages -%}
4
4
  {%- assign _rel = _p.path | remove_first: _llms_dir -%}
5
5
  {%- unless forloop.first %}
6
6
  {% endunless -%}
7
- {%- include modootoday/markdown/raw-body.html file=_rel -%}
7
+ {%- include modootoday/markdown/raw-body.html file=_rel page=_p -%}
8
8
  {%- endfor -%}
data/_layouts/twin.html CHANGED
@@ -1,2 +1,5 @@
1
- {%- comment -%}md-components v1 twin: outputs the source body of page.twin_of byte-for-byte.{%- endcomment -%}
2
- {%- include modootoday/markdown/raw-body.html file=page.twin_of -%}
1
+ {%- comment -%}md-components v1 twin: outputs the source body of page.twin_of byte-for-byte (a reference page's packages: table is added as Markdown).{%- endcomment -%}
2
+ {%- assign _tdir = page.path | split: "/" | pop | join: "/" -%}{%- if _tdir != "" -%}{%- assign _tdir = _tdir | append: "/" -%}{%- endif -%}
3
+ {%- assign _tpath = _tdir | append: page.twin_of -%}
4
+ {%- assign _tpage = site.pages | where: "path", _tpath | first -%}
5
+ {%- include modootoday/markdown/raw-body.html file=page.twin_of page=_tpage -%}
@@ -6,6 +6,8 @@ module Modootoday
6
6
  # (/index.md for index.md), byte-identical to its source body. It comes from a stub <name>.md.txt
7
7
  # (layout: twin; works on GitHub Pages) or from the opt-in plugin (plugins: [jekyll-theme-modootoday]).
8
8
  # With modootoday.twins: source, a page without front matter is its own twin at /<path>.md.
9
+ # A reference page's packages: table is added to its twin as Markdown, before the body (or after it with
10
+ # packages_position: after); the body itself must still be there byte-for-byte.
9
11
  # llms.txt / llms-full.txt exist at / and at each /<lang>/; llms-full.txt contains every page body.
10
12
  module Twins
11
13
  HINT = "add a stub %s (front matter `layout: twin`, `twin_of`, `permalink`) or enable `plugins: [jekyll-theme-modootoday]` (not on classic GitHub Pages)"
@@ -43,10 +45,20 @@ module Modootoday
43
45
  return
44
46
  end
45
47
  out = File.basename(r) == "index" ? "#{site}/#{r}.md" : "#{site}/#{r}/index.md"
46
- b = Markdown.body(File.read(f))
48
+ src = File.read(f)
49
+ b = Markdown.body(src)
47
50
  bodies[ctx.lang_of(r).to_s] << [rf, b]
48
51
  return errs << "#{rf}: twin missing at #{out}: #{format(HINT, "#{rf}.txt")}" unless File.exist?(out)
49
- errs << "#{out}: twin is not byte-identical to the body of #{rf}" unless File.binread(out) == b.b
52
+ tw = File.binread(out)
53
+ fm = (Markdown.fm(src) rescue {})
54
+ pk = fm["layout"] == "reference" && fm["packages"].is_a?(Array) && !fm["packages"].empty? ? fm["packages"] : nil
55
+ return errs << "#{out}: twin is not byte-identical to the body of #{rf}" unless pk || tw == b.b
56
+ return unless pk
57
+ after = fm["packages_position"] == "after"
58
+ ok = after ? tw.start_with?(b.b) : tw.end_with?(b.b)
59
+ names = pk.map { |x| x.is_a?(Hash) ? x["name"].to_s : "" }
60
+ ok &&= names.all? { |n| tw.include?("`#{n}`".b) }
61
+ errs << "#{out}: twin must be the body of #{rf} with its packages: table #{after ? 'after' : 'before'} it" unless ok
50
62
  end
51
63
 
52
64
  def llms(ctx, bodies)
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.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - modootoday
@@ -134,6 +134,7 @@ files:
134
134
  - _includes/modootoday/markdown/inline.html
135
135
  - _includes/modootoday/markdown/lists.html
136
136
  - _includes/modootoday/markdown/llms-pages.html
137
+ - _includes/modootoday/markdown/packages.html
137
138
  - _includes/modootoday/markdown/raw-body.html
138
139
  - _includes/modootoday/markdown/sections.html
139
140
  - _includes/modootoday/markdown/split.html