jekyll-slides 0.1.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.
Files changed (53) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +25 -0
  3. data/LICENSE.txt +203 -0
  4. data/README.md +180 -0
  5. data/_includes/slides/controls.html +28 -0
  6. data/_includes/slides/overview.html +1 -0
  7. data/_includes/slides/progress.html +3 -0
  8. data/_layouts/presentation.html +36 -0
  9. data/assets/css/presentation.css +2 -0
  10. data/assets/fonts/OFL-atkinson-hyperlegible-mono.txt +93 -0
  11. data/assets/fonts/OFL-atkinson-hyperlegible-next.txt +93 -0
  12. data/assets/fonts/README.md +56 -0
  13. data/assets/fonts/atkinson-hyperlegible-mono-italic.woff2 +0 -0
  14. data/assets/fonts/atkinson-hyperlegible-mono.woff2 +0 -0
  15. data/assets/fonts/atkinson-hyperlegible-next-italic.woff2 +0 -0
  16. data/assets/fonts/atkinson-hyperlegible-next.woff2 +0 -0
  17. data/assets/js/presentation.js +370 -0
  18. data/doc/CHANGELOG.md +25 -0
  19. data/doc/Jekyll/Slides/Assets/SiteAssetFile.md +10 -0
  20. data/doc/Jekyll/Slides/Assets.md +12 -0
  21. data/doc/Jekyll/Slides/ComponentRenderer/RenderedDocument.md +15 -0
  22. data/doc/Jekyll/Slides/ComponentRenderer.md +33 -0
  23. data/doc/Jekyll/Slides/JekyllIntegration.md +28 -0
  24. data/doc/Jekyll/Slides/Layout.md +10 -0
  25. data/doc/Jekyll/Slides/Presentation.md +19 -0
  26. data/doc/Jekyll/Slides/PresentationParser.md +17 -0
  27. data/doc/Jekyll/Slides/RangeParser.md +21 -0
  28. data/doc/Jekyll/Slides/Renderer.md +10 -0
  29. data/doc/Jekyll/Slides/RougeRenderer.md +16 -0
  30. data/doc/Jekyll/Slides/SlideMetadata.md +43 -0
  31. data/doc/Jekyll/Slides/SlideRenderer.md +13 -0
  32. data/doc/Jekyll/Slides/Support.md +12 -0
  33. data/doc/Jekyll/Slides.md +50 -0
  34. data/doc/Jekyll.md +5 -0
  35. data/doc/README.md +180 -0
  36. data/doc/index.csv +71 -0
  37. data/lib/jekyll/slides/assets.rb +47 -0
  38. data/lib/jekyll/slides/component_renderer.rb +237 -0
  39. data/lib/jekyll/slides/jekyll_integration.rb +126 -0
  40. data/lib/jekyll/slides/layout.rb +20 -0
  41. data/lib/jekyll/slides/presentation.rb +22 -0
  42. data/lib/jekyll/slides/presentation_parser.rb +102 -0
  43. data/lib/jekyll/slides/range_parser.rb +52 -0
  44. data/lib/jekyll/slides/renderer.rb +21 -0
  45. data/lib/jekyll/slides/rouge_renderer.rb +58 -0
  46. data/lib/jekyll/slides/slide_metadata.rb +85 -0
  47. data/lib/jekyll/slides/slide_renderer.rb +93 -0
  48. data/lib/jekyll/slides/support.rb +25 -0
  49. data/lib/jekyll/slides/version.rb +7 -0
  50. data/lib/jekyll/slides.rb +39 -0
  51. data/lib/jekyll-slides.rb +3 -0
  52. data/llm.txt +50 -0
  53. metadata +175 -0
@@ -0,0 +1,12 @@
1
+ # Module Jekyll::Slides::Assets <a id="module-Jekyll-Slides-Assets"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/jekyll/slides/assets.rb |
6
+
7
+ ## Public Class Methods
8
+ ### `asset_files()` <a id="method-c-asset_files"></a> <a id="asset_files-class_method"></a>
9
+ Not documented.
10
+
11
+ ### `install(site)` <a id="method-c-install"></a> <a id="install-class_method"></a>
12
+ Not documented.
@@ -0,0 +1,15 @@
1
+ # Class Jekyll::Slides::ComponentRenderer::RenderedDocument <a id="class-Jekyll-Slides-ComponentRenderer-RenderedDocument"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Struct |
6
+ | **Defined in** | lib/jekyll/slides/component_renderer.rb |
7
+
8
+ ## Attributes
9
+ ### `components` [RW] <a id="attribute-i-components"></a> <a id="components-instance_method"></a>
10
+ Returns the value of attribute components
11
+ - **@return** [Object] the current value of components
12
+
13
+ ### `fragments` [RW] <a id="attribute-i-fragments"></a> <a id="fragments-instance_method"></a>
14
+ Returns the value of attribute fragments
15
+ - **@return** [Object] the current value of fragments
@@ -0,0 +1,33 @@
1
+ # Class Jekyll::Slides::ComponentRenderer <a id="class-Jekyll-Slides-ComponentRenderer"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/jekyll/slides/component_renderer.rb |
7
+
8
+ ## Constants
9
+ ### `FRAGMENT_PATTERN` <a id="constant-FRAGMENT_PATTERN"></a> <a id="FRAGMENT_PATTERN-constant"></a>
10
+ Not documented.
11
+
12
+ ### `LONG_CODE_LINE_THRESHOLD` <a id="constant-LONG_CODE_LINE_THRESHOLD"></a> <a id="LONG_CODE_LINE_THRESHOLD-constant"></a>
13
+ Advisory only: available space depends on the slide layout and component size.
14
+
15
+ ### `SIZES` <a id="constant-SIZES"></a> <a id="SIZES-constant"></a>
16
+ Not documented.
17
+
18
+ ## Public Class Methods
19
+ ### `render(markdown, warning: = nil, options: = {})` <a id="method-c-render"></a> <a id="render-class_method"></a>
20
+ Not documented.
21
+
22
+ ## Public Instance Methods
23
+ ### `initialize(warning: = nil, rouge_renderer: = nil, options: = {})` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
24
+ - **@return** [ComponentRenderer] a new instance of ComponentRenderer
25
+
26
+ ### `render(markdown)` <a id="method-i-render"></a> <a id="render-instance_method"></a>
27
+ Not documented.
28
+
29
+ ### `render_document(markdown, id_prefix: = "")` <a id="method-i-render_document"></a> <a id="render_document-instance_method"></a>
30
+ Not documented.
31
+
32
+ ### `render_fragments(markdown, id_prefix: = "")` <a id="method-i-render_fragments"></a> <a id="render_fragments-instance_method"></a>
33
+ Not documented.
@@ -0,0 +1,28 @@
1
+ # Module Jekyll::Slides::JekyllIntegration <a id="module-Jekyll-Slides-JekyllIntegration"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/jekyll/slides/jekyll_integration.rb |
6
+
7
+ ## Constants
8
+ ### `BOOLEAN_OPTIONS` <a id="constant-BOOLEAN_OPTIONS"></a> <a id="BOOLEAN_OPTIONS-constant"></a>
9
+ Not documented.
10
+
11
+ ### `DEFAULTS` <a id="constant-DEFAULTS"></a> <a id="DEFAULTS-constant"></a>
12
+ Not documented.
13
+
14
+ ### `OPTION_KEYS` <a id="constant-OPTION_KEYS"></a> <a id="OPTION_KEYS-constant"></a>
15
+ Not documented.
16
+
17
+ ### `THEMES` <a id="constant-THEMES"></a> <a id="THEMES-constant"></a>
18
+ Not documented.
19
+
20
+ ## Public Class Methods
21
+ ### `install!()` <a id="method-c-install-21"></a> <a id="install!-class_method"></a>
22
+ Not documented.
23
+
24
+ ### `process(document)` <a id="method-c-process"></a> <a id="process-class_method"></a>
25
+ Not documented.
26
+
27
+ ### `process_site(site)` <a id="method-c-process_site"></a> <a id="process_site-class_method"></a>
28
+ Not documented.
@@ -0,0 +1,10 @@
1
+ # Class Jekyll::Slides::Layout <a id="class-Jekyll-Slides-Layout"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Jekyll::Layout |
6
+ | **Defined in** | lib/jekyll/slides/layout.rb |
7
+
8
+ ## Public Instance Methods
9
+ ### `initialize(site)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
10
+ - **@return** [Layout] a new instance of Layout
@@ -0,0 +1,19 @@
1
+ # Class Jekyll::Slides::Presentation <a id="class-Jekyll-Slides-Presentation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/jekyll/slides/presentation.rb |
7
+
8
+ Renders a Markdown deck into slide sections without the page layout.
9
+
10
+ ## Public Instance Methods
11
+ ### `initialize(markdown, warning: = nil, options: = {})` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
12
+ - **@param** `markdown` [String] Markdown without page YAML front matter
13
+ - **@param** `warning` [#call, nil] receives advisory rendering warnings
14
+ - **@param** `options` [Hash] kramdown options
15
+ - **@return** [Presentation] a new instance of Presentation
16
+
17
+ ### `render(markdown = @markdown)` <a id="method-i-render"></a> <a id="render-instance_method"></a>
18
+ - **@param** `markdown` [String] optional replacement for the initial Markdown
19
+ - **@return** [String] rendered slide section HTML
@@ -0,0 +1,17 @@
1
+ # Class Jekyll::Slides::PresentationParser <a id="class-Jekyll-Slides-PresentationParser"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/jekyll/slides/presentation_parser.rb |
7
+
8
+ ## Public Class Methods
9
+ ### `parse(body)` <a id="method-c-parse"></a> <a id="parse-class_method"></a>
10
+ Not documented.
11
+
12
+ ## Public Instance Methods
13
+ ### `initialize(body = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
14
+ - **@return** [PresentationParser] a new instance of PresentationParser
15
+
16
+ ### `parse(body = @body)` <a id="method-i-parse"></a> <a id="parse-instance_method"></a>
17
+ Not documented.
@@ -0,0 +1,21 @@
1
+ # Class Jekyll::Slides::RangeParser <a id="class-Jekyll-Slides-RangeParser"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/jekyll/slides/range_parser.rb |
7
+
8
+ ## Constants
9
+ ### `MAX_RANGE_SIZE` <a id="constant-MAX_RANGE_SIZE"></a> <a id="MAX_RANGE_SIZE-constant"></a>
10
+ Prevent author-controlled ranges from forcing unbounded allocation.
11
+
12
+ ## Public Class Methods
13
+ ### `parse(value, warning: = nil, max_line: = nil)` <a id="method-c-parse"></a> <a id="parse-class_method"></a>
14
+ Not documented.
15
+
16
+ ## Public Instance Methods
17
+ ### `initialize(value = nil, warning: = nil, max_line: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
18
+ - **@return** [RangeParser] a new instance of RangeParser
19
+
20
+ ### `parse()` <a id="method-i-parse"></a> <a id="parse-instance_method"></a>
21
+ Not documented.
@@ -0,0 +1,10 @@
1
+ # Class Jekyll::Slides::Renderer <a id="class-Jekyll-Slides-Renderer"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Jekyll::Renderer |
6
+ | **Defined in** | lib/jekyll/slides/renderer.rb |
7
+
8
+ ## Public Instance Methods
9
+ ### `convert(content)` <a id="method-i-convert"></a> <a id="convert-instance_method"></a>
10
+ Not documented.
@@ -0,0 +1,16 @@
1
+ # Class Jekyll::Slides::RougeRenderer <a id="class-Jekyll-Slides-RougeRenderer"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/jekyll/slides/rouge_renderer.rb |
7
+
8
+ ## Public Instance Methods
9
+ ### `initialize(warning: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
10
+ - **@return** [RougeRenderer] a new instance of RougeRenderer
11
+
12
+ ### `render(source, language)` <a id="method-i-render"></a> <a id="render-instance_method"></a>
13
+ Not documented.
14
+
15
+ ### `render_lines(source, language)` <a id="method-i-render_lines"></a> <a id="render_lines-instance_method"></a>
16
+ Not documented.
@@ -0,0 +1,43 @@
1
+ # Class Jekyll::Slides::SlideMetadata <a id="class-Jekyll-Slides-SlideMetadata"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/jekyll/slides/slide_metadata.rb |
7
+
8
+ ## Constants
9
+ ### `BACKGROUNDS` <a id="constant-BACKGROUNDS"></a> <a id="BACKGROUNDS-constant"></a>
10
+ Not documented.
11
+
12
+ ### `KEYS` <a id="constant-KEYS"></a> <a id="KEYS-constant"></a>
13
+ Not documented.
14
+
15
+ ### `LAYOUTS` <a id="constant-LAYOUTS"></a> <a id="LAYOUTS-constant"></a>
16
+ Not documented.
17
+
18
+ ## Attributes
19
+ ### `background` [R] <a id="attribute-i-background"></a> <a id="background-instance_method"></a>
20
+ Returns the value of attribute background.
21
+
22
+ ### `content` [R] <a id="attribute-i-content"></a> <a id="content-instance_method"></a>
23
+ Returns the value of attribute content.
24
+
25
+ ### `custom_class` [R] <a id="attribute-i-custom_class"></a> <a id="custom_class-instance_method"></a>
26
+ Returns the value of attribute custom_class.
27
+
28
+ ### `layout` [R] <a id="attribute-i-layout"></a> <a id="layout-instance_method"></a>
29
+ Returns the value of attribute layout.
30
+
31
+ ### `values` [R] <a id="attribute-i-values"></a> <a id="values-instance_method"></a>
32
+ Returns the value of attribute values.
33
+
34
+ ## Public Class Methods
35
+ ### `parse(content, index: = 0, warning: = nil, components: = nil)` <a id="method-c-parse"></a> <a id="parse-class_method"></a>
36
+ Not documented.
37
+
38
+ ## Public Instance Methods
39
+ ### `initialize(content, index: = 0, warning: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
40
+ - **@return** [SlideMetadata] a new instance of SlideMetadata
41
+
42
+ ### `parse(components: = nil)` <a id="method-i-parse"></a> <a id="parse-instance_method"></a>
43
+ Not documented.
@@ -0,0 +1,13 @@
1
+ # Class Jekyll::Slides::SlideRenderer <a id="class-Jekyll-Slides-SlideRenderer"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Object |
6
+ | **Defined in** | lib/jekyll/slides/slide_renderer.rb |
7
+
8
+ ## Public Instance Methods
9
+ ### `initialize(warning: = nil, component_renderer: = nil, options: = {})` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
10
+ - **@return** [SlideRenderer] a new instance of SlideRenderer
11
+
12
+ ### `render(markdown)` <a id="method-i-render"></a> <a id="render-instance_method"></a>
13
+ Not documented.
@@ -0,0 +1,12 @@
1
+ # Module Jekyll::Slides::Support <a id="module-Jekyll-Slides-Support"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/jekyll/slides/support.rb |
6
+
7
+ ## Public Class Methods
8
+ ### `escape(value)` <a id="method-c-escape"></a> <a id="escape-class_method"></a>
9
+ Not documented.
10
+
11
+ ### `warn(warning, message)` <a id="method-c-warn"></a> <a id="warn-class_method"></a>
12
+ Not documented.
@@ -0,0 +1,50 @@
1
+ # Module Jekyll::Slides <a id="module-Jekyll-Slides"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/jekyll/slides.rb, lib/jekyll/slides/assets.rb, lib/jekyll/slides/layout.rb, lib/jekyll/slides/support.rb, lib/jekyll/slides/version.rb, lib/jekyll/slides/renderer.rb, lib/jekyll/slides/presentation.rb, lib/jekyll/slides/range_parser.rb, lib/jekyll/slides/rouge_renderer.rb, lib/jekyll/slides/slide_metadata.rb, lib/jekyll/slides/slide_renderer.rb, lib/jekyll/slides/component_renderer.rb, lib/jekyll/slides/jekyll_integration.rb, lib/jekyll/slides/presentation_parser.rb |
6
+
7
+ Markdown presentations for Jekyll, with editor and terminal components.
8
+
9
+ Add <code>jekyll-slides</code> to the site's plugins and choose the
10
+ `presentation` layout on a Markdown page. Separate slides with
11
+ <code>---</code> outside fenced code blocks. The plugin supplies layouts,
12
+ includes, styles, scripts, and offline fonts while preserving the site's theme
13
+ and local overrides.
14
+
15
+ Configure defaults under <code>slides:</code> in _config.yml, or use front
16
+ matter on individual decks. Themes are `midnight`, <code>minimal-light</code>,
17
+ <code>minimal-dark</code>, and `ruby`. The supported aspect ratio is 16:9;
18
+ quote this value in YAML.
19
+
20
+ Jekyll runs Liquid before rendering each slide as one Markdown document.
21
+ Jekyll::Slides::Presentation also renders slide HTML directly when Jekyll
22
+ integration is not needed; it does not evaluate Liquid or wrap the
23
+ presentation layout.
24
+
25
+ ## Constants
26
+ ### `LAYOUT_NAME` <a id="constant-LAYOUT_NAME"></a> <a id="LAYOUT_NAME-constant"></a>
27
+ Not documented.
28
+
29
+ ### `ROOT` <a id="constant-ROOT"></a> <a id="ROOT-constant"></a>
30
+ Not documented.
31
+
32
+ ### `VERSION` <a id="constant-VERSION"></a> <a id="VERSION-constant"></a>
33
+ Not documented.
34
+
35
+ # Documentation
36
+
37
+ - [Slides/Assets/SiteAssetFile.md](Slides/Assets/SiteAssetFile.md)
38
+ - [Slides/Assets.md](Slides/Assets.md)
39
+ - [Slides/ComponentRenderer/RenderedDocument.md](Slides/ComponentRenderer/RenderedDocument.md)
40
+ - [Slides/ComponentRenderer.md](Slides/ComponentRenderer.md)
41
+ - [Slides/JekyllIntegration.md](Slides/JekyllIntegration.md)
42
+ - [Slides/Layout.md](Slides/Layout.md)
43
+ - [Slides/Presentation.md](Slides/Presentation.md)
44
+ - [Slides/PresentationParser.md](Slides/PresentationParser.md)
45
+ - [Slides/RangeParser.md](Slides/RangeParser.md)
46
+ - [Slides/Renderer.md](Slides/Renderer.md)
47
+ - [Slides/RougeRenderer.md](Slides/RougeRenderer.md)
48
+ - [Slides/SlideMetadata.md](Slides/SlideMetadata.md)
49
+ - [Slides/SlideRenderer.md](Slides/SlideRenderer.md)
50
+ - [Slides/Support.md](Slides/Support.md)
data/doc/Jekyll.md ADDED
@@ -0,0 +1,5 @@
1
+ # Module Jekyll <a id="module-Jekyll"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/jekyll/slides.rb, lib/jekyll/slides/assets.rb, lib/jekyll/slides/layout.rb, lib/jekyll/slides/support.rb, lib/jekyll/slides/version.rb, lib/jekyll/slides/renderer.rb, lib/jekyll/slides/presentation.rb, lib/jekyll/slides/range_parser.rb, lib/jekyll/slides/rouge_renderer.rb, lib/jekyll/slides/slide_metadata.rb, lib/jekyll/slides/slide_renderer.rb, lib/jekyll/slides/component_renderer.rb, lib/jekyll/slides/jekyll_integration.rb, lib/jekyll/slides/presentation_parser.rb |
data/doc/README.md ADDED
@@ -0,0 +1,180 @@
1
+ # Jekyll Slides
2
+
3
+ `jekyll-slides` turns one Markdown page into a polished, accessible 16:9 presentation. It is a plugin that supplies its own presentation layout and assets without replacing the site's theme.
4
+
5
+ ## Install
6
+
7
+ Add the gem and plugin to the site:
8
+
9
+ ```ruby
10
+ # Gemfile
11
+ gem "jekyll-slides"
12
+ ```
13
+
14
+ ```yaml
15
+ # _config.yml
16
+ plugins:
17
+ - jekyll-slides
18
+ ```
19
+
20
+ Keep the site's existing `theme:` setting, if any. The plugin provides the `presentation` layout itself; a site-local layout or asset with the same path takes precedence.
21
+
22
+ Run `bundle install`, then `bundle exec jekyll serve`. The gem supports Ruby 3.1+ and Jekyll 4.3–4.x. Use Jekyll 4.4 or newer with Ruby 3.4 or newer; Jekyll 4.3 relies on libraries that those Ruby versions no longer bundle.
23
+
24
+ ## Author a deck
25
+
26
+ Set `layout: presentation` in the page front matter. YAML front matter is the first `---` pair and belongs to the page; every later line containing only `---` separates slides. A separator inside a fenced code block is code, not a slide break. Because exact `---` lines are separators, setext level-two headings are not supported in decks; use `## Heading` instead.
27
+
28
+ ```markdown
29
+ ---
30
+ layout: presentation
31
+ title: A short talk
32
+ ---
33
+
34
+ <!--
35
+ layout: title
36
+ background: gradient
37
+ -->
38
+ # A short talk
39
+
40
+ ---
41
+
42
+ <!--
43
+ layout: content
44
+ -->
45
+ # The idea
46
+
47
+ One clear thought per slide.
48
+ ```
49
+
50
+ Slide comments are optional. Supported layouts are `title`, `statement`, `content`, `code`, `code-left`, `code-right`, `split-code`, and `code-result`. Without a comment, layout is inferred: the first text slide is a title, code/editor slides become code layouts, editor pairs become split-code, and an editor plus terminal becomes code-result.
51
+
52
+ Supported backgrounds are `plain`, `gradient`, `grid`, and `spotlight`. Add `class: my-class` in the comment for a custom slide class:
53
+
54
+ ```html
55
+ <!--
56
+ layout: statement
57
+ background: spotlight
58
+ class: keynote
59
+ -->
60
+ ```
61
+
62
+ ## Editors and terminals
63
+
64
+ Put a kramdown inline attribute list immediately after a fenced block. Attribute values must be quoted; class and ID tokens such as `.editor` and `#order-total` do not need quotes. `.editor` renders a syntax-highlighted editor window; `.terminal` renders a terminal window.
65
+
66
+ ````markdown
67
+ ```ruby
68
+ class Order
69
+ def total
70
+ items.sum(&:price)
71
+ end
72
+ end
73
+ ```
74
+ {: .editor #order-total title="app/models/order.rb" size="lg" focus="2-4" highlight="3" line_numbers="true"}
75
+
76
+ ```text
77
+ $ bundle exec ruby -v
78
+ ruby 3.4.1
79
+ ```
80
+ {: .terminal #ruby-version title="terminal" size="sm"}
81
+ ````
82
+
83
+ Editor/terminal attributes are `title`, `id` (or `#id`), `size` (`sm`, `md`, `lg`), `line_numbers` (`true`/`false`), `focus`, and `highlight`. Ranges accept comma-separated lines and ranges such as `2,4-6,9`; invalid values fall back safely with a Jekyll warning. Terminal prompts beginning with `$ `, `> `, or `❯ ` are styled separately. Source remains server-rendered and copyable.
84
+
85
+ Long editor and terminal blocks scroll within the slide. Blocks over 20 lines produce an advisory build warning; the amount that fits depends on the layout and font size. Split long examples across slides for print, where scrolling is unavailable.
86
+
87
+ Liquid runs before slide rendering, just as it does on ordinary Jekyll pages. Wrap examples that contain Liquid syntax in `{% raw %}` and `{% endraw %}`. Because each slide is converted as one Markdown document, the raw block may surround an editor fence without being separated from it.
88
+
89
+ Code remains selectable and copyable with normal browser controls; version 0.1 does not add a copy button.
90
+
91
+ ## Themes and configuration
92
+
93
+ Presentation themes are `minimal-light`, `minimal-dark`, `midnight` (the default), and `ruby`. These style the slides without replacing the site's Jekyll theme. Configure defaults under `slides:`:
94
+
95
+ ```yaml
96
+ slides:
97
+ theme: midnight
98
+ aspect_ratio: "16:9"
99
+ progress: true
100
+ slide_numbers: true
101
+ overview: true
102
+ fullscreen: true
103
+ ```
104
+
105
+ The same keys can be overridden per presentation in front matter (`theme`, `aspect_ratio`, `progress`, `slide_numbers`, `overview`, and `fullscreen`), including Jekyll's scoped `defaults:` for pages and collection documents. The runtime currently supports the fixed `16:9` aspect ratio; invalid values use the safe default. Always quote `"16:9"` in YAML to prevent it from being parsed as a number.
106
+
107
+ For a light presentation, set `slides: { theme: minimal-light }` in `_config.yml`, or `theme: minimal-light` in the deck's front matter. The [readability example](https://github.com/lucianghinda/jekyll-slides/blob/main/examples/readability.md) demonstrates the light theme with code, terminal output, tables, and prose.
108
+
109
+ ## Typography and readability
110
+
111
+ The gem bundles Atkinson Hyperlegible Next for text and Atkinson Hyperlegible Mono for code, including variable upright and italic faces. Fonts load from the site's own assets and work offline. The font files retain their SIL Open Font License; source revisions, checksums, and notices are in [assets/fonts](https://github.com/lucianghinda/jekyll-slides/blob/main/assets/fonts/README.md).
112
+
113
+ On the 1920×1080 slide canvas, body text is 44px, section headings are 72px, and code sizes `sm`, `md`, and `lg` are 32px, 38px, and 42px. These sizes scale with the slide. Filenames and line numbers remain readable, and focused lines use borders and background color while keeping surrounding code fully visible. All four themes check syntax-token contrast against normal, highlighted, and focused code surfaces.
114
+
115
+ Prefer medium or large code and short examples for projection. Long blocks can scroll, but an audience cannot reveal hidden lines independently; split examples when presenting or printing. Screen contrast tests do not replace checking the actual projector and viewing distance.
116
+
117
+ ## Navigation and accessibility
118
+
119
+ Use `ArrowLeft`/`ArrowRight`, `PageUp`/`PageDown`, `Home`, and `End` to navigate. `Space` advances, `O` toggles overview, and `F` toggles fullscreen. The current slide is synchronized in the URL hash (`#3` for slide three), so links and browser history work. The controls include accessible labels and focus states; reduced-motion preferences are respected. Print the deck with the browser print dialog (slides are paginated and chrome is hidden). If JavaScript is disabled, all slides remain in document order as complete aspect-ratio frames with readable content.
120
+
121
+ ## Demo and development
122
+
123
+ In a repository checkout (the demo is intentionally not included in the runtime gem), build the included ten-slide refactoring story:
124
+
125
+ ```sh
126
+ cd examples
127
+ bundle install
128
+ bundle exec jekyll build --source . --destination _site
129
+ ```
130
+
131
+ From the gem directory, run `bundle install` and `npm ci`, then `bundle exec rake` to run Ruby tests, JavaScript tests, the Tailwind build and CSS contract tests, gem verification, and the example build. The demo can also be served with `bundle exec jekyll serve --source examples --destination examples/_site`.
132
+
133
+ Tailwind source is in `src/css`; the committed runtime stylesheet is `assets/css/presentation.css`:
134
+
135
+ ```sh
136
+ npm install
137
+ npm run build:css
138
+ npm run dev:css
139
+ npm run test:javascript
140
+ npm run test:css
141
+ ```
142
+
143
+ Users do not need Node or Tailwind at runtime; they are development tools for this repository.
144
+
145
+ ## Generated documentation
146
+
147
+ Generate Markdown API documentation and the LLM index from the Ruby source:
148
+
149
+ ```sh
150
+ bundle exec rake docs
151
+ ```
152
+
153
+ This replaces `doc/` with fresh YARD Markdown, updates the documentation index in
154
+ `doc/Jekyll/Slides.md`, and writes `llm.txt` with links relative to the gem root.
155
+ The generated files are checked in and shipped with the gem. Internal plans,
156
+ temporary files, and Node dependencies are excluded. YARD and `yard-markdown`
157
+ are development tools only.
158
+
159
+ For the individual steps, run `bundle exec rake yard`, then
160
+ `ruby bin/generate_llm.rb`. To verify everything, regenerate documentation, and
161
+ build the versioned gem and SHA-256 checksum in `pkg/`, run:
162
+
163
+ ```sh
164
+ bin/prepare_release
165
+ ```
166
+
167
+ Release preparation stops if a check or generation step fails. It does not
168
+ commit, tag, push, or publish the gem.
169
+
170
+ Rendering and toolchain decisions that should not be re-derived casually are recorded in the [architecture decision record](https://github.com/lucianghinda/jekyll-slides/blob/main/docs/architecture-decisions.md).
171
+
172
+ Maintainers can follow the [release instructions](https://github.com/lucianghinda/jekyll-slides/blob/main/docs/releasing.md) to verify, build, tag, and publish a gem.
173
+
174
+ ## 0.1 limitations and extension
175
+
176
+ Version 0.1 intentionally supports Markdown/Kramdown, a fixed 16:9 canvas, the curated layouts/themes above, and a small dependency-free browser runtime. It does not provide speaker notes, transitions, nested slide sections, a theme editor, or an authoring UI. JavaScript is enhancement-only; server-side HTML is the source of truth.
177
+
178
+ The plugin injects its `_layouts`, `_includes`, and `assets` into Jekyll without participating in theme resolution. A site can override the `presentation` layout, any `slides/*` include, or either compiled asset by placing a file with the same path in its own source tree. Copy the stylesheet only when you need a complete CSS fork; otherwise add a custom slide class and site CSS after the gem stylesheet. Keep `plugins: [jekyll-slides]` enabled even when overriding the layout so Markdown rendering and normalized slide settings remain active.
179
+
180
+ Released under the Apache-2.0 license.
data/doc/index.csv ADDED
@@ -0,0 +1,71 @@
1
+ name,type,path
2
+ README.md,File,README.md
3
+ CHANGELOG.md,File,CHANGELOG.md
4
+ Jekyll,Module,Jekyll.md
5
+ Jekyll::Slides,Module,Jekyll/Slides.md
6
+ Jekyll::Slides.ROOT,Constant,Jekyll/Slides.md#constant-ROOT
7
+ Jekyll::Slides.LAYOUT_NAME,Constant,Jekyll/Slides.md#constant-LAYOUT_NAME
8
+ Jekyll::Slides.VERSION,Constant,Jekyll/Slides.md#constant-VERSION
9
+ Jekyll::Slides::Assets,Module,Jekyll/Slides/Assets.md
10
+ Jekyll::Slides::Assets.asset_files,Method,Jekyll/Slides/Assets.md#method-c-asset_files
11
+ Jekyll::Slides::Assets.install,Method,Jekyll/Slides/Assets.md#method-c-install
12
+ Jekyll::Slides::Support,Module,Jekyll/Slides/Support.md
13
+ Jekyll::Slides::Support.escape,Method,Jekyll/Slides/Support.md#method-c-escape
14
+ Jekyll::Slides::Support.warn,Method,Jekyll/Slides/Support.md#method-c-warn
15
+ Jekyll::Slides::JekyllIntegration,Module,Jekyll/Slides/JekyllIntegration.md
16
+ Jekyll::Slides::JekyllIntegration.DEFAULTS,Constant,Jekyll/Slides/JekyllIntegration.md#constant-DEFAULTS
17
+ Jekyll::Slides::JekyllIntegration.THEMES,Constant,Jekyll/Slides/JekyllIntegration.md#constant-THEMES
18
+ Jekyll::Slides::JekyllIntegration.BOOLEAN_OPTIONS,Constant,Jekyll/Slides/JekyllIntegration.md#constant-BOOLEAN_OPTIONS
19
+ Jekyll::Slides::JekyllIntegration.OPTION_KEYS,Constant,Jekyll/Slides/JekyllIntegration.md#constant-OPTION_KEYS
20
+ Jekyll::Slides::JekyllIntegration.install!,Method,Jekyll/Slides/JekyllIntegration.md#method-c-install-21
21
+ Jekyll::Slides::JekyllIntegration.process,Method,Jekyll/Slides/JekyllIntegration.md#method-c-process
22
+ Jekyll::Slides::JekyllIntegration.process_site,Method,Jekyll/Slides/JekyllIntegration.md#method-c-process_site
23
+ Jekyll::Slides::Assets::SiteAssetFile,Class,Jekyll/Slides/Assets/SiteAssetFile.md
24
+ Jekyll::Slides::Assets::SiteAssetFile.write,Method,Jekyll/Slides/Assets/SiteAssetFile.md#method-i-write
25
+ Jekyll::Slides::Layout,Class,Jekyll/Slides/Layout.md
26
+ Jekyll::Slides::Layout.initialize,Method,Jekyll/Slides/Layout.md#method-i-initialize
27
+ Jekyll::Slides::Renderer,Class,Jekyll/Slides/Renderer.md
28
+ Jekyll::Slides::Renderer.convert,Method,Jekyll/Slides/Renderer.md#method-i-convert
29
+ Jekyll::Slides::Presentation,Class,Jekyll/Slides/Presentation.md
30
+ Jekyll::Slides::Presentation.initialize,Method,Jekyll/Slides/Presentation.md#method-i-initialize
31
+ Jekyll::Slides::Presentation.render,Method,Jekyll/Slides/Presentation.md#method-i-render
32
+ Jekyll::Slides::RangeParser,Class,Jekyll/Slides/RangeParser.md
33
+ Jekyll::Slides::RangeParser.MAX_RANGE_SIZE,Constant,Jekyll/Slides/RangeParser.md#constant-MAX_RANGE_SIZE
34
+ Jekyll::Slides::RangeParser.initialize,Method,Jekyll/Slides/RangeParser.md#method-i-initialize
35
+ Jekyll::Slides::RangeParser.parse,Method,Jekyll/Slides/RangeParser.md#method-i-parse
36
+ Jekyll::Slides::RangeParser.parse,Method,Jekyll/Slides/RangeParser.md#method-c-parse
37
+ Jekyll::Slides::RougeRenderer,Class,Jekyll/Slides/RougeRenderer.md
38
+ Jekyll::Slides::RougeRenderer.initialize,Method,Jekyll/Slides/RougeRenderer.md#method-i-initialize
39
+ Jekyll::Slides::RougeRenderer.render,Method,Jekyll/Slides/RougeRenderer.md#method-i-render
40
+ Jekyll::Slides::RougeRenderer.render_lines,Method,Jekyll/Slides/RougeRenderer.md#method-i-render_lines
41
+ Jekyll::Slides::SlideMetadata,Class,Jekyll/Slides/SlideMetadata.md
42
+ Jekyll::Slides::SlideMetadata.LAYOUTS,Constant,Jekyll/Slides/SlideMetadata.md#constant-LAYOUTS
43
+ Jekyll::Slides::SlideMetadata.BACKGROUNDS,Constant,Jekyll/Slides/SlideMetadata.md#constant-BACKGROUNDS
44
+ Jekyll::Slides::SlideMetadata.KEYS,Constant,Jekyll/Slides/SlideMetadata.md#constant-KEYS
45
+ Jekyll::Slides::SlideMetadata.initialize,Method,Jekyll/Slides/SlideMetadata.md#method-i-initialize
46
+ Jekyll::Slides::SlideMetadata.parse,Method,Jekyll/Slides/SlideMetadata.md#method-i-parse
47
+ Jekyll::Slides::SlideMetadata.parse,Method,Jekyll/Slides/SlideMetadata.md#method-c-parse
48
+ Jekyll::Slides::SlideMetadata.background,Attribute,Jekyll/Slides/SlideMetadata.md#attribute-i-background
49
+ Jekyll::Slides::SlideMetadata.content,Attribute,Jekyll/Slides/SlideMetadata.md#attribute-i-content
50
+ Jekyll::Slides::SlideMetadata.custom_class,Attribute,Jekyll/Slides/SlideMetadata.md#attribute-i-custom_class
51
+ Jekyll::Slides::SlideMetadata.layout,Attribute,Jekyll/Slides/SlideMetadata.md#attribute-i-layout
52
+ Jekyll::Slides::SlideMetadata.values,Attribute,Jekyll/Slides/SlideMetadata.md#attribute-i-values
53
+ Jekyll::Slides::SlideRenderer,Class,Jekyll/Slides/SlideRenderer.md
54
+ Jekyll::Slides::SlideRenderer.initialize,Method,Jekyll/Slides/SlideRenderer.md#method-i-initialize
55
+ Jekyll::Slides::SlideRenderer.render,Method,Jekyll/Slides/SlideRenderer.md#method-i-render
56
+ Jekyll::Slides::ComponentRenderer,Class,Jekyll/Slides/ComponentRenderer.md
57
+ Jekyll::Slides::ComponentRenderer.FRAGMENT_PATTERN,Constant,Jekyll/Slides/ComponentRenderer.md#constant-FRAGMENT_PATTERN
58
+ Jekyll::Slides::ComponentRenderer.SIZES,Constant,Jekyll/Slides/ComponentRenderer.md#constant-SIZES
59
+ Jekyll::Slides::ComponentRenderer.LONG_CODE_LINE_THRESHOLD,Constant,Jekyll/Slides/ComponentRenderer.md#constant-LONG_CODE_LINE_THRESHOLD
60
+ Jekyll::Slides::ComponentRenderer.initialize,Method,Jekyll/Slides/ComponentRenderer.md#method-i-initialize
61
+ Jekyll::Slides::ComponentRenderer.render,Method,Jekyll/Slides/ComponentRenderer.md#method-i-render
62
+ Jekyll::Slides::ComponentRenderer.render_document,Method,Jekyll/Slides/ComponentRenderer.md#method-i-render_document
63
+ Jekyll::Slides::ComponentRenderer.render_fragments,Method,Jekyll/Slides/ComponentRenderer.md#method-i-render_fragments
64
+ Jekyll::Slides::ComponentRenderer.render,Method,Jekyll/Slides/ComponentRenderer.md#method-c-render
65
+ Jekyll::Slides::ComponentRenderer::RenderedDocument,Class,Jekyll/Slides/ComponentRenderer/RenderedDocument.md
66
+ Jekyll::Slides::ComponentRenderer::RenderedDocument.components,Attribute,Jekyll/Slides/ComponentRenderer/RenderedDocument.md#attribute-i-components
67
+ Jekyll::Slides::ComponentRenderer::RenderedDocument.fragments,Attribute,Jekyll/Slides/ComponentRenderer/RenderedDocument.md#attribute-i-fragments
68
+ Jekyll::Slides::PresentationParser,Class,Jekyll/Slides/PresentationParser.md
69
+ Jekyll::Slides::PresentationParser.initialize,Method,Jekyll/Slides/PresentationParser.md#method-i-initialize
70
+ Jekyll::Slides::PresentationParser.parse,Method,Jekyll/Slides/PresentationParser.md#method-i-parse
71
+ Jekyll::Slides::PresentationParser.parse,Method,Jekyll/Slides/PresentationParser.md#method-c-parse
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Jekyll
4
+ module Slides
5
+ module Assets
6
+ class SiteAssetFile < Jekyll::StaticFile
7
+ def write(dest)
8
+ return false if site_item_claims_destination?(dest)
9
+
10
+ super
11
+ end
12
+
13
+ private
14
+
15
+ def site_item_claims_destination?(dest)
16
+ site_items.any? do |item|
17
+ item.write? && item.destination(dest) == destination(dest)
18
+ end
19
+ end
20
+
21
+ def site_items
22
+ @site.pages + @site.documents
23
+ end
24
+ end
25
+
26
+ module_function
27
+
28
+ def install(site)
29
+ asset_files.each do |path|
30
+ relative_path = path.delete_prefix("#{ROOT}/")
31
+ next if site.static_files.any? { |file| file.relative_path.delete_prefix("/") == relative_path }
32
+
33
+ site.static_files << SiteAssetFile.new(
34
+ site,
35
+ ROOT,
36
+ File.dirname(relative_path),
37
+ File.basename(relative_path)
38
+ )
39
+ end
40
+ end
41
+
42
+ def asset_files
43
+ Dir[File.join(ROOT, "assets", "**", "*")].select { |path| File.file?(path) }.sort
44
+ end
45
+ end
46
+ end
47
+ end