tiennm99 64c7b76b4e feat(newsletter): port the engine to JavaScript
Translates the seven-subcommand engine to Node ESM, one module per former Go
file, invoked as `node scripts/newsletter <command>` from the repo root. The Go
implementation stays in place for now so parity can be measured against it.

Hand-rolled HTML and XML regexes give way to cheerio, which removes the manual
string surgery in caption extraction and covers RSS and sitemap XML through
xmlMode without a second parser. fetch-via-defuddle gains a local extraction
stage ahead of the defuddle.md proxy; the proxy stays, because fetching from a
third IP is the whole point when this machine's IP is the blocked one. Both
stages now emit the same YAML frontmatter plus body, and an extraction that
looks like a bot challenge counts as a local failure so the proxy still runs.

Behaviour is preserved where it is load-bearing rather than where it is merely
idiomatic: query strings are rebuilt by string surgery so surviving parameters
keep their original order and encoding, duplicate detection stays an index loop
with byte-offset boundary checks so a prefix of a stored URL is not a false
match, empty optional fields are omitted rather than emitted as "", a deep-crawl
miss reports cutoff as null rather than dropping the key, bullet filtering counts
code points, tag counts keep their six-column alignment, and a malformed percent
sequence falls back to the raw substring.

The printer lives in its own module so a command module never imports the
dispatcher: index.js runs main() at module scope, so that cycle would execute
the CLI as a side effect of any import. Missing dependencies report one
actionable line instead of a module-resolution stack trace, and a reader that
closes early exits quietly instead of raising EPIPE.
2026-09-18 16:23:58 +07:00
2024-12-21 14:32:57 +07:00
2023-09-17 10:26:32 +07:00
2026-01-18 12:28:13 +07:00

blog

Source of miti99.com — personal blog (VN/EN) built with Hugo and the Stack theme.

Quick start

git submodule update --init --recursive
hugo server -D

Site available at http://localhost:1313.

Content structure

Posts live under content/post/YYYY/MM/DD/index.md. Each post is a Hugo leaf bundle — images and assets sit next to index.md in the same directory.

content/
  post/
    2024/
      03/
        15/
          index.md     ← post content (Vietnamese / English)
          cover.jpg    ← optional cover image
  page/                ← standalone pages (about, projects, …)

Theme customization

Theme config lives in config/ (Hugo config directory split). Key overrides:

  • config/_default/params.toml — sidebar, avatar, footer, color scheme
  • config/_default/menu.toml — navigation links
  • assets/ — custom CSS/JS overrides loaded on top of the Stack theme
  • layouts/ — template overrides (add a file here to override any Stack partial)

The Stack theme is pulled in as a git submodule under themes/hugo-theme-stack/.

Working with AI tools

This repo runs from Claude Code, OpenCode, or Codex off one shared engine (scripts/newsletter/, Go via go run) and one instruction file (AGENTS.md). Repository-scoped Codex skills use the official .agents/skills/ format; no installer is required. Setup, invocation per tool, and how to pick one and remove the rest: see docs/multi-tool-usage.md.

License

Apache-2.0 — see LICENSE.

S
Description
Source of miti99.com — personal blog (VN/EN) built with Hugo + Stack theme.
Readme Apache-2.0
147 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 59%
HTML 21.2%
CSS 15.6%
Shell 4.2%