fr-docs 2.2.0__tar.gz → 2.3.0__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 (26) hide show
  1. {fr_docs-2.2.0 → fr_docs-2.3.0}/PKG-INFO +30 -1
  2. {fr_docs-2.2.0 → fr_docs-2.3.0}/README.md +29 -0
  3. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/__main__.py +13 -2
  4. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/build.py +2 -4
  5. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/html_pipeline.py +3 -5
  6. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs.egg-info/PKG-INFO +30 -1
  7. {fr_docs-2.2.0 → fr_docs-2.3.0}/pyproject.toml +1 -1
  8. {fr_docs-2.2.0 → fr_docs-2.3.0}/LICENSE.md +0 -0
  9. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/__init__.py +0 -0
  10. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/config.py +0 -0
  11. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/config_accessors.py +0 -0
  12. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/frontmatter.py +0 -0
  13. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/git.py +0 -0
  14. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/init.py +0 -0
  15. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/markdown.py +0 -0
  16. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/search.py +0 -0
  17. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/slug.py +0 -0
  18. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/syntax.py +0 -0
  19. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/template.py +0 -0
  20. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs/utils.py +0 -0
  21. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs.egg-info/SOURCES.txt +0 -0
  22. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs.egg-info/dependency_links.txt +0 -0
  23. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs.egg-info/entry_points.txt +0 -0
  24. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs.egg-info/requires.txt +0 -0
  25. {fr_docs-2.2.0 → fr_docs-2.3.0}/fr_docs.egg-info/top_level.txt +0 -0
  26. {fr_docs-2.2.0 → fr_docs-2.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fr-docs
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: Fast static documentation generator with search, versioning, and zero-config setup
5
5
  Author: Omena0
6
6
  License: # PolyForm Noncommercial License 1.0.0
@@ -175,6 +175,7 @@ Generate fast, fully featured, modern documentation pages from markdown for GitH
175
175
  - [Quickstart](https://omena0.dev/fr-docs/quickstart)
176
176
  - [Configuration](https://omena0.dev/fr-docs/config.json)
177
177
  - [Showcase](https://omena0.dev/fr-docs/showcase)
178
+ - [Pagespeed](https://omena0.dev/fr-docs/pagespeed) — performance metrics
178
179
 
179
180
  ## Overview
180
181
 
@@ -183,12 +184,40 @@ Fr-docs is a generic, configurable documentation builder for Python projects. It
183
184
  ### Key Features
184
185
 
185
186
  - **Config-driven**: All settings defined in `config.json`
187
+ - Project name, URL, description, and sidebar structure
188
+ - Search, code references, auto-linking, and related pages
189
+ - Build options: workers, minification, zstd level, and HTML optimization
190
+
186
191
  - **Zero-config setup**: Works out of the box with sensible defaults
187
192
  - **Search**: Full-text search with Zstandard-compressed index
193
+ - Symbol-level search across all source files
194
+ - File index for browsing source code
195
+ - Per-file source highlights with caching
196
+
188
197
  - **Optimized**: HTML minification, critical CSS/JS inlining, Zstd compression
198
+ - Critical CSS extracted and inlined for both mobile and desktop viewports
199
+ - JavaScript and CSS minified with `terser` and `html-minifier-next`
200
+ - Zstd-compressed search index, source files, highlights, and metadata
201
+ - Adaptive zstd level selection (scans 1..configured, picks the smallest)
202
+
189
203
  - **Multi-environment**: Different configs for production, staging, development
190
204
  - **Parallel builds**: Threaded page generation for faster builds
191
205
  - **Git integration**: Automatic metadata extraction from git commits
206
+ - Version options derived from commit messages (e.g. `4D - fix bug` → `4.4.0`)
207
+ - Commit SHA and message embedded in the version selector
208
+
209
+ - **Local font serving**: Fonts downloaded at build time and served from the site's own origin
210
+ - No third-party font round-trips or 404s when Google changes the URL scheme
211
+ - `font-display: swap` with metric-compatible `font-ascent-descent` fallbacks
212
+ - Primary body font weight preloaded for faster first paint
213
+
214
+ - **Sidebar**: Collapsible sections with auto-expansion
215
+ - The section containing the current page is expanded on load
216
+ - Single-page sections and single-section sites are expanded by default
217
+
218
+ - **Inline copy commands**: Prefix inline code with `c` to create copy-on-click links
219
+ - **Code references**: Auto-link bare filename references to their source files
220
+ - **Backlinks and related pages**: Automatically generated navigation between related content
192
221
 
193
222
  ### Projects that use fr-docs
194
223
 
@@ -15,6 +15,7 @@ Generate fast, fully featured, modern documentation pages from markdown for GitH
15
15
  - [Quickstart](https://omena0.dev/fr-docs/quickstart)
16
16
  - [Configuration](https://omena0.dev/fr-docs/config.json)
17
17
  - [Showcase](https://omena0.dev/fr-docs/showcase)
18
+ - [Pagespeed](https://omena0.dev/fr-docs/pagespeed) — performance metrics
18
19
 
19
20
  ## Overview
20
21
 
@@ -23,12 +24,40 @@ Fr-docs is a generic, configurable documentation builder for Python projects. It
23
24
  ### Key Features
24
25
 
25
26
  - **Config-driven**: All settings defined in `config.json`
27
+ - Project name, URL, description, and sidebar structure
28
+ - Search, code references, auto-linking, and related pages
29
+ - Build options: workers, minification, zstd level, and HTML optimization
30
+
26
31
  - **Zero-config setup**: Works out of the box with sensible defaults
27
32
  - **Search**: Full-text search with Zstandard-compressed index
33
+ - Symbol-level search across all source files
34
+ - File index for browsing source code
35
+ - Per-file source highlights with caching
36
+
28
37
  - **Optimized**: HTML minification, critical CSS/JS inlining, Zstd compression
38
+ - Critical CSS extracted and inlined for both mobile and desktop viewports
39
+ - JavaScript and CSS minified with `terser` and `html-minifier-next`
40
+ - Zstd-compressed search index, source files, highlights, and metadata
41
+ - Adaptive zstd level selection (scans 1..configured, picks the smallest)
42
+
29
43
  - **Multi-environment**: Different configs for production, staging, development
30
44
  - **Parallel builds**: Threaded page generation for faster builds
31
45
  - **Git integration**: Automatic metadata extraction from git commits
46
+ - Version options derived from commit messages (e.g. `4D - fix bug` → `4.4.0`)
47
+ - Commit SHA and message embedded in the version selector
48
+
49
+ - **Local font serving**: Fonts downloaded at build time and served from the site's own origin
50
+ - No third-party font round-trips or 404s when Google changes the URL scheme
51
+ - `font-display: swap` with metric-compatible `font-ascent-descent` fallbacks
52
+ - Primary body font weight preloaded for faster first paint
53
+
54
+ - **Sidebar**: Collapsible sections with auto-expansion
55
+ - The section containing the current page is expanded on load
56
+ - Single-page sections and single-section sites are expanded by default
57
+
58
+ - **Inline copy commands**: Prefix inline code with `c` to create copy-on-click links
59
+ - **Code references**: Auto-link bare filename references to their source files
60
+ - **Backlinks and related pages**: Automatically generated navigation between related content
32
61
 
33
62
  ### Projects that use fr-docs
34
63
 
@@ -1,8 +1,8 @@
1
1
  """Entry point for fr-docs CLI.
2
2
 
3
3
  Usage:
4
- python -m fr_docs build [--production] [--config CONFIG]
5
- fr-docs build [--production] [--config CONFIG]
4
+ python -m fr_docs build [--production] [--symlink] [--config CONFIG]
5
+ fr-docs build [--production] [--symlink] [--config CONFIG]
6
6
  python -m fr_docs init [--dir DIR]
7
7
  fr-docs init [--dir DIR]
8
8
  """
@@ -27,6 +27,14 @@ def main():
27
27
  action="store_true",
28
28
  help="Rewrite internal links to site-root absolute paths for deployed docs.",
29
29
  )
30
+ build_parser.add_argument(
31
+ "--symlink",
32
+ action="store_true",
33
+ help="Create a {site_prefix}/ symlink dir under site/ so a local "
34
+ "production build can be opened in a browser. Off by default: in "
35
+ "CI the whole docs/site/ tree is deployed as-is, and a nested "
36
+ "fr-docs/ symlink folder would show up as omena0.dev/fr-docs/fr-docs/.",
37
+ )
30
38
  build_parser.add_argument(
31
39
  "--config",
32
40
  help="Path to the configuration JSON file.",
@@ -51,6 +59,8 @@ def main():
51
59
  build_argv = []
52
60
  if args.production:
53
61
  build_argv.append("--production")
62
+ if args.symlink:
63
+ build_argv.append("--symlink")
54
64
  if args.config:
55
65
  build_argv.extend(["--config", args.config])
56
66
  build_main(build_argv)
@@ -60,6 +70,7 @@ def main():
60
70
  # Default to build for backwards compatibility
61
71
  if len(sys.argv) > 1 and sys.argv[1] in (
62
72
  "--production",
73
+ "--symlink",
63
74
  "--config",
64
75
  "--help",
65
76
  "-h",
@@ -617,7 +617,7 @@ def main(argv=None):
617
617
  except Exception as e: # noqa: BLE001
618
618
  print(f" ✗ Minification failed: {e}")
619
619
 
620
- # Create a {site_prefix}/ directory under site/ and symlink every
620
+ # Create a {site_prefix}/ directory under site/ and symlink every
621
621
  # file into it, so a production build works locally (the HTML
622
622
  # references absolute paths like /fr-docs/style.css). Without
623
623
  # this, running `python -m fr_docs build --production` and then
@@ -636,9 +636,7 @@ def main(argv=None):
636
636
  for f in sorted(Path(config["_out_dir"]).iterdir()):
637
637
  if f.is_file() and not f.name.startswith("."):
638
638
  (prefix_dir / f.name).symlink_to(f.resolve())
639
- print(
640
- f" ✓ Symlinked {len(list(prefix_dir.iterdir()))} files into {prefix}/"
641
- )
639
+ print(f" ✓ Symlinked {len(list(prefix_dir.iterdir()))} files into {prefix}/")
642
640
  except OSError as e:
643
641
  print(f" ✗ Failed to create {prefix}/ symlinks: {e}")
644
642
 
@@ -354,9 +354,7 @@ def optimize_all_pages(config):
354
354
  # paths first, run critical, then restore the absolute paths in
355
355
  # the inlined output.
356
356
  site_prefix = normalized_site_prefix(config)
357
- stripped_prefix = (
358
- site_prefix.rstrip("/") if site_prefix and site_prefix != "/" else None
359
- )
357
+ stripped_prefix = site_prefix.rstrip("/") if site_prefix and site_prefix != "/" else None
360
358
  backed_up = []
361
359
 
362
360
  try:
@@ -375,7 +373,7 @@ def optimize_all_pages(config):
375
373
  # Strip the site prefix so href=/fr-docs/style.css
376
374
  # becomes href=style.css (relative to the HTML file).
377
375
  rewritten = prefix_pat.sub(
378
- lambda m: f"href={m.group(1)}{m.group(2)}{m.group(1)}",
376
+ lambda m: f'href={m.group(1)}{m.group(2)}{m.group(1)}',
379
377
  raw,
380
378
  )
381
379
  html_file.write_text(rewritten, encoding="utf-8")
@@ -487,7 +485,7 @@ def add_internal_prefetch_links(html_text, config):
487
485
  def _repl(m):
488
486
  attrs = m.group("attrs")
489
487
  # Skip links that already declare a rel attribute
490
- if re.search(r"\brel\s*=", attrs, re.IGNORECASE):
488
+ if re.search(r'\brel\s*=', attrs, re.IGNORECASE):
491
489
  return m.group(0)
492
490
  hm = href_re.search(attrs)
493
491
  if not hm:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fr-docs
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: Fast static documentation generator with search, versioning, and zero-config setup
5
5
  Author: Omena0
6
6
  License: # PolyForm Noncommercial License 1.0.0
@@ -175,6 +175,7 @@ Generate fast, fully featured, modern documentation pages from markdown for GitH
175
175
  - [Quickstart](https://omena0.dev/fr-docs/quickstart)
176
176
  - [Configuration](https://omena0.dev/fr-docs/config.json)
177
177
  - [Showcase](https://omena0.dev/fr-docs/showcase)
178
+ - [Pagespeed](https://omena0.dev/fr-docs/pagespeed) — performance metrics
178
179
 
179
180
  ## Overview
180
181
 
@@ -183,12 +184,40 @@ Fr-docs is a generic, configurable documentation builder for Python projects. It
183
184
  ### Key Features
184
185
 
185
186
  - **Config-driven**: All settings defined in `config.json`
187
+ - Project name, URL, description, and sidebar structure
188
+ - Search, code references, auto-linking, and related pages
189
+ - Build options: workers, minification, zstd level, and HTML optimization
190
+
186
191
  - **Zero-config setup**: Works out of the box with sensible defaults
187
192
  - **Search**: Full-text search with Zstandard-compressed index
193
+ - Symbol-level search across all source files
194
+ - File index for browsing source code
195
+ - Per-file source highlights with caching
196
+
188
197
  - **Optimized**: HTML minification, critical CSS/JS inlining, Zstd compression
198
+ - Critical CSS extracted and inlined for both mobile and desktop viewports
199
+ - JavaScript and CSS minified with `terser` and `html-minifier-next`
200
+ - Zstd-compressed search index, source files, highlights, and metadata
201
+ - Adaptive zstd level selection (scans 1..configured, picks the smallest)
202
+
189
203
  - **Multi-environment**: Different configs for production, staging, development
190
204
  - **Parallel builds**: Threaded page generation for faster builds
191
205
  - **Git integration**: Automatic metadata extraction from git commits
206
+ - Version options derived from commit messages (e.g. `4D - fix bug` → `4.4.0`)
207
+ - Commit SHA and message embedded in the version selector
208
+
209
+ - **Local font serving**: Fonts downloaded at build time and served from the site's own origin
210
+ - No third-party font round-trips or 404s when Google changes the URL scheme
211
+ - `font-display: swap` with metric-compatible `font-ascent-descent` fallbacks
212
+ - Primary body font weight preloaded for faster first paint
213
+
214
+ - **Sidebar**: Collapsible sections with auto-expansion
215
+ - The section containing the current page is expanded on load
216
+ - Single-page sections and single-section sites are expanded by default
217
+
218
+ - **Inline copy commands**: Prefix inline code with `c` to create copy-on-click links
219
+ - **Code references**: Auto-link bare filename references to their source files
220
+ - **Backlinks and related pages**: Automatically generated navigation between related content
192
221
 
193
222
  ### Projects that use fr-docs
194
223
 
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "fr-docs"
9
- version = "2.2.0"
9
+ version = "2.3.0"
10
10
  description = "Fast static documentation generator with search, versioning, and zero-config setup"
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.14"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes