Compare commits

..
8 Commits
Author SHA1 Message Date
noether 6149a156cd build: add make help menu listing all targets
GNU make reserves 'make --help' for its own options, so a project cannot
override that flag; the idiomatic equivalent is 'make help'. Add a
self-maintaining help target that parses the Makefile (via
scripts/make_help.py) and lists every target with a one-line description,
so it stays in sync when targets are added/removed. Also add the missing
external-fix / external-fix-apply rows to the README make-command table.

Verified: 'make help' lists all 16 targets (exit 0); default build unchanged.
2026-11-01 22:29:39 -07:00
noether 9ae82dcd57 docs: vendor OFL-1.1 license for the AlfaSlabOne font (OFL requires license to accompany the font) 2026-11-01 22:07:19 -07:00
noether abc4638373 theme: cap sidebar logo at 113px (live-site size); was stretched to fill widened menu 2026-11-01 21:45:45 -07:00
noether 926d7058d6 theme: bump site font 17px -> 19px (+3pt from 16px baseline) 2026-11-01 21:42:16 -07:00
noether 4c198c672b content: add Books header title card (was missing) 2026-11-01 21:39:42 -07:00
noether 38c656518d content: re-render all 19 title cards unified (gold hollow slab-serif, centered, 1046x124); add missing Books header 2026-11-01 21:34:57 -07:00
noether 6add0a9732 build: add render_title_cards.py — unified gold hollow-outline title cards 2026-11-01 21:28:00 -07:00
noether 5380bbc133 build: vendor AlfaSlabOne slab-serif font for title cards (OFL) 2026-11-01 21:24:17 -07:00
28 changed files with 308 additions and 7 deletions

No files matched your search

+12 -4
View File
@@ -13,8 +13,9 @@ LYCHEE_VERSION := 0.24.2
TOOLS_BIN := $(CURDIR)/.tools/bin TOOLS_BIN := $(CURDIR)/.tools/bin
export PATH := $(TOOLS_BIN):$(PATH) export PATH := $(TOOLS_BIN):$(PATH)
.PHONY: all build index serve run link-check link-fix external-check external-fix external-fix-apply serve-lan clean bootstrap tool-versions preflight .PHONY: all build index serve run link-check link-fix external-check external-fix external-fix-apply serve-lan clean bootstrap tool-versions preflight help
# Default target: build content + search index (same as `make index`).
all: index all: index
# ONE-TIME per machine: install the pinned hugo/node/lychee into .tools/bin. # ONE-TIME per machine: install the pinned hugo/node/lychee into .tools/bin.
@@ -45,6 +46,7 @@ index: build
serve: index serve: index
$(PAGEFIND) --site $(OUT) --serve $(PAGEFIND) --site $(OUT) --serve
# Alias for `serve` (build + index + serve with search on :1414).
run: serve run: serve
# DEAD LINKS -- internal (offline, fast): scan the SOURCE markdown; internal links # DEAD LINKS -- internal (offline, fast): scan the SOURCE markdown; internal links
@@ -88,8 +90,14 @@ external-fix-apply:
serve-lan: preflight serve-lan: preflight
python3 scripts/serve_lan.py python3 scripts/serve_lan.py
# NOTE: clean does NOT remove .tools/ -- the pinned toolchain is expensive to # Remove build output (public/ and linkcheck/).
# reinstall and independent of build output. Remove it manually if ever needed. # NOTE: does NOT remove .tools/ -- the pinned toolchain is expensive to reinstall
# and independent of build output. Remove it manually if ever needed.
clean: clean:
rm -rf $(OUT) linkcheck rm -rf $(OUT) linkcheck
# List every make target with a one-line description (self-maintaining menu).
# NOTE: `make --help` is reserved by GNU make (it prints make's own options and
# cannot run a project target); use `make help` for this project's targets.
help:
@python3 scripts/make_help.py
+4 -1
View File
@@ -284,8 +284,11 @@ Run from the project root. `public/`, `linkcheck/`, `resources/_gen/`, and
| `make link-check` | **Offline** scan of *internal* links in `content/` → `linkcheck/internal.json`. Fast, no network. | | `make link-check` | **Offline** scan of *internal* links in `content/` → `linkcheck/internal.json`. Fast, no network. |
| `make link-fix` | Comment out confirmed dead *internal* links, then rebuild content + index. | | `make link-fix` | Comment out confirmed dead *internal* links, then rebuild content + index. |
| `make external-check` | **Network** scan of all *external* links in `content/` → console report + `linkcheck/external_dead.txt`. Report-only; always exits 0. | | `make external-check` | **Network** scan of all *external* links in `content/` → console report + `linkcheck/external_dead.txt`. Report-only; always exits 0. |
| `make clean` | Remove `public/` and `linkcheck/`. | | `make external-fix` | Preview which external links are truly dead (DNS failed / host unreachable). Report-only; changes nothing. Run `make external-check` first. |
| `make external-fix-apply` | Comment out the truly-dead external links, then rebuild content + index. 404s/SSL/5xx/redirects/refused go to `linkcheck/manual_review_external.txt` (manual review). |
| `make clean` | Remove `public/` and `linkcheck/` (does NOT remove `.tools/`). |
| `make all` | `build` + `index` (the default target). | | `make all` | `build` + `index` (the default target). |
| `make help` | List every make target with a one-line description. (GNU make reserves `make --help` for its own options, so this project uses `make help`.) |
Notes on the targets: Notes on the targets:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 27 KiB

+6
View File
@@ -3,8 +3,14 @@ title: "Books"
date: date:
draft: false draft: false
--- ---
</br>
![Horizpontal.jpeg](/Images/Headers/Books.jpg)
![Horizpontal.jpeg](/Images/Artwork/Books1.jpg) ![Horizpontal.jpeg](/Images/Artwork/Books1.jpg)
</br>
| Liberty Tools Book List | | | Liberty Tools Book List | |
| ------------------------------------------------------------ | ------------------------------------------------------------ | | ------------------------------------------------------------ | ------------------------------------------------------------ |
| | | | | |
+59
View File
@@ -0,0 +1,59 @@
#!/usr/bin/env python3
"""Print a help menu of this project's make targets.
Parses the repo Makefile and lists every target with the first line of its
preceding comment block as the description. Self-maintaining: add a target plus
a comment and it appears here automatically -- no list to keep in sync.
Run via `make help` (GNU make reserves `make --help` for its own options, so a
project cannot override that flag).
"""
import os
import re
# The Makefile lives at the repo root; this script is in scripts/.
MAKEFILE = os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "Makefile"
)
# A target line: name at column 0, optional whitespace, ':' NOT immediately
# followed by '=' (which would make it a variable assignment like `HUGO := hugo`).
# Names starting with '.' (e.g. the .PHONY line) are excluded.
TARGET_RE = re.compile(r"^([A-Za-z0-9_-]+)[ \t]*:(?!=)")
def parse_targets(path):
"""Return an ordered list of (name, first_comment_line) for each target."""
targets = []
comment_buf = []
with open(path) as f:
for line in f:
stripped = line.lstrip()
if stripped.startswith("#"):
comment_buf.append(stripped.lstrip("#").strip())
continue
if not line[0].isspace():
m = TARGET_RE.match(line)
if m:
targets.append((m.group(1), comment_buf[0] if comment_buf else ""))
comment_buf = []
continue
# Any other non-comment line resets the pending comment block.
comment_buf = []
return targets
def main():
targets = parse_targets(MAKEFILE)
width = max((len(name) for name, _ in targets), default=0)
print("Liberty Tools -- available make targets:")
print()
for name, desc in targets:
print(f" make {name:<{width}} {desc}")
print()
print("Note: `make --help` is reserved by GNU make; use `make help` for this menu.")
print("Toolchain is pinned in .tools/ (run `make bootstrap` once). See README.md for details.")
if __name__ == "__main__":
main()
+119
View File
@@ -0,0 +1,119 @@
#!/usr/bin/env python3
"""Render unified Liberty Tools title cards.
Every section page's header title is text baked into a JPEG (there is no HTML
heading above the image). This script re-renders all of them with ONE
consistent recipe so the pages look uniform:
- fixed card size 1046x124 (matches the Death Athletes reference)
- black background
- gold (221,177,57) HOLLOW-OUTLINE slab-serif text (AlfaSlabOne)
- 76px text height (matches the Death Athletes reference)
- text centered horizontally and vertically
It writes content/Images/Headers/<Name>.jpg for each page in the PAGE map and
adds the previously-missing Books card. The second image under each title
(Artwork/*.jpg) is intentionally NOT touched.
Usage: python3 scripts/render_title_cards.py
Verify: python3 scripts/render_title_cards.py --check
"""
import argparse
import os
from PIL import Image, ImageDraw, ImageFont
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
FONT = os.path.join(REPO, "static", "fonts", "AlfaSlabOne.ttf")
HDR_DIR = os.path.join(REPO, "content", "Images", "Headers")
GOLD = (221, 177, 57)
BLACK = (0, 0, 0)
CARD_W, CARD_H = 1046, 124 # uniform card box (Death Athletes reference)
TEXT_H = 76 # uniform text height (Death Athletes reference)
STROKE = 3 # gold outline thickness
# page -> (title text, output filename in Headers/)
# Books is NEW (the page had no header before). All others overwrite the
# existing file so the .md references need no changes.
PAGES = {
"agorism": ("AGORISM", "Agorism.jpg"),
"books": ("BOOKS", "Books.jpg"),
"covid": ("COVID", "Covid.jpg"),
"deathathletes": ("DEATH ATHLETES", "Death.jpg"),
"defense": ("DEFENSE", "defense2.jpg"),
"education": ("EDUCATION", "education.jpg"),
"frontends": ("FRONT ENDS", "frontends.jpg"),
"hacking": ("HACKING", "Hacking.jpg"),
"health": ("HEALTH", "health.jpg"),
"job-boards": ("JOB BOARDS", "JobBoards.jpg"),
"metrics": ("METRICS", "Metrics.jpg"),
"money": ("MONEY", "Money.jpg"),
"organizations": ("ORGANIZATIONS", "orgs.jpg"),
"osint": ("OSINT", "OSINT.jpg"),
"political-tools": ("POLITICAL", "Political.jpg"),
"privacy": ("PRIVACY", "privacy.jpg"),
"self-hosting": ("SELF HOSTING", "SelfHosting1.jpg"),
"social-media": ("SOCIAL MEDIA", "socialmedia3.jpg"),
"affiliates": ("AFFILIATES", "Affiliates2.jpg"),
}
def font_size_for(text: str) -> int:
"""Largest font size whose text height is <= TEXT_H (binary search)."""
lo, hi, best = 20, 400, 20
while lo <= hi:
mid = (lo + hi) // 2
f = ImageFont.truetype(FONT, mid)
h = f.getbbox(text)[3] - f.getbbox(text)[1]
if h <= TEXT_H:
best, lo = mid, mid + 1
else:
hi = mid - 1
return best
def render(title: str, out_path: str, write: bool = True) -> dict:
size = font_size_for(title)
f = ImageFont.truetype(FONT, size)
l, t, r, b = f.getbbox(title)
img = Image.new("RGB", (CARD_W, CARD_H), BLACK)
d = ImageDraw.Draw(img)
# center the text in the fixed card box
x = (CARD_W - (r - l)) // 2 - l
y = (CARD_H - (b - t)) // 2 - t
# hollow gold: black fill + gold outline stroke
d.text((x, y), title, font=f, fill=BLACK, stroke_width=STROKE, stroke_fill=GOLD)
if write:
img.save(out_path, quality=92)
# measure the rendered gold bbox to report centering
g = img.convert("L").point(lambda v: 255 if v > 40 else 0)
bx1, by1, bx2, by2 = g.getbbox()
return {
"title": title, "font_size": size,
"text_w": bx2 - bx1, "text_h": by2 - by1,
"left_gap": bx1, "right_gap": CARD_W - bx2,
"centered_x": abs(bx1 - (CARD_W - bx2)) <= 3,
"fits": bx2 - bx1 <= CARD_W,
}
def main():
ap = argparse.ArgumentParser()
ap.add_argument("--check", action="store_true",
help="report each card's geometry without writing files")
args = ap.parse_args()
for page, (title, fname) in PAGES.items():
out = os.path.join(HDR_DIR, fname)
if args.check:
r = render(title, out, write=False)
flag = "OK" if (r["centered_x"] and r["fits"]) else "PROBLEM"
print(f"[{flag:7}] {page:16} {title:16} font={r['font_size']:3} "
f"text_w={r['text_w']:4} L={r['left_gap']:3} R={r['right_gap']:3}")
else:
r = render(title, out)
print(f"wrote {out} (font={r['font_size']}, text_w={r['text_w']})")
if __name__ == "__main__":
main()
Binary file not shown.
+93
View File
@@ -0,0 +1,93 @@
Copyright 2016 The Alfa Slab One Project Authors (http://www.jmsole.cl | info@jmsole.cl), with Reserved Font Name "Alfa Slab".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
+12
View File
@@ -34,3 +34,15 @@
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
// Cap the sidebar logo.
//
// The theme sets `.book-brand img { width: 100% }`, which stretches the logo
// to fill the (widened) sidebar — ~285px locally vs 113px on the live site.
// Pin it to the live size so it is no longer huge. `_custom.scss` is imported
// last in book.scss, so this wins the cascade over the theme rule.
.book-brand img {
width: 113px;
max-width: 113px;
height: auto;
}
+3 -2
View File
@@ -4,9 +4,10 @@
// } // }
// $pagefind-ui-background: #84DE02; // $pagefind-ui-background: #84DE02;
// Site-wide font: +1pt (16px -> 17px). Every rem-based theme size scales with this. // Site-wide font: +3pt from the 16px baseline (16px -> 19px).
// Every rem-based theme size scales with this one variable.
:root { :root {
--font-size: 17px; --font-size: 19px;
} }
// Widen the page so wide screens don't leave ~310px dead gutters on each side. // Widen the page so wide screens don't leave ~310px dead gutters on each side.