wingtip 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. wingtip-0.4.1/.gitignore +44 -0
  2. wingtip-0.4.1/PKG-INFO +342 -0
  3. wingtip-0.4.1/README.md +308 -0
  4. wingtip-0.4.1/config.sample.json +23 -0
  5. wingtip-0.4.1/pyproject.toml +64 -0
  6. wingtip-0.4.1/theme.json +16 -0
  7. wingtip-0.4.1/wingtip/__init__.py +0 -0
  8. wingtip-0.4.1/wingtip/fonts/fira_sans.ttf +0 -0
  9. wingtip-0.4.1/wingtip/fonts/poppins.ttf +0 -0
  10. wingtip-0.4.1/wingtip/generate_card.py +125 -0
  11. wingtip-0.4.1/wingtip/latex_extension.py +19 -0
  12. wingtip-0.4.1/wingtip/main.py +1983 -0
  13. wingtip-0.4.1/wingtip/serve.py +175 -0
  14. wingtip-0.4.1/wingtip/static/css/admonitions.css +151 -0
  15. wingtip-0.4.1/wingtip/static/css/custom.css +348 -0
  16. wingtip-0.4.1/wingtip/static/js/search.js +228 -0
  17. wingtip-0.4.1/wingtip/static/vendor/auto-render.min.js +1 -0
  18. wingtip-0.4.1/wingtip/static/vendor/clipboard.min.js +7 -0
  19. wingtip-0.4.1/wingtip/static/vendor/dark.css +886 -0
  20. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  21. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  22. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  23. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  24. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  25. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Main-Bold.woff2 +0 -0
  26. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  27. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Main-Italic.woff2 +0 -0
  28. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Main-Regular.woff2 +0 -0
  29. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  30. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Math-Italic.woff2 +0 -0
  31. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  32. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  33. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  34. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Script-Regular.woff2 +0 -0
  35. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  36. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  37. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  38. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  39. wingtip-0.4.1/wingtip/static/vendor/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  40. wingtip-0.4.1/wingtip/static/vendor/fonts/material-icons.ttf +0 -0
  41. wingtip-0.4.1/wingtip/static/vendor/iconify.min.js +13 -0
  42. wingtip-0.4.1/wingtip/static/vendor/katex.min.css +1 -0
  43. wingtip-0.4.1/wingtip/static/vendor/katex.min.js +1 -0
  44. wingtip-0.4.1/wingtip/static/vendor/light.css +886 -0
  45. wingtip-0.4.1/wingtip/static/vendor/material-icons.css +20 -0
  46. wingtip-0.4.1/wingtip/template.html +1281 -0
@@ -0,0 +1,44 @@
1
+ # Python
2
+ __pycache__/
3
+ ../__pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+ .Python
7
+ env/
8
+ build/
9
+ develop-eggs/
10
+ dist/
11
+ downloads/
12
+ eggs/
13
+ .eggs/
14
+ lib/
15
+ lib64/
16
+ parts/
17
+ sdist/
18
+ var/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+
23
+ # System files
24
+ .DS_Store
25
+ Thumbs.db
26
+ *.swp
27
+ *.swo
28
+
29
+ # Project specific
30
+ devServer.pid
31
+ pygments.css
32
+ .browser_opened
33
+
34
+ # Keep docs/site for GitHub Pages
35
+ docs/site/
36
+
37
+ # IDE
38
+ .vscode/
39
+ .idea/
40
+ *.sublime-workspace
41
+ *.sublime-project
42
+
43
+
44
+ ../
wingtip-0.4.1/PKG-INFO ADDED
@@ -0,0 +1,342 @@
1
+ Metadata-Version: 2.4
2
+ Name: wingtip
3
+ Version: 0.4.1
4
+ Summary: A static site generator for documentation that is built to be indexed and cited.
5
+ Project-URL: Homepage, https://semanticentity.github.io/WingTip-Static-Site-Generator
6
+ Project-URL: Source, https://github.com/semanticentity/WingTip-Static-Site-Generator
7
+ Project-URL: Issues, https://github.com/semanticentity/WingTip-Static-Site-Generator/issues
8
+ Author: SemanticEntity
9
+ License: MIT
10
+ Keywords: aeo,documentation,llms-txt,markdown,seo,static-site-generator
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Documentation
20
+ Classifier: Topic :: Software Development :: Documentation
21
+ Requires-Python: >=3.9
22
+ Requires-Dist: beautifulsoup4>=4.12
23
+ Requires-Dist: markdown>=3.5
24
+ Requires-Dist: pillow>=10.0
25
+ Requires-Dist: pygments>=2.17
26
+ Requires-Dist: pyyaml>=6.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: build; extra == 'dev'
29
+ Requires-Dist: livereload>=2.6; extra == 'dev'
30
+ Requires-Dist: twine; extra == 'dev'
31
+ Provides-Extra: serve
32
+ Requires-Dist: livereload>=2.6; extra == 'serve'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # WingTip
36
+
37
+ **Open-source, SEO-first documentation sites from Markdown.**
38
+
39
+ ![WingTip social card](social-card.png)
40
+
41
+ [Live demo](https://semanticentity.github.io/WingTip-Static-Site-Generator) · [Migration guide](docs/migration.md) · [Source](https://github.com/semanticentity/WingTip-Static-Site-Generator) · [Roadmap](docs/roadmap.md)
42
+
43
+ WingTip turns a repository `README.md` and `docs/` directory into fast, portable static documentation. It generates crawlable HTML, search and discovery metadata, structured data, machine-readable Markdown artifacts, and an offline-capable site without requiring a hosted documentation platform.
44
+
45
+ Start with zero configuration, customize when needed, and deploy the generated files anywhere.
46
+
47
+ ---
48
+
49
+ ## Why WingTip
50
+
51
+ - **Own the output:** Build ordinary HTML, CSS, JavaScript, feeds, and metadata that can be hosted on any static file server.
52
+ - **Built for discovery:** Generate canonical URLs, robots directives, sitemap metadata, Open Graph and Twitter cards, `TechArticle` and breadcrumb JSON-LD, RSS, and hreflang alternates.
53
+ - **Built for AI retrieval:** Publish `llms.txt`, full concatenated documentation, and a Markdown alternate beside every generated page.
54
+ - **No mandatory CDN runtime:** Core styles, scripts, icons, KaTeX, and fonts are vendored into the Python package and copied into the build. External analytics remain opt-in.
55
+ - **No imposed branding:** Projects without a favicon receive no WingTip favicon, logo, or generated PWA icons.
56
+ - **Zero infrastructure:** Search, navigation, PWA support, and offline fallback work from static hosting.
57
+
58
+ ## Moving from hosted documentation?
59
+
60
+ Use the [migration guide](docs/migration.md) to assess what WingTip supports today, preserve URLs and metadata, validate generated output, and plan a safe cutover. Public repositories and sanitized reproductions can request a [structured migration review](https://github.com/semanticentity/WingTip-Static-Site-Generator/issues/new?template=migration.yml).
61
+
62
+ ## Features
63
+
64
+ ### Search, SEO, and machine-readable output
65
+
66
+ - Per-page `title`, `description`, `keywords`, canonical URL, robots/noindex, language, Open Graph, and Twitter overrides
67
+ - Automatic description fallback from the first paragraph
68
+ - `TechArticle` and `BreadcrumbList` JSON-LD
69
+ - `sitemap.xml`, `robots.txt`, RSS, `llms.txt`, and full concatenated documentation
70
+ - Raw Markdown alternates emitted as `.html.md`
71
+ - Published/updated dates with Git-based modified-date fallback
72
+ - Per-page categories and versions, plus generated `categories.json` and `versions.json`
73
+ - Per-page language and translation mappings with `hreflang` and `x-default`
74
+ - Local client-side full-text search with keyboard navigation ([details](docs/search-features.md))
75
+
76
+ ### Documentation experience
77
+
78
+ - `README.md` becomes `index.html`; top-level `docs/*.md` files become standalone pages
79
+ - Automatic sidebar, table of contents, and previous/next navigation
80
+ - GitHub “Edit this page” links
81
+ - Responsive layout with light/dark mode and screen-reader/keyboard support
82
+ - Pygments syntax highlighting and copy-to-clipboard controls
83
+ - Tables, footnotes, definition lists, attributes, admonitions, and Markdown inside HTML
84
+ - KaTeX math rendering ([examples](docs/math-examples.md))
85
+ - Configurable external-link handling and correct `.md` link rewriting, including fragments and queries
86
+ - Custom Markdown-based `404.html`
87
+
88
+ ### Performance, security, and extensibility
89
+
90
+ - Local image copying, lazy loading, intrinsic dimensions, and responsive `srcset` generation
91
+ - Locally vendored core frontend assets
92
+ - PWA manifest, service worker, precache, and offline fallback
93
+ - PWA icons generated only from a project-supplied `favicon.png`
94
+ - Optional generated or custom Content Security Policy
95
+ - Plausible, Umami, Fathom, Google Analytics, custom analytics, and global/per-page `<head>` snippets
96
+ - Plugin hooks before/after builds and conversions, plus plugin-provided Python-Markdown extensions
97
+ - Theme variables through `theme.json` and static CSS overrides ([theming guide](docs/theming.md))
98
+ - Live development server with auto-reload and scroll restoration
99
+ - Post-build auditor for missing local files, unexpected CDN references, required artifacts, and branding leaks
100
+
101
+ ---
102
+
103
+ ## Installation
104
+
105
+ Python 3.9 or newer is required.
106
+
107
+ ```bash
108
+ pip install wingtip
109
+ ```
110
+
111
+ Install the optional live server:
112
+
113
+ ```bash
114
+ pip install "wingtip[serve]"
115
+ ```
116
+
117
+ For local development from a clone:
118
+
119
+ ```bash
120
+ pip install -e ".[dev]"
121
+ ```
122
+
123
+ ## Quickstart
124
+
125
+ Create a project containing `README.md` and, optionally, a `docs/` directory:
126
+
127
+ ```text
128
+ your-project/
129
+ ├── README.md
130
+ ├── docs/
131
+ │ ├── guide.md
132
+ │ └── api.md
133
+ ├── config.json # optional
134
+ ├── theme.json # optional
135
+ └── favicon.png # optional; enables favicon and PWA icon generation
136
+ ```
137
+
138
+ Run WingTip from the project directory:
139
+
140
+ ```bash
141
+ wingtip
142
+ ```
143
+
144
+ The default output is `docs/site`. To build another source directory into a chosen destination:
145
+
146
+ ```bash
147
+ wingtip --source ./your-project --output ./build
148
+ ```
149
+
150
+ Start the live development server after building:
151
+
152
+ ```bash
153
+ wingtip --serve
154
+ ```
155
+
156
+ Use `wingtip --help` for all CLI options.
157
+
158
+ ---
159
+
160
+ ## Configuration
161
+
162
+ Configuration is optional. Without `config.json`, WingTip derives the project name from the `README.md` heading or source-directory name and uses relative URLs for local portability.
163
+
164
+ Add `config.json` when you want production URLs, repository links, analytics, security policy, or social-card customization:
165
+
166
+ ```json
167
+ {
168
+ "base_url": "https://docs.example.com",
169
+ "project_name": "Acme API",
170
+ "version": "1.0.0",
171
+ "description": "Integration documentation for the Acme API.",
172
+ "author": "Acme",
173
+ "repo_url": "https://github.com/acme/api-docs",
174
+ "og_image": "social-card.png",
175
+ "twitter_handle": "@acme",
176
+ "github": {
177
+ "repo": "acme/api-docs",
178
+ "branch": "main"
179
+ },
180
+ "analytics": {
181
+ "provider": "plausible",
182
+ "domain": "docs.example.com"
183
+ },
184
+ "csp": true,
185
+ "social_card": {
186
+ "title": "Acme API",
187
+ "tagline": "Build with Acme.",
188
+ "theme": "light",
189
+ "font": "Poppins"
190
+ }
191
+ }
192
+ ```
193
+
194
+ Place a local `favicon.png` in the project root to emit favicon/nav-logo markup and generate 192×192 and 512×512 PWA icons. If it is absent, WingTip emits none of those branded assets.
195
+
196
+ ### Per-page frontmatter
197
+
198
+ Use YAML frontmatter to control individual pages:
199
+
200
+ ```yaml
201
+ ---
202
+ title: Authentication API
203
+ description: Authenticate server-side requests to the Acme API.
204
+ keywords:
205
+ - API authentication
206
+ - OAuth
207
+ canonical: https://docs.example.com/authentication
208
+ noindex: false
209
+ author: Acme Developer Relations
210
+ date: 2026-07-16
211
+ lastmod: 2026-07-17
212
+ category: API reference
213
+ version: v2
214
+ lang: en
215
+ translations:
216
+ es: https://docs.example.com/es/authentication
217
+ og_title: Acme API authentication
218
+ twitter_description: Implement Acme API authentication.
219
+ ---
220
+ ```
221
+
222
+ Noindexed pages are excluded from the sitemap, search index, category/version indexes, and structured data.
223
+
224
+ ## Plugins and custom Markdown
225
+
226
+ Place Python modules in `plugins/`. WingTip can auto-load every module or load only names listed in the `plugins` array in `config.json`.
227
+
228
+ Plugins can expose:
229
+
230
+ - `before_build(config, output_dir)`
231
+ - `before_convert(frontmatter, markdown, input_path, output_path)`
232
+ - `after_convert(html, frontmatter, input_path, output_path)`
233
+ - `after_build(config, output_dir)`
234
+ - `markdown_extensions`, as a list or callable returning Python-Markdown extensions
235
+
236
+ Hook failures are reported as warnings so one extension does not silently stop the entire build.
237
+
238
+ ## Build auditing
239
+
240
+ The repository includes a post-build auditor used by CI:
241
+
242
+ ```bash
243
+ python audit_site.py --output docs/site --source .
244
+ ```
245
+
246
+ It exits non-zero when it finds:
247
+
248
+ - Missing local files referenced by generated HTML
249
+ - Known CDN origins for dependencies that WingTip vendors locally
250
+ - Missing required search, SEO, feed, or PWA artifacts
251
+ - Missing PWA icons when a project favicon was supplied
252
+ - Output assets byte-identical to packaged branding assets
253
+ - WingTip branding in a project whose configured name is not WingTip
254
+
255
+ CI also runs a negative fixture that deliberately injects a broken asset reference and verifies that the auditor fails.
256
+
257
+ ---
258
+
259
+ ## GitHub Pages deployment
260
+
261
+ The included GitHub Actions workflow builds and deploys on pushes to `main`. For another repository, the essential build steps are:
262
+
263
+ ```yaml
264
+ - uses: actions/setup-python@v5
265
+ with:
266
+ python-version: "3.12"
267
+ - run: pip install wingtip
268
+ - run: wingtip
269
+ - uses: actions/upload-pages-artifact@v3
270
+ with:
271
+ path: docs/site
272
+ ```
273
+
274
+ Set `base_url` to the final Pages URL so canonical, sitemap, feed, social, and alternate URLs are absolute in production.
275
+
276
+ ---
277
+
278
+ ## Social cards
279
+
280
+ WingTip generates `social-card.png` during a build. Force regeneration after changing card settings:
281
+
282
+ ```bash
283
+ wingtip --regen-card
284
+ ```
285
+
286
+ The `social_card` object supports title, tagline, light/dark style, font, and an optional logo. Per-page `og_image` and `twitter_image` frontmatter can override the site image.
287
+
288
+ ---
289
+
290
+ ## Custom 404 page
291
+
292
+ Create `404.md` in the project root. WingTip converts it to `404.html` with the same Markdown processing and site template as other pages:
293
+
294
+ ```markdown
295
+ ---
296
+ permalink: /404.html
297
+ noindex: true
298
+ ---
299
+
300
+ # Page not found
301
+
302
+ The requested documentation page does not exist.
303
+ ```
304
+
305
+ ---
306
+
307
+ ## Generated output
308
+
309
+ A normal build includes:
310
+
311
+ ```text
312
+ docs/site/
313
+ ├── index.html
314
+ ├── guide.html
315
+ ├── guide.html.md
316
+ ├── search_index.json
317
+ ├── sitemap.xml
318
+ ├── robots.txt
319
+ ├── feed.xml
320
+ ├── llms.txt
321
+ ├── llms-full.txt
322
+ ├── manifest.json
323
+ ├── sw.js
324
+ ├── offline.html
325
+ ├── social-card.png
326
+ ├── syntax.css
327
+ └── static/
328
+ ```
329
+
330
+ `categories.json` and `versions.json` are emitted when pages declare those values. `favicon.png`, `icon-192.png`, and `icon-512.png` are emitted only when the project supplies a favicon.
331
+
332
+ ## Current limitations and roadmap
333
+
334
+ WingTip currently processes `README.md` and top-level `docs/*.md`; nested documentation trees and grouped/collapsible navigation remain roadmap work. Mermaid diagrams, broad MDX compatibility, and a theme marketplace are not yet built.
335
+
336
+ See the [roadmap and feature comparison](docs/roadmap.md) for planned work.
337
+
338
+ ---
339
+
340
+ ## License
341
+
342
+ MIT. Use freely. Modify ruthlessly.
@@ -0,0 +1,308 @@
1
+ # WingTip
2
+
3
+ **Open-source, SEO-first documentation sites from Markdown.**
4
+
5
+ ![WingTip social card](social-card.png)
6
+
7
+ [Live demo](https://semanticentity.github.io/WingTip-Static-Site-Generator) · [Migration guide](docs/migration.md) · [Source](https://github.com/semanticentity/WingTip-Static-Site-Generator) · [Roadmap](docs/roadmap.md)
8
+
9
+ WingTip turns a repository `README.md` and `docs/` directory into fast, portable static documentation. It generates crawlable HTML, search and discovery metadata, structured data, machine-readable Markdown artifacts, and an offline-capable site without requiring a hosted documentation platform.
10
+
11
+ Start with zero configuration, customize when needed, and deploy the generated files anywhere.
12
+
13
+ ---
14
+
15
+ ## Why WingTip
16
+
17
+ - **Own the output:** Build ordinary HTML, CSS, JavaScript, feeds, and metadata that can be hosted on any static file server.
18
+ - **Built for discovery:** Generate canonical URLs, robots directives, sitemap metadata, Open Graph and Twitter cards, `TechArticle` and breadcrumb JSON-LD, RSS, and hreflang alternates.
19
+ - **Built for AI retrieval:** Publish `llms.txt`, full concatenated documentation, and a Markdown alternate beside every generated page.
20
+ - **No mandatory CDN runtime:** Core styles, scripts, icons, KaTeX, and fonts are vendored into the Python package and copied into the build. External analytics remain opt-in.
21
+ - **No imposed branding:** Projects without a favicon receive no WingTip favicon, logo, or generated PWA icons.
22
+ - **Zero infrastructure:** Search, navigation, PWA support, and offline fallback work from static hosting.
23
+
24
+ ## Moving from hosted documentation?
25
+
26
+ Use the [migration guide](docs/migration.md) to assess what WingTip supports today, preserve URLs and metadata, validate generated output, and plan a safe cutover. Public repositories and sanitized reproductions can request a [structured migration review](https://github.com/semanticentity/WingTip-Static-Site-Generator/issues/new?template=migration.yml).
27
+
28
+ ## Features
29
+
30
+ ### Search, SEO, and machine-readable output
31
+
32
+ - Per-page `title`, `description`, `keywords`, canonical URL, robots/noindex, language, Open Graph, and Twitter overrides
33
+ - Automatic description fallback from the first paragraph
34
+ - `TechArticle` and `BreadcrumbList` JSON-LD
35
+ - `sitemap.xml`, `robots.txt`, RSS, `llms.txt`, and full concatenated documentation
36
+ - Raw Markdown alternates emitted as `.html.md`
37
+ - Published/updated dates with Git-based modified-date fallback
38
+ - Per-page categories and versions, plus generated `categories.json` and `versions.json`
39
+ - Per-page language and translation mappings with `hreflang` and `x-default`
40
+ - Local client-side full-text search with keyboard navigation ([details](docs/search-features.md))
41
+
42
+ ### Documentation experience
43
+
44
+ - `README.md` becomes `index.html`; top-level `docs/*.md` files become standalone pages
45
+ - Automatic sidebar, table of contents, and previous/next navigation
46
+ - GitHub “Edit this page” links
47
+ - Responsive layout with light/dark mode and screen-reader/keyboard support
48
+ - Pygments syntax highlighting and copy-to-clipboard controls
49
+ - Tables, footnotes, definition lists, attributes, admonitions, and Markdown inside HTML
50
+ - KaTeX math rendering ([examples](docs/math-examples.md))
51
+ - Configurable external-link handling and correct `.md` link rewriting, including fragments and queries
52
+ - Custom Markdown-based `404.html`
53
+
54
+ ### Performance, security, and extensibility
55
+
56
+ - Local image copying, lazy loading, intrinsic dimensions, and responsive `srcset` generation
57
+ - Locally vendored core frontend assets
58
+ - PWA manifest, service worker, precache, and offline fallback
59
+ - PWA icons generated only from a project-supplied `favicon.png`
60
+ - Optional generated or custom Content Security Policy
61
+ - Plausible, Umami, Fathom, Google Analytics, custom analytics, and global/per-page `<head>` snippets
62
+ - Plugin hooks before/after builds and conversions, plus plugin-provided Python-Markdown extensions
63
+ - Theme variables through `theme.json` and static CSS overrides ([theming guide](docs/theming.md))
64
+ - Live development server with auto-reload and scroll restoration
65
+ - Post-build auditor for missing local files, unexpected CDN references, required artifacts, and branding leaks
66
+
67
+ ---
68
+
69
+ ## Installation
70
+
71
+ Python 3.9 or newer is required.
72
+
73
+ ```bash
74
+ pip install wingtip
75
+ ```
76
+
77
+ Install the optional live server:
78
+
79
+ ```bash
80
+ pip install "wingtip[serve]"
81
+ ```
82
+
83
+ For local development from a clone:
84
+
85
+ ```bash
86
+ pip install -e ".[dev]"
87
+ ```
88
+
89
+ ## Quickstart
90
+
91
+ Create a project containing `README.md` and, optionally, a `docs/` directory:
92
+
93
+ ```text
94
+ your-project/
95
+ ├── README.md
96
+ ├── docs/
97
+ │ ├── guide.md
98
+ │ └── api.md
99
+ ├── config.json # optional
100
+ ├── theme.json # optional
101
+ └── favicon.png # optional; enables favicon and PWA icon generation
102
+ ```
103
+
104
+ Run WingTip from the project directory:
105
+
106
+ ```bash
107
+ wingtip
108
+ ```
109
+
110
+ The default output is `docs/site`. To build another source directory into a chosen destination:
111
+
112
+ ```bash
113
+ wingtip --source ./your-project --output ./build
114
+ ```
115
+
116
+ Start the live development server after building:
117
+
118
+ ```bash
119
+ wingtip --serve
120
+ ```
121
+
122
+ Use `wingtip --help` for all CLI options.
123
+
124
+ ---
125
+
126
+ ## Configuration
127
+
128
+ Configuration is optional. Without `config.json`, WingTip derives the project name from the `README.md` heading or source-directory name and uses relative URLs for local portability.
129
+
130
+ Add `config.json` when you want production URLs, repository links, analytics, security policy, or social-card customization:
131
+
132
+ ```json
133
+ {
134
+ "base_url": "https://docs.example.com",
135
+ "project_name": "Acme API",
136
+ "version": "1.0.0",
137
+ "description": "Integration documentation for the Acme API.",
138
+ "author": "Acme",
139
+ "repo_url": "https://github.com/acme/api-docs",
140
+ "og_image": "social-card.png",
141
+ "twitter_handle": "@acme",
142
+ "github": {
143
+ "repo": "acme/api-docs",
144
+ "branch": "main"
145
+ },
146
+ "analytics": {
147
+ "provider": "plausible",
148
+ "domain": "docs.example.com"
149
+ },
150
+ "csp": true,
151
+ "social_card": {
152
+ "title": "Acme API",
153
+ "tagline": "Build with Acme.",
154
+ "theme": "light",
155
+ "font": "Poppins"
156
+ }
157
+ }
158
+ ```
159
+
160
+ Place a local `favicon.png` in the project root to emit favicon/nav-logo markup and generate 192×192 and 512×512 PWA icons. If it is absent, WingTip emits none of those branded assets.
161
+
162
+ ### Per-page frontmatter
163
+
164
+ Use YAML frontmatter to control individual pages:
165
+
166
+ ```yaml
167
+ ---
168
+ title: Authentication API
169
+ description: Authenticate server-side requests to the Acme API.
170
+ keywords:
171
+ - API authentication
172
+ - OAuth
173
+ canonical: https://docs.example.com/authentication
174
+ noindex: false
175
+ author: Acme Developer Relations
176
+ date: 2026-07-16
177
+ lastmod: 2026-07-17
178
+ category: API reference
179
+ version: v2
180
+ lang: en
181
+ translations:
182
+ es: https://docs.example.com/es/authentication
183
+ og_title: Acme API authentication
184
+ twitter_description: Implement Acme API authentication.
185
+ ---
186
+ ```
187
+
188
+ Noindexed pages are excluded from the sitemap, search index, category/version indexes, and structured data.
189
+
190
+ ## Plugins and custom Markdown
191
+
192
+ Place Python modules in `plugins/`. WingTip can auto-load every module or load only names listed in the `plugins` array in `config.json`.
193
+
194
+ Plugins can expose:
195
+
196
+ - `before_build(config, output_dir)`
197
+ - `before_convert(frontmatter, markdown, input_path, output_path)`
198
+ - `after_convert(html, frontmatter, input_path, output_path)`
199
+ - `after_build(config, output_dir)`
200
+ - `markdown_extensions`, as a list or callable returning Python-Markdown extensions
201
+
202
+ Hook failures are reported as warnings so one extension does not silently stop the entire build.
203
+
204
+ ## Build auditing
205
+
206
+ The repository includes a post-build auditor used by CI:
207
+
208
+ ```bash
209
+ python audit_site.py --output docs/site --source .
210
+ ```
211
+
212
+ It exits non-zero when it finds:
213
+
214
+ - Missing local files referenced by generated HTML
215
+ - Known CDN origins for dependencies that WingTip vendors locally
216
+ - Missing required search, SEO, feed, or PWA artifacts
217
+ - Missing PWA icons when a project favicon was supplied
218
+ - Output assets byte-identical to packaged branding assets
219
+ - WingTip branding in a project whose configured name is not WingTip
220
+
221
+ CI also runs a negative fixture that deliberately injects a broken asset reference and verifies that the auditor fails.
222
+
223
+ ---
224
+
225
+ ## GitHub Pages deployment
226
+
227
+ The included GitHub Actions workflow builds and deploys on pushes to `main`. For another repository, the essential build steps are:
228
+
229
+ ```yaml
230
+ - uses: actions/setup-python@v5
231
+ with:
232
+ python-version: "3.12"
233
+ - run: pip install wingtip
234
+ - run: wingtip
235
+ - uses: actions/upload-pages-artifact@v3
236
+ with:
237
+ path: docs/site
238
+ ```
239
+
240
+ Set `base_url` to the final Pages URL so canonical, sitemap, feed, social, and alternate URLs are absolute in production.
241
+
242
+ ---
243
+
244
+ ## Social cards
245
+
246
+ WingTip generates `social-card.png` during a build. Force regeneration after changing card settings:
247
+
248
+ ```bash
249
+ wingtip --regen-card
250
+ ```
251
+
252
+ The `social_card` object supports title, tagline, light/dark style, font, and an optional logo. Per-page `og_image` and `twitter_image` frontmatter can override the site image.
253
+
254
+ ---
255
+
256
+ ## Custom 404 page
257
+
258
+ Create `404.md` in the project root. WingTip converts it to `404.html` with the same Markdown processing and site template as other pages:
259
+
260
+ ```markdown
261
+ ---
262
+ permalink: /404.html
263
+ noindex: true
264
+ ---
265
+
266
+ # Page not found
267
+
268
+ The requested documentation page does not exist.
269
+ ```
270
+
271
+ ---
272
+
273
+ ## Generated output
274
+
275
+ A normal build includes:
276
+
277
+ ```text
278
+ docs/site/
279
+ ├── index.html
280
+ ├── guide.html
281
+ ├── guide.html.md
282
+ ├── search_index.json
283
+ ├── sitemap.xml
284
+ ├── robots.txt
285
+ ├── feed.xml
286
+ ├── llms.txt
287
+ ├── llms-full.txt
288
+ ├── manifest.json
289
+ ├── sw.js
290
+ ├── offline.html
291
+ ├── social-card.png
292
+ ├── syntax.css
293
+ └── static/
294
+ ```
295
+
296
+ `categories.json` and `versions.json` are emitted when pages declare those values. `favicon.png`, `icon-192.png`, and `icon-512.png` are emitted only when the project supplies a favicon.
297
+
298
+ ## Current limitations and roadmap
299
+
300
+ WingTip currently processes `README.md` and top-level `docs/*.md`; nested documentation trees and grouped/collapsible navigation remain roadmap work. Mermaid diagrams, broad MDX compatibility, and a theme marketplace are not yet built.
301
+
302
+ See the [roadmap and feature comparison](docs/roadmap.md) for planned work.
303
+
304
+ ---
305
+
306
+ ## License
307
+
308
+ MIT. Use freely. Modify ruthlessly.