A static, zero-build novel reader for Piligrim — a USS espionage novel set in Nice (1940) and Brittany (1944). HTML · CSS · Vanilla JS. Chapters in a custom Markdown dialect. Works offline.
| Reading progress | Saves your place automatically; resume where you left off |
| Themes & typography | Light/dark mode, font size, line height, narrow column layout |
| PWA | Installable on mobile; works offline with cached fonts and chapters |
| Offline fonts | Self-hosted typefaces in assets/fonts/ — no external requests |
| Footnotes & documents | Inline glossary tooltips ([[n]]) and archival document blocks |
| AI illustrations | Chapter figures with auto-caption: "Изображение сгенерировано Google Gemini" |
| # | Title | Era | Status |
|---|---|---|---|
| 1 | EYES ONLY (Только для глаз) | 1944 · Paris | published |
| 2 | Coup de Soleil (Солнечный удар) | 1940 · Nice | published |
| 3 | Beobachtung (Наблюдение) | 1944 · Brittany | soon |
| 4 | BUREAU DE PRESSE (Бюро печати) | 1940 · Nice | soon |
Registry: chapters/manifest.json.
Requirements: Node.js 18+ (for the local dev server only — the site itself has no build step).
git clone https://github.com/krwg/piligrim.git
cd piligrim
.\serve.ps1Then open the address from the console (usually http://localhost:8000).
Alternative (cross-platform):
npm run serve
# or with a custom port:
.\serve.ps1 3000Note: A plain
file://open won't work — the reader fetches chapters via HTTP. Always use the dev server or GitHub Pages.
piligrim/
├── index.html # Entry point
├── manifest.json # PWA manifest
├── sw.js # Service worker (offline cache)
├── serve.ps1 # Windows launcher → tools/serve.mjs
├── package.json # npm scripts (serve, convert)
├── .nojekyll # Disables Jekyll on GitHub Pages
├── .github/workflows/
│ └── pages.yml # Deploy static site (GitHub Actions)
├── assets/
│ ├── fonts/ # Offline typefaces
│ └── img/ # Chapter illustrations & PWA icons
├── chapters/
│ ├── manifest.json # Chapter registry (title, era, status)
│ ├── ch01.txt # Published chapter content
│ ├── ch02.txt
│ └── _TEMPLATE.md # Chapter format reference
└── tools/
├── serve.mjs # Local static server
├── convert-chapter.mjs # Source MD → chapter .txt
├── convert-ch02.mjs # Chapter 2 conversion script
└── glossary-*.mjs # Footnote enrichment helpers
Metadata — inside a ::chapter:: … ::/chapter:: block (not YAML --- front-matter: Jekyll on GitHub Pages swallows --- blocks):
::chapter::
title: Chapter Title (Translation)
when: Month Year, City
era: 1944 · City
epigraph: |
Quote text.
epigraph_source: "Source"
::/chapter::
Other blocks:
| Block | Purpose |
|---|---|
::figure:: … ::/figure:: |
Illustration + caption; image path under assets/img/ |
:::document … ::: |
Archival inserts (labels, meta, epigraphs, handwriting) |
word[[1]] + [[1]]: definition |
Inline glossary tooltips |
Under every figure the reader adds automatically: «Изображение сгенерировано Google Gemini».
Edit paths in tools/convert-chapter.mjs, then:
npm run convertChapter 2 has a dedicated script:
node tools/convert-ch02.mjsOutput: chapters/ch02.txt + 12 illustrations in assets/img/ch02-*.png:
billet · train · vokzal · taxi · pension · diner · marche · promenade · fontaine · jardin · port · traction
- Add an entry to
chapters/manifest.json(id,title,era,status,file). - Place the
.txtfile inchapters/. - Add the file path to the service worker cache list in
sw.js(if offline support is needed).
- Settings → Pages → Build and deployment — source: GitHub Actions, workflow Deploy static site (not Jekyll).
- Keep an empty
.nojekyllin the repo root — prevents Jekyll from processing chapter files. - Push to
main— workflow.github/workflows/pages.ymldeploys the repo as-is (no build step). - Live URL: https://krwg.github.io/piligrim/
Code and site engine: GNU GPL v3.
Статическая читалка романа «Пилигрим» — шпионский роман об УСС: Ницца 1940, Бретань 1944. Без сборки: HTML, CSS, JavaScript. Главы в собственном Markdown-формате. Работает офлайн.
| Прогресс чтения | Автосохранение позиции; продолжить с того места |
| Темы и типографика | Светлая/тёмная тема, размер шрифта, межстрочный интервал, узкая колонка |
| PWA | Установка на телефон; работа офлайн с кэшированными шрифтами и главами |
| Офлайн-шрифты | Локальные шрифты в assets/fonts/ — без внешних запросов |
| Сноски и документы | Всплывающие подсказки ([[n]]) и блоки архивных вставок |
| AI-иллюстрации | Автоподпись под каждым изображением: «Изображение сгенерировано Google Gemini» |
| № | Название | Эпоха | Статус |
|---|---|---|---|
| 1 | EYES ONLY (Только для глаз) | 1944 · Париж | опубликована |
| 2 | Coup de Soleil (Солнечный удар) | 1940 · Ницца | опубликована |
| 3 | Beobachtung (Наблюдение) | 1944 · Бретань | скоро |
| 4 | BUREAU DE PRESSE (Бюро печати) | 1940 · Ницца | скоро |
Реестр: chapters/manifest.json.
Нужно: Node.js 18+ (только для локального сервера — сам сайт не собирается).
git clone https://github.com/krwg/piligrim.git
cd piligrim
.\serve.ps1Откройте адрес из консоли (обычно http://localhost:8000).
Альтернатива (Windows / macOS / Linux):
npm run serve
# или другой порт:
.\serve.ps1 3000Важно: через
file://не откроется — читалка загружает главы по HTTP. Используйте локальный сервер или GitHub Pages.
piligrim/
├── index.html # Точка входа
├── manifest.json # Манифест PWA
├── sw.js # Service worker (офлайн-кэш)
├── serve.ps1 # Запуск сервера (Windows)
├── package.json # npm-скрипты (serve, convert)
├── .nojekyll # Отключает Jekyll на GitHub Pages
├── .github/workflows/
│ └── pages.yml # Деплой статики (GitHub Actions)
├── assets/
│ ├── fonts/ # Локальные шрифты
│ └── img/ # Иллюстрации и иконки PWA
├── chapters/
│ ├── manifest.json # Реестр глав
│ ├── ch01.txt # Опубликованная глава
│ ├── ch02.txt
│ └── _TEMPLATE.md # Справка по формату
└── tools/
├── serve.mjs # Локальный сервер
├── convert-chapter.mjs # Конвертация MD → .txt
├── convert-ch02.mjs # Скрипт для главы 2
└── glossary-*.mjs # Обогащение сносок
Метаданные — в блоке ::chapter:: … ::/chapter:: (не YAML ---: Jekyll на GitHub Pages съедает такие блоки):
::chapter::
title: Название главы (Перевод)
when: Месяц год, Город
era: 1944 · Город
epigraph: |
Текст эпиграфа.
epigraph_source: "Источник"
::/chapter::
Другие блоки:
| Блок | Назначение |
|---|---|
::figure:: … ::/figure:: |
Иллюстрация + подпись; путь в assets/img/ |
:::document … ::: |
Архивные вставки (метки, штампы, эпиграфы, пометки на полях) |
слово[[1]] + [[1]]: пояснение |
Всплывающие термины |
Под каждой иллюстрацией читалка автоматически добавляет: «Изображение сгенерировано Google Gemini».
Отредактируйте пути в tools/convert-chapter.mjs, затем:
npm run convertДля главы 2 — отдельный скрипт:
node tools/convert-ch02.mjsРезультат: chapters/ch02.txt + 12 иллюстраций в assets/img/ch02-*.png:
billet · train · vokzal · taxi · pension · diner · marche · promenade · fontaine · jardin · port · traction
- Запись в
chapters/manifest.json(id,title,era,status,file). - Файл
.txtвchapters/. - Путь к файлу в кэше service worker (
sw.js) — для офлайн-режима.
- Settings → Pages → Build and deployment — источник: GitHub Actions, workflow Deploy static site (не Jekyll).
- В корне обязателен пустой
.nojekyll. - Push в
main— workflow.github/workflows/pages.ymlдеплоит репозиторий как есть (без сборки). - Адрес: https://krwg.github.io/piligrim/
Код и движок сайта: GNU GPL v3.