Skip to content

Turn any technical book PDF into a Claude Code skill — ready to study, reference, and use while you work.

feat(docs): make the site indexable and shareable

virgiliojr94ee5f2d65053b
diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
index f9a4dc5..5ce4405 100644
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -5,6 +5,7 @@ on:
branches: [master]
paths:
- docs/**
+ - overrides/**
- README.md
- SKILL.md
- BACKERS.md
@@ -13,6 +14,7 @@ on:
pull_request:
paths:
- docs/**
+ - overrides/**
- README.md
- SKILL.md
- BACKERS.md
@@ -33,16 +35,36 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
+ - name: Install Cairo (social card rendering)
+ run: sudo apt-get install -y --no-install-recommends libcairo2 libffi-dev
- name: Install MkDocs Material
- run: pip install mkdocs-material
+ run: pip install "mkdocs-material[imaging]" mkdocs-redirects
- name: Assemble docs sources
# Single-source: the Guide and Skill Reference pages are the repo-root
# README.md / SKILL.md, copied in (never committed under docs/). The
# landing page docs/index.md is committed and curated separately.
+ #
+ # README links are written repo-relative (`docs/faq.md`, `docs/assets/…`)
+ # so they work on GitHub. Once the file lands *inside* docs/ they must
+ # drop that prefix, otherwise every one of them 404s on the site.
run: |
- cp README.md docs/guide.md
- cp SKILL.md docs/skill-reference.md
+ # README.md carries no frontmatter (it has to stay clean on GitHub), so
+ # the Guide page would otherwise inherit the generic site description.
+ {
+ printf -- '---\n'
+ printf -- 'description: "Convert a book, PDF, EPUB or DOCX into an agent skill for Claude Code, GitHub Copilot CLI and Amp. Install, run, and cut token cost 24x-51x."\n'
+ printf -- 'seo_title: "book-to-skill Guide - Convert Any Book Into an Agent Skill"\n'
+ printf -- '---\n\n'
+ sed -E 's,(href="|src="|\]\()docs/,\1,g' README.md
+ } > docs/guide.md
+ # SKILL.md's `description` is written for host agents (~400 chars); as a
+ # meta description it just gets truncated mid-sentence in the SERP.
+ sed '0,/^description:/s|^description:.*|description: "The full book-to-skill spec: every step, depth budget, extraction mode, and quality rule the agent follows to turn a document into a skill."\nseo_title: "Skill Reference - The Complete book-to-skill Spec"|' \
+ SKILL.md > docs/skill-reference.md
cp BACKERS.md docs/BACKERS.md
+ # Mirror image: the docs pages link back with `../README.md`, correct on
+ # GitHub, a 404 on the site — where that same file is published as guide/.
+ sed -i -E 's,\]\(\.\./README\.md\),](guide.md),g' docs/*.md
- name: Build
run: mkdocs build
- name: Deploy to gh-pages (master push only)
diff --git a/.gitignore b/.gitignore
index 2aee714..de5c726 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,6 @@ site/
docs/guide.md
docs/skill-reference.md
docs/BACKERS.md
+
+# Social-card render cache (mkdocs-material[imaging]).
+.cache/
diff --git a/README.md b/README.md
index 388b775..9c243b9 100644
--- a/README.md
+++ b/README.md
@@ -25,17 +25,17 @@
<a href="#-why">Why</a> ·
<a href="#-what-it-generates">What it generates</a> ·
<a href="#-beyond-books">Beyond books</a> ·
- <a href="docs/HOW_IT_WORKS.md">How it works</a> ·
- <a href="docs/USAGE.md">Usage</a> ·
- <a href="docs/INSTALL.md">Install</a> ·
- <a href="docs/FAQ.md">FAQ</a> ·
- <a href="docs/PERFORMANCE.md">Performance</a> ·
- <a href="docs/ARCHITECTURE.md">Architecture</a> ·
+ <a href="docs/how-it-works.md">How it works</a> ·
+ <a href="docs/usage.md">Usage</a> ·
+ <a href="docs/install.md">Install</a> ·
+ <a href="docs/faq.md">FAQ</a> ·
+ <a href="docs/performance.md">Performance</a> ·
+ <a href="docs/architecture.md">Architecture</a> ·
<a href="CHANGELOG.md">Changelog</a>
</p>
<p align="center">
- <strong>24×–51× fewer tokens than dumping the book into context</strong> to answer one question, measured on real books (<a href="docs/PERFORMANCE.md#the-discovery-loop-tax">how it's measured</a>).
+ <strong>24×–51× fewer tokens than dumping the book into context</strong> to answer one question, measured on real books (<a href="docs/performance.md#the-discovery-loop-tax">how it's measured</a>).
</p>
**How it works, in 3 steps:**
@@ -99,7 +99,7 @@ If you re-open a document often enough to wish you'd memorized it, it's a candid
A PDF-reading agent doesn't just read — it *navigates*: it re-fetches the ToC, backtracks, and re-processes all of it on every turn. book-to-skill pays that structuring cost **once**, at conversion, so queries stay proportional to the answer — **24×–51× fewer tokens** than dumping the book into context, measured on real books.
-📊 **Full methodology, numbers, and per-book tables → [docs/PERFORMANCE.md](docs/PERFORMANCE.md#the-discovery-loop-tax)**
+📊 **Full methodology, numbers, and per-book tables → [docs/performance.md](docs/performance.md#the-discovery-loop-tax)**
---
@@ -107,7 +107,7 @@ A PDF-reading agent doesn't just read — it *navigates*: it re-fetches the ToC,
Two halves: a deterministic Python **extractor** (document → clean text + metadata) and a spec-driven **generator** (your agent follows `SKILL.md` to turn that into a structured skill). On-demand chapter files keep the loaded skill small.
-🔧 **Full walkthrough (Steps 0–10, extraction modes, token budgets) → [docs/HOW_IT_WORKS.md](docs/HOW_IT_WORKS.md)**
+🔧 **Full walkthrough (Steps 0–10, extraction modes, token budgets) → [docs/how-it-works.md](docs/how-it-works.md)**
---
@@ -115,7 +115,7 @@ Two halves: a deterministic Python **extractor** (document → clean text + meta
`/book-to-skill <path|folder|glob> [skill-name]` — plus analyze-only, generate-from-analysis, and update/fold-in modes.
-▶️ **All modes and examples → [docs/USAGE.md](docs/USAGE.md)**
+▶️ **All modes and examples → [docs/usage.md](docs/usage.md)**
---
@@ -127,7 +127,7 @@ git clone https://github.com/virgiliojr94/book-to-skill.git ~/.claude/skills/boo
# (Copilot CLI: ~/.copilot/skills/ · Amp/cross-agent: ~/.agents/skills/)
```
-📥 **All hosts, optional extractors, and the standalone CLI → [docs/INSTALL.md](docs/INSTALL.md)**
+📥 **All hosts, optional extractors, and the standalone CLI → [docs/install.md](docs/install.md)**
---
@@ -135,7 +135,7 @@ git clone https://github.com/virgiliojr94/book-to-skill.git ~/.claude/skills/boo
Common questions — "why not just dump the PDF?", cost, privacy, non-book inputs, multi-file books.
-❓ **Answers → [docs/FAQ.md](docs/FAQ.md)**
+❓ **Answers → [docs/faq.md](docs/faq.md)**
---
@@ -200,8 +200,8 @@ book-to-skill/
│ └── validate_skill.py # checks a generated SKILL.md against host rules (--lens claude|copilot|amp)
├── tests/ # pytest suite (extraction, detection, discovery tax)
├── docs/
-│ ├── PERFORMANCE.md # measured benchmarks, discovery tax, cost
-│ └── ARCHITECTURE.md # pipeline + component map
+│ ├── performance.md # measured benchmarks, discovery tax, cost
+│ └── architecture.md # pipeline + component map
├── CHANGELOG.md # release history (semver)
├── CONTRIBUTING.md # dev setup, PR conventions, release process
├── SECURITY.md # vulnerability reporting
diff --git a/docs/404.md b/docs/404.md
index 1cae966..d50aa0c 100644
--- a/docs/404.md
+++ b/docs/404.md
@@ -1,3 +1,10 @@
+---
+description: "That page moved or never existed. Jump back to the book-to-skill guide, install steps, or FAQ."
+noindex: true
+search:
+ exclude: true
+---
+
<p align="center">
<img width="220" src="assets/booklin-confused.png" alt="Booklin looking puzzled">
</p>
@@ -7,5 +14,5 @@
Booklin can't find that page. It may have moved, or the link is off.
- [Home](index.md)
-- [Guide](guide.md) · [How it works](HOW_IT_WORKS.md) · [FAQ](FAQ.md) · [Install](INSTALL.md)
+- [Guide](guide.md) · [How it works](how-it-works.md) · [FAQ](faq.md) · [Install](install.md)
- [Search the docs](https://booktoskill.is-a.dev/)
diff --git a/docs/ARCHITECTURE.md b/docs/architecture.md
similarity index 95%
rename from docs/ARCHITECTURE.md
rename to docs/architecture.md
index 17a943d..9179a99 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/architecture.md
@@ -1,3 +1,8 @@
+---
+description: "How book-to-skill is built: a deterministic Python extractor plus a spec-driven agent generator. Pipeline, component map, and the design tradeoffs behind both."
+seo_title: "Architecture - How book-to-skill Extracts and Generates"
+---
+
# Architecture
book-to-skill has two halves: a **deterministic extractor** (Python) and a
@@ -49,7 +54,7 @@ document into clean text + metadata; the agent turns that into a structured skil
1. **Extract structure, not summaries** — named frameworks, decision rules,
anti-patterns; never raw passages.
2. **Compile-time over runtime** — pay navigation/structuring once; at query time
- load only the relevant chapter. See [PERFORMANCE.md](PERFORMANCE.md).
+ load only the relevant chapter. See [Performance & Cost](performance.md).
3. **On-demand chapters** — `SKILL.md` stays small; chapter files cost tokens only
when read.
4. **Front-loaded `SKILL.md`** — most important content first (compaction truncates
diff --git a/docs/FAQ.md b/docs/faq.md
similarity index 94%
rename from docs/FAQ.md
rename to docs/faq.md
index b12ad9e..00aa1c0 100644
--- a/docs/FAQ.md
+++ b/docs/faq.md
@@ -1,3 +1,8 @@
+---
+description: "Answers on book-to-skill: why a skill beats dumping a book into context, how it compares to RAG and 1M-token windows, copyright, accuracy, and supported formats."
+seo_title: "book-to-skill FAQ - Skills vs Context Dumps, RAG, Copyright"
+---
+
## ❓ FAQ
**"Can't I just dump the PDF/EPUB into my Claude project context?"**
diff --git a/docs/HOW_IT_WORKS.md b/docs/how-it-works.md
similarity index 92%
rename from docs/HOW_IT_WORKS.md
rename to docs/how-it-works.md
index b2aaf7d..e3286a2 100644
--- a/docs/HOW_IT_WORKS.md
+++ b/docs/how-it-works.md
@@ -1,3 +1,8 @@
+---
+description: "The full book-to-skill walkthrough, Steps 0-10: document extraction, chapter detection, framework mining, depth budgets, and how the agent skill gets assembled."
+seo_title: "How book-to-skill Works - Book to Agent Skill, Step by Step"
+---
+
<img align="right" width="180" src="assets/booklin-casting.png" alt="Booklin casting book-to-skill magic">
## ⚙️ How it works
diff --git a/docs/index.md b/docs/index.md
index 9ddc60c..7dbb93f 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,9 +1,27 @@
---
+description: "Turn any book, PDF or EPUB into a structured agent skill for Claude Code, GitHub Copilot CLI and Amp. Named frameworks and decision rules, loaded on demand."
+seo_title: "book-to-skill - Turn Any Book Into an AI Agent Skill"
hide:
- navigation
- toc
---
+<script type="application/ld+json">
+{
+ "@context": "https://schema.org",
+ "@type": "SoftwareApplication",
+ "name": "book-to-skill",
+ "applicationCategory": "DeveloperApplication",
+ "operatingSystem": "Linux, macOS, Windows",
+ "description": "Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, RTF, MOBI/AZW) into structured, on-demand agent skills for Claude Code, GitHub Copilot CLI and Amp.",
+ "url": "https://booktoskill.is-a.dev/",
+ "codeRepository": "https://github.com/virgiliojr94/book-to-skill",
+ "license": "https://opensource.org/licenses/MIT",
+ "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
+ "author": { "@type": "Person", "name": "virgiliojr94", "url": "https://github.com/virgiliojr94" }
+}
+</script>
+
# book-to-skill
<p style="font-size: 1.25rem; max-width: 42rem;">
@@ -71,13 +89,13 @@ book-to-skill /path/to/book.pdf --mode text
<div class="grid cards" markdown>
-- :material-sitemap:{ .lg .middle } __[Architecture](ARCHITECTURE.md)__
+- :material-sitemap:{ .lg .middle } __[Architecture](architecture.md)__
---
How the deterministic extractor and the spec-driven generator fit together.
-- :material-speedometer:{ .lg .middle } __[Performance](PERFORMANCE.md)__
+- :material-speedometer:{ .lg .middle } __[Performance](performance.md)__
---
diff --git a/docs/INSTALL.md b/docs/install.md
similarity index 89%
rename from docs/INSTALL.md
rename to docs/install.md
index fe6018d..b19d9b3 100644
--- a/docs/INSTALL.md
+++ b/docs/install.md
@@ -1,3 +1,8 @@
+---
+description: "Install book-to-skill as an agent skill for Claude Code, GitHub Copilot CLI and Amp, or as a standalone pip CLI. Every host path and optional extractor covered."
+seo_title: "Install book-to-skill - Claude Code, Copilot CLI, Amp, or pip"
+---
+
## 📥 Install
> **Two ways to use it, do not confuse them:**
diff --git a/docs/PERFORMANCE.md b/docs/performance.md
similarity index 92%
rename from docs/PERFORMANCE.md
rename to docs/performance.md
index 16b190f..b43bbc5 100644
--- a/docs/PERFORMANCE.md
+++ b/docs/performance.md
@@ -1,3 +1,8 @@
+---
+description: "Measured token cost of book-to-skill: 24x-51x fewer tokens than dumping a book into context, the Discovery Loop Tax, and per-book tables you can reproduce."
+seo_title: "Performance & Token Cost - book-to-skill Benchmarks"
+---
+
# Performance & Cost
All numbers below are **measured**, not estimated, using `tiktoken` (cl100k_base)
diff --git a/docs/robots.txt b/docs/robots.txt
new file mode 100644
index 0000000..53c397f
--- /dev/null
+++ b/docs/robots.txt
@@ -0,0 +1,4 @@
+User-agent: *
+Allow: /
+
+Sitemap: https://booktoskill.is-a.dev/sitemap.xml
diff --git a/docs/USAGE.md b/docs/usage.md
similarity index 83%
rename from docs/USAGE.md
rename to docs/usage.md
index 3121c22..bd8a0a4 100644
--- a/docs/USAGE.md
+++ b/docs/usage.md
@@ -1,3 +1,8 @@
+---
+description: "Every way to run /book-to-skill: a single file, a folder, a glob, or a list of paths, with extraction modes, skill naming, and worked command examples."
+seo_title: "Usage - Convert a Book, Folder, or Glob into an Agent Skill"
+---
+
## 🚀 Usage
```
diff --git a/mkdocs.yml b/mkdocs.yml
index 6846030..9e4f068 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,5 +1,7 @@
site_name: book-to-skill
-site_description: Convert books and documents into structured, on-demand agent skills.
+site_description: >-
+ Turn any book, PDF or EPUB into a structured agent skill for Claude Code,
+ GitHub Copilot CLI and Amp — frameworks and decision rules, loaded on demand.
site_url: https://booktoskill.is-a.dev/
repo_url: https://github.com/virgiliojr94/book-to-skill
repo_name: virgiliojr94/book-to-skill
@@ -11,6 +13,7 @@ edit_uri: ""
theme:
name: material
+ custom_dir: overrides
logo: assets/logo.png
favicon: assets/logo.png
icon:
@@ -45,14 +48,31 @@ theme:
nav:
- Home: index.md
- Guide: guide.md
- - How it works: HOW_IT_WORKS.md
- - Usage: USAGE.md
- - Install: INSTALL.md
- - FAQ: FAQ.md
- - Architecture: ARCHITECTURE.md
- - Performance: PERFORMANCE.md
+ - How it works: how-it-works.md
+ - Usage: usage.md
+ - Install: install.md
+ - FAQ: faq.md
+ - Architecture: architecture.md
+ - Performance: performance.md
- Skill Reference: skill-reference.md
+plugins:
+ # `search` is on by default, but naming any plugin replaces the default list.
+ - search
+ # Generates the per-page og:/twitter: tags and the shared preview card.
+ # Needs mkdocs-material[imaging] + libcairo2 — see deploy-docs.yml.
+ - social
+ # The docs pages were renamed to lowercase kebab-case slugs; keep the old
+ # SHOUTING_CASE URLs alive so existing inbound links and bookmarks resolve.
+ - redirects:
+ redirect_maps:
+ HOW_IT_WORKS.md: how-it-works.md
+ USAGE.md: usage.md
+ INSTALL.md: install.md
+ FAQ.md: faq.md
+ ARCHITECTURE.md: architecture.md
+ PERFORMANCE.md: performance.md
+
markdown_extensions:
- admonition
- attr_list
diff --git a/overrides/main.html b/overrides/main.html
new file mode 100644
index 0000000..038ad1d
--- /dev/null
+++ b/overrides/main.html
@@ -0,0 +1,30 @@
+{% extends "base.html" %}
+
+{#
+ MkDocs resolves a page's title from the `nav:` entry first, so the frontmatter
+ `title:` never reaches the <title> tag. Nav labels want to stay short ("FAQ",
+ "Usage") while the SERP title wants keywords, so pages carry a separate
+ `seo_title:` in their frontmatter and it wins here when present.
+
+ The homepage is the case Material can't express at all: it renders bare
+ `site_name` ("book-to-skill", 13 characters) with no room for what the project
+ actually does.
+#}
+{# Pages that exist for humans who took a wrong turn, not for the index. #}
+{% block extrahead %}
+ {%- if page and page.meta and page.meta.noindex -%}
+ <meta name="robots" content="noindex, follow">
+ {%- endif -%}
+{% endblock %}
+
+{% block htmltitle %}
+ {%- if page and page.meta and page.meta.seo_title -%}
+ <title>{{ page.meta.seo_title }}</title>
+ {%- elif page and page.is_homepage -%}
+ <title>{{ config.site_name }} — Turn Any Book Into an AI Agent Skill</title>
+ {%- elif page and page.title -%}
+ <title>{{ page.title | striptags }} - {{ config.site_name }}</title>
+ {%- else -%}
+ <title>{{ config.site_name }}</title>
+ {%- endif -%}
+{% endblock %}