Skip to content

Commit 47bfbbf

Browse files
committed
Format top-level files
1 parent 7097062 commit 47bfbbf

6 files changed

Lines changed: 121 additions & 103 deletions

File tree

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ _coverage/
44
vendor/
55
node_modules/
66

7+
# Lots of nested Liquid
8+
linktree.md
9+
omemo-fingerprints.md
10+
twitter-disavow.md
11+
712
# Agent/meta files (not site content)
813
AGENTS.md
914
CLAUDE.md

AGENTS.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
`CLAUDE.md` and `GEMINI.md` are symlinks to this file.
44

55
## Context
6+
67
Jekyll-based static site (alexgude.com) running in Docker.
78
**Crucial:** Always use `make` commands. Never run `jekyll` or `bundle` directly.
89

910
## Operations
11+
1012
- **Serve:** `make serve` (Live reload at localhost:4000).
1113
- **Test:** `make test` (Runs all tests in `_tests/`).
1214
- **Test File:** `make test TEST=_tests/src/path/to/test.rb`
@@ -17,35 +19,39 @@ Jekyll-based static site (alexgude.com) running in Docker.
1719
- **Hooks:** `make hooks-install` (Install pre-commit hook).
1820

1921
## Architecture Map
22+
2023
- **Content:** `_posts/` (Blog), `_books/` (Reviews collection).
2124
- **Layouts:** `_layouts/`, `_includes/`.
2225
- **Plugins:** `_plugins/src/` (Domain-Driven Design).
23-
- `infrastructure/`: Low-level utils (Logger, Text, URL), **Link Cache**,
24-
`GeneratedStaticFile`, `MarkdownWhitespaceNormalizer`.
25-
- `ui/`: Generic components (Cards, Ratings, Citations).
26-
- `seo/`: JSON-LD generators & Validation.
27-
- `content/`: Domain logic (Books, Posts, Authors, Series, **Markdown Output**).
26+
- `infrastructure/`: Low-level utils (Logger, Text, URL), **Link Cache**,
27+
`GeneratedStaticFile`, `MarkdownWhitespaceNormalizer`.
28+
- `ui/`: Generic components (Cards, Ratings, Citations).
29+
- `seo/`: JSON-LD generators & Validation.
30+
- `content/`: Domain logic (Books, Posts, Authors, Series, **Markdown Output**).
2831
- **Tests:** `_tests/` (Mirrors `_plugins/src/` structure).
2932

3033
## CI/CD & Hooks
3134

3235
**GitHub Actions** (`.github/workflows/jekyll.yml`) runs on every push:
36+
3337
1. `bundle exec rubocop` (lint).
3438
2. `bundle exec ruby ... load test_*.rb` (tests).
3539
3. `bundle exec ruby _bin/check_strict.rb` (strict Liquid variables).
3640
4. Build, HTML validation, broken-link check (main branch deploys).
3741

3842
**Pre-commit hook** (`_bin/pre-commit.sh`, install via `make hooks-install`):
43+
3944
- Runs `rubocop --autocorrect` inside Docker on staged `.rb` files.
4045
- Runs `prettier --write` inside Docker on staged `.md` files (excluding meta files).
4146
- Auto-corrected files are re-staged automatically.
4247
- Rejects the commit if uncorrectable offenses remain.
4348

4449
## Development Rules
50+
4551
1. **Separation of Concerns:**
46-
- **Tags** (`tags/`) are thin wrappers; check `render_mode` and delegate.
47-
- **Utils** (`[domain]/[util].rb`) orchestrate logic.
48-
- **Finders** fetch data; **Renderers** generate HTML.
52+
- **Tags** (`tags/`) are thin wrappers; check `render_mode` and delegate.
53+
- **Utils** (`[domain]/[util].rb`) orchestrate logic.
54+
- **Finders** fetch data; **Renderers** generate HTML.
4955
2. **Error Handling:** Use `PluginLoggerUtils.log_liquid_failure`.
5056
3. **Testing:** Create a matching test file in `_tests/` for every new class.
5157
4. **Link Cache:** The site relies on `site.data['link_cache']` (built by
@@ -74,13 +80,13 @@ LLMS.TXT (:site, :post_render) [llms_txt_generator.rb]
7480

7581
### Key Files (`content/markdown_output/`)
7682

77-
| File | Purpose |
78-
|------|---------|
79-
| `markdown_body_hook.rb` | Pre-render hooks; re-renders content with `render_mode: :markdown` using standalone template (avoids cache pollution) |
80-
| `markdown_output_assembler.rb` | Post-render hook; assembles header + body + footer into `.md` files |
81-
| `markdown_card_utils.rb` | Formats card data hashes as Markdown list items (`- [Title](url) by Author --- stars`) |
82-
| `markdown_link_formatter.rb` | Formats resolved link data as `[text](url)` for link tags |
83-
| `llms_txt_generator.rb` | Generates `/llms.txt` index grouped by Blog Posts, Book Reviews, Optional |
83+
| File | Purpose |
84+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
85+
| `markdown_body_hook.rb` | Pre-render hooks; re-renders content with `render_mode: :markdown` using standalone template (avoids cache pollution) |
86+
| `markdown_output_assembler.rb` | Post-render hook; assembles header + body + footer into `.md` files |
87+
| `markdown_card_utils.rb` | Formats card data hashes as Markdown list items (`- [Title](url) by Author --- stars`) |
88+
| `markdown_link_formatter.rb` | Formats resolved link data as `[text](url)` for link tags |
89+
| `llms_txt_generator.rb` | Generates `/llms.txt` index grouped by Blog Posts, Book Reviews, Optional |
8490

8591
### Render Mode Pattern
8692

@@ -117,7 +123,7 @@ Tags with render_mode support: all link tags (`book_link`, `author_link`,
117123
- **Page payload snapshot:** `Page#to_liquid` returns a plain `Hash`
118124
(snapshot at call time), while `Document#to_liquid` returns a live
119125
`DocumentDrop`. In `Renderer#run`, `assign_pages!` calls `to_liquid`
120-
*before* the `:pre_render` hook fires. Data set in `:pre_render` hooks is
126+
_before_ the `:pre_render` hook fires. Data set in `:pre_render` hooks is
121127
visible for Documents (live Drop) but **not** for Pages (stale Hash). Fix:
122128
in `:pages` hooks, also inject into `payload['page']` directly.
123129
- **Strict Liquid:** `render_mode` must always be defined in the payload
@@ -130,7 +136,7 @@ Tags with render_mode support: all link tags (`book_link`, `author_link`,
130136
### Excerpt and Opening Paragraph
131137

132138
Jekyll's excerpt is the first "block" of content (before the first blank
133-
line). A `{% capture %}` block placed *above* the opening paragraph becomes
139+
line). A `{% capture %}` block placed _above_ the opening paragraph becomes
134140
the excerpt instead of the actual paragraph text. Therefore:
135141

136142
- **`{% capture %}` definitions must go _after_ the opening paragraph.**
@@ -147,10 +153,10 @@ the excerpt instead of the actual paragraph text. Therefore:
147153
Simple formatting tags for non-book creative works. Emit
148154
`<cite class="...-title">` in HTML, `_italic_` in Markdown.
149155

150-
| Tag | CSS class | Example |
151-
|-----|-----------|---------|
152-
| `movie_title` | `movie-title` | `{% movie_title "The Matrix" %}` |
153-
| `game_title` | `game-title` | `{% game_title "Elden Ring" %}` |
156+
| Tag | CSS class | Example |
157+
| --------------- | --------------- | -------------------------------- |
158+
| `movie_title` | `movie-title` | `{% movie_title "The Matrix" %}` |
159+
| `game_title` | `game-title` | `{% game_title "Elden Ring" %}` |
154160
| `tv_show_title` | `tv-show-title` | `{% tv_show_title "The Wire" %}` |
155161

156162
Accepts quoted strings or Liquid variables (`{% game_title page.title %}`).

linktree.md

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -12,75 +12,75 @@ sidebar_include: false
1212

1313
<div class="linktree-container">
1414

15-
{% comment %} Bluesky {% endcomment %}
16-
{% capture bluesky_url %}https://bsky.app/profile/{{ site.author.bluesky }}{% endcapture %}
17-
{% capture bluesky_text %}Bluesky: @{{ site.author.bluesky }}{% endcapture %}
18-
{% capture bluesky_icon %}{% include icon-bluesky.svg %}{% endcapture %}
19-
{% include linktree_item.html
20-
link=bluesky_url
21-
text=bluesky_text
22-
icon=bluesky_icon
23-
button_class="bluesky-button"
24-
%}
15+
{% comment %} Bluesky {% endcomment %}
16+
{% capture bluesky_url %}https://bsky.app/profile/{{ site.author.bluesky }}{% endcapture %}
17+
{% capture bluesky_text %}Bluesky: @{{ site.author.bluesky }}{% endcapture %}
18+
{% capture bluesky_icon %}{% include icon-bluesky.svg %}{% endcapture %}
19+
{% include linktree_item.html
20+
link=bluesky_url
21+
text=bluesky_text
22+
icon=bluesky_icon
23+
button_class="bluesky-button"
24+
%}
2525

26-
{% comment %} Mastodon {% endcomment %}
27-
{% capture mastodon_url %}https://{{ site.author.mastodon_instance }}/@{{ site.author.mastodon }}{% endcapture %}
28-
{% capture mastodon_text %}Mastodon: @{{ site.author.mastodon }}{% endcapture %}
29-
{% capture mastodon_icon %}{% include icon-mastodon.svg %}{% endcapture %}
30-
{% include linktree_item.html
31-
link=mastodon_url
32-
text=mastodon_text
33-
icon=mastodon_icon
34-
button_class="mastodon-button"
35-
%}
26+
{% comment %} Mastodon {% endcomment %}
27+
{% capture mastodon_url %}https://{{ site.author.mastodon_instance }}/@{{ site.author.mastodon }}{% endcapture %}
28+
{% capture mastodon_text %}Mastodon: @{{ site.author.mastodon }}{% endcapture %}
29+
{% capture mastodon_icon %}{% include icon-mastodon.svg %}{% endcapture %}
30+
{% include linktree_item.html
31+
link=mastodon_url
32+
text=mastodon_text
33+
icon=mastodon_icon
34+
button_class="mastodon-button"
35+
%}
3636

37-
{% comment %} Github {% endcomment %}
38-
{% capture github_url %}https://github.com/{{ site.author.github }}{% endcapture %}
39-
{% capture github_text %}Github: {{ site.author.github }}{% endcapture %}
40-
{% capture github_icon %}{% include icon-github.svg %}{% endcapture %}
41-
{% include linktree_item.html
42-
link=github_url
43-
text=github_text
44-
icon=github_icon
45-
button_class="github-button"
46-
%}
37+
{% comment %} Github {% endcomment %}
38+
{% capture github_url %}https://github.com/{{ site.author.github }}{% endcapture %}
39+
{% capture github_text %}Github: {{ site.author.github }}{% endcapture %}
40+
{% capture github_icon %}{% include icon-github.svg %}{% endcapture %}
41+
{% include linktree_item.html
42+
link=github_url
43+
text=github_text
44+
icon=github_icon
45+
button_class="github-button"
46+
%}
4747

48-
{% comment %} LinkedIn {% endcomment %}
49-
{% capture linkedin_url %}https://www.linkedin.com/in/{{ site.author.linkedin }}{% endcapture %}
50-
{% capture linkedin_text %}LinkedIn: {{ site.author.name }}{% endcapture %}
51-
{% capture linkedin_icon %}{% include icon-linkedin.svg %}{% endcapture %}
52-
{% include linktree_item.html
53-
link=linkedin_url
54-
text=linkedin_text
55-
icon=linkedin_icon
56-
button_class="linkedin-button"
57-
%}
48+
{% comment %} LinkedIn {% endcomment %}
49+
{% capture linkedin_url %}https://www.linkedin.com/in/{{ site.author.linkedin }}{% endcapture %}
50+
{% capture linkedin_text %}LinkedIn: {{ site.author.name }}{% endcapture %}
51+
{% capture linkedin_icon %}{% include icon-linkedin.svg %}{% endcapture %}
52+
{% include linktree_item.html
53+
link=linkedin_url
54+
text=linkedin_text
55+
icon=linkedin_icon
56+
button_class="linkedin-button"
57+
%}
5858

59-
{% comment %} Website {% endcomment %}
60-
{% capture website_icon %}{% include icon-globe.svg %}{% endcapture %}
61-
{% include linktree_item.html
62-
link="/"
63-
text="My Website: alexgude.com"
64-
icon=website_icon
65-
button_class="website-button"
66-
%}
59+
{% comment %} Website {% endcomment %}
60+
{% capture website_icon %}{% include icon-globe.svg %}{% endcapture %}
61+
{% include linktree_item.html
62+
link="/"
63+
text="My Website: alexgude.com"
64+
icon=website_icon
65+
button_class="website-button"
66+
%}
6767

68-
{% comment %} RSS {% endcomment %}
69-
{% capture rss_icon %}{% include icon-rss.svg %}{% endcapture %}
70-
{% include linktree_item.html
71-
link="/feed.xml"
72-
text="RSS Feed: Posts"
73-
icon=rss_icon
74-
button_class="rss-button"
75-
%}
68+
{% comment %} RSS {% endcomment %}
69+
{% capture rss_icon %}{% include icon-rss.svg %}{% endcapture %}
70+
{% include linktree_item.html
71+
link="/feed.xml"
72+
text="RSS Feed: Posts"
73+
icon=rss_icon
74+
button_class="rss-button"
75+
%}
7676

77-
{% comment %} RSS {% endcomment %}
78-
{% capture rss_icon %}{% include icon-rss.svg %}{% endcapture %}
79-
{% include linktree_item.html
80-
link="/feed/books.xml"
81-
text="RSS Feed: Book Reviews"
82-
icon=rss_icon
83-
button_class="rss-button"
84-
%}
77+
{% comment %} RSS {% endcomment %}
78+
{% capture rss_icon %}{% include icon-rss.svg %}{% endcapture %}
79+
{% include linktree_item.html
80+
link="/feed/books.xml"
81+
text="RSS Feed: Book Reviews"
82+
icon=rss_icon
83+
button_class="rss-button"
84+
%}
8585

8686
</div>

omemo-fingerprints.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ fingerprints are used to verify the identity of my devices in end-to-end
3535
encrypted communication.
3636

3737
{% for device in page.omemo_fingerprints %}
38+
3839
## {{ device.device_name }}
3940

4041
**Fingerprint:** `{{ device.fingerprint }}`
4142

4243
{% if device.qr_code %}
4344
**QR Code:** ![{{ device.device_name }} OMEMO QR Code]({{ device.qr_code }}){: .omemo-qr-code }
4445
{% else %}
45-
**QR Code:** *No QR code available for this device.*
46+
**QR Code:** _No QR code available for this device._
4647
{% endif %}
4748

4849
{% endfor %}

test.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,23 @@ This is a test page to demonstrate all standard Markdown elements.
1616
## Headings
1717

1818
# Heading Level 1
19+
1920
## Heading Level 2
21+
2022
### Heading Level 3
23+
2124
#### Heading Level 4
25+
2226
##### Heading Level 5
27+
2328
###### Heading Level 6
2429

2530
---
2631

2732
## Paragraphs
2833

2934
This is a simple paragraph.
30-
This is another paragraph with **bold text**, *italic text*, and ***bold italic text***.
35+
This is another paragraph with **bold text**, _italic text_, and **_bold italic text_**.
3136

3237
---
3338

@@ -116,14 +121,14 @@ word with your priests.
116121

117122
## Tables
118123

119-
| Left Justified | Centered | Right Justified |
120-
|:---------------|:--------:|----------------:|
121-
| Data 1 | Data 2 | Data 3 |
122-
| _Data 4_ | Data 5 | Data 6 |
123-
| **Data 7** | Data 8 | Data 9 |
124-
|================|==========|=================|
125-
| Footer row | Data 10 | Data 11 |
126-
|----------------|----------|-----------------|
124+
| Left Justified | Centered | Right Justified |
125+
| :--------------- | :--------: | ----------------: |
126+
| Data 1 | Data 2 | Data 3 |
127+
| _Data 4_ | Data 5 | Data 6 |
128+
| **Data 7** | Data 8 | Data 9 |
129+
| ================ | ========== | ================= |
130+
| Footer row | Data 10 | Data 11 |
131+
| ---------------- | ---------- | ----------------- |
127132

128133
---
129134

@@ -176,7 +181,6 @@ This is a footnote within a footnote.[^2]
176181

177182
Two footnotes, but[^4] on different words.[^5]
178183

179-
180184
[^2]: First footnote.[^3]
181185

182186
[^3]: Nested footnote.
@@ -403,6 +407,7 @@ date: "%Y" | minus: 2015 }}.
403407

404408
{% assign four=4 %}
405409
{% assign five="5" %}
410+
406411
- {% rating_stars 1 %}
407412
- {% rating_stars '2' %}
408413
- {% rating_stars "3" %}
@@ -436,9 +441,10 @@ date: "%Y" | minus: 2015 }}.
436441
<h2 class="book-review-headline">Review</h2>
437442
{% rating_stars 5 %}
438443

439-
This is a sample review of the book, demonstrating the inclusion of
440-
custom metadata, images, and dynamic content. The story revolves around a
441-
fascinating premise and is exceptionally well-written.
444+
This is a sample review of the book, demonstrating the inclusion of
445+
custom metadata, images, and dynamic content. The story revolves around a
446+
fascinating premise and is exceptionally well-written.
447+
442448
</article>
443449

444450
## Books Ranked by Backlinks

twitter-disavow.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ datetime="2024-11-10T00:48:30+00:00">November 10<sup>th</sup>, 2024</time>.
1919
I also deleted my bot accounts:
2020

2121
{%- for handle in page.twitter_bot_handles -%}
22-
{%- if forloop.last and forloop.length > 1 %}
23-
and
24-
{% endif -%}
22+
{%- if forloop.last and forloop.length > 1 %}
23+
and
24+
{% endif -%}
2525
`@{{ handle }}`
26-
{%- if forloop.last == false -%}, {% endif -%}
26+
{%- if forloop.last == false -%}, {% endif -%}
2727
{%- endfor -%}.
2828

2929
This page serves as a record to clarify that any future usage of these handles

0 commit comments

Comments
 (0)