docs(mdbook-htmx): book.json / manifest.json
@aRustyDev ya está trabajando en esto.
Desde el 5/1/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Manifest Reference
This document provides a complete reference for the manifest.json file generated by mdbook-htmx.
Overview
The manifest is a JSON file that describes all pages, their metadata, navigation structure, and authorization requirements. It serves as the contract between the build-time generator and runtime server.
{
"$schema": "https://schemas.arusty.dev/mdbook-htmx/manifest.schema.json",
"version": "1.0.0",
"generated": "2026-01-04T12:00:00Z",
"book": { ... },
"pages": [ ... ],
"navigation": { ... }
}
Schema Reference
Manifests are validated against the JSON Schema at:
https://schemas.arusty.dev/mdbook-htmx/manifest.schema.json
Top-Level Fields
| Field | Type | Required | Description |
|---|---|---|---|
$schema |
string | No | JSON Schema URL for validation |
version |
string | Yes | Manifest schema version (semver) |
generated |
string | Yes | ISO 8601 build timestamp |
book |
object | Yes | Book-level metadata |
pages |
array | Yes | Array of page entries |
navigation |
object | Yes | Navigation structure |
authn |
object | No | Authentication configuration |
scopes |
object | No | Scope configuration |
Version Field
The version field uses semantic versioning:
{
"version": "1.0.0"
}
| Version Part | When to Increment |
|---|---|
| Major | Breaking changes to manifest structure |
| Minor | New optional fields added |
| Patch | Bug fixes, documentation updates |
Server implementations should:
- Parse the major version
- Reject manifests with unsupported major versions
- Ignore unknown fields for forward compatibility
Book Metadata (book)
| Field | Type | Description |
|---|---|---|
title |
string | Book title |
description |
string | Book description |
authors |
string[] | Author names |
language |
string | Language code (e.g., "en") |
baseUrl |
string | Base URL for the documentation |
Example
{
"book": {
"title": "My Documentation",
"description": "Complete reference for My Project",
"authors": ["John Doe", "Jane Smith"],
"language": "en",
"baseUrl": "/docs"
}
}
Pages Array (pages)
Each page entry contains:
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Unique page identifier |
path |
string | Yes | URL path |
title |
string | Yes | Page title |
file |
string | Yes | Path to full HTML file |
fragment |
string | No | Path to fragment (content only) |
section |
string | No | Parent section name |
auth |
object | No | Authorization requirements |
htmx |
object | No | HTMX behavior configuration |
search |
object | No | Search index metadata |
scopes |
string[] | No | Audience scopes |
lastModified |
string | No | ISO 8601 last modified date |
Page Example
{
"pages": [
{
"id": "getting-started",
"path": "/docs/getting-started",
"title": "Getting Started",
"file": "pages/getting-started.html",
"fragment": "fragments/getting-started.html",
"section": "Introduction",
"auth": {
"access": "public"
},
"htmx": {
"preload": true,
"cache": 3600
},
"search": {
"indexed": true,
"weight": 2.0
},
"scopes": ["all", "developers"],
"lastModified": "2026-01-04T10:30:00Z"
}
]
}
Page Auth Object
| Field | Type | Default | Description |
|---|---|---|---|
access |
enum | "public" |
Access level |
roles |
string[] | [] |
Required roles |
fallback |
string | /auth/access-denied |
Unauthorized redirect |
Page HTMX Object
| Field | Type | Default | Description |
|---|---|---|---|
lazy |
boolean | false |
Lazy load content |
preload |
boolean | false |
Preload on hover |
cache |
integer | 0 |
Cache-Control max-age |
swap |
string | "innerHTML" |
Swap strategy |
Page Search Object
| Field | Type | Default | Description |
|---|---|---|---|
indexed |
boolean | true |
Include in search |
weight |
number | 1.0 |
Ranking weight |
keywords |
string[] | [] |
Additional keywords |
excerpt |
string | (auto) | Search result excerpt |
Navigation (navigation)
| Field | Type | Description |
|---|---|---|
chapters |
array | Hierarchical chapter structure |
flat |
array | Flat list of all pages |
Chapters Structure
{
"navigation": {
"chapters": [
{
"title": "Introduction",
"path": "/docs",
"children": [
{
"title": "Getting Started",
"path": "/docs/getting-started",
"children": []
},
{
"title": "Installation",
"path": "/docs/installation",
"children": []
}
]
}
]
}
}
Flat List
{
"navigation": {
"flat": [
{ "path": "/docs", "title": "Introduction" },
{ "path": "/docs/getting-started", "title": "Getting Started" },
{ "path": "/docs/installation", "title": "Installation" }
]
}
}
Authentication Configuration (authn)
Optional authentication metadata for server reference.
| Field | Type | Description |
|---|---|---|
enabled |
boolean | Whether auth is enabled |
signinPage |
string | Path to sign-in page |
signinPartial |
string | Path to sign-in partial |
signoutPage |
string | Path to sign-out page |
provider |
string | Auth provider hint |
Example
{
"authn": {
"enabled": true,
"signinPage": "/auth/signin",
"signinPartial": "partials/signin.html",
"signoutPage": "/auth/signout",
"provider": "jwt"
}
}
Scope Configuration (scopes)
| Field | Type | Description |
|---|---|---|
enabled |
boolean | Whether scopes are enabled |
available |
string[] | List of available scopes |
default |
string | Default scope |
globalScopes |
string[] | Scopes in main index |
Example
{
"scopes": {
"enabled": true,
"available": ["all", "developers", "managers", "sre"],
"default": "all",
"globalScopes": ["all"]
}
}
Scope-Filtered Manifests
When scopes are enabled, mdbook-htmx generates filtered manifests:
manifest.json # Full manifest (all pages)
manifest.developers.json # Only pages with 'developers' scope
manifest.managers.json # Only pages with 'managers' scope
manifest.sre.json # Only pages with 'sre' scope
Each filtered manifest:
- Contains only pages matching the scope
- Has
scopefield set to the filter scope - Includes filtered navigation structure
Complete Example
{
"$schema": "https://schemas.arusty.dev/mdbook-htmx/manifest.schema.json",
"version": "1.0.0",
"generated": "2026-01-04T12:00:00Z",
"book": {
"title": "Platform Documentation",
"description": "Complete platform reference",
"authors": ["Platform Team"],
"language": "en",
"baseUrl": "/docs"
},
"pages": [
{
"id": "index",
"path": "/docs",
"title": "Introduction",
"file": "pages/index.html",
"fragment": "fragments/index.html",
"auth": { "access": "public" },
"scopes": ["all"]
},
{
"id": "api-reference",
"path": "/docs/api",
"title": "API Reference",
"file": "pages/api.html",
"fragment": "fragments/api.html",
"section": "Developer Guide",
"auth": {
"access": "roles",
"roles": ["developer", "admin"]
},
"scopes": ["developers"]
}
],
"navigation": {
"chapters": [
{
"title": "Introduction",
"path": "/docs",
"children": []
},
{
"title": "Developer Guide",
"path": "/docs/dev",
"children": [
{
"title": "API Reference",
"path": "/docs/api",
"children": []
}
]
}
],
"flat": [
{ "path": "/docs", "title": "Introduction" },
{ "path": "/docs/api", "title": "API Reference" }
]
},
"authn": {
"enabled": true,
"signinPage": "/auth/signin",
"provider": "jwt"
},
"scopes": {
"enabled": true,
"available": ["all", "developers", "managers"],
"default": "all"
}
}
Server Usage
Loading the Manifest
import manifest from './manifest.json';
// Type-safe access
interface Manifest {
version: string;
pages: Page[];
navigation: Navigation;
}
const m: Manifest = manifest;
Finding a Page
function findPage(path: string): Page | undefined {
return manifest.pages.find(p => p.path === path);
}
Checking Authorization
function canAccess(page: Page, user: User): boolean {
if (page.auth.access === 'public') return true;
if (page.auth.access === 'authenticated') return !!user;
if (page.auth.access === 'roles') {
return page.auth.roles.some(role => user.hasRole(role));
}
return false;
}
Version Checking
function isCompatible(manifest: Manifest): boolean {
const [major] = manifest.version.split('.');
return parseInt(major) === 1; // Server supports v1.x.x
}
Related Documentation
- Lenguaje dominante
- Rust
- Estrellas
- 0
- Forks
- 1
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aRustyDev/mdbook-htmx
-
feat(ci): Implement cross-repo-validate compliance for docs syncQuizá libre de nuevo @aRustyDev la tomó hace 288 días y no hay ningún pull request abierto. Abiertoci enhancement
aRustyDev/mdbook-htmx#58 · 1 comentario · 1 asignado ·
-
docs(htmx): Explain how HTMX worksQuizá libre de nuevo @aRustyDev la tomó hace 290 días y no hay ningún pull request abierto. Abierto
aRustyDev/mdbook-htmx#48 · 3 comentarios · 1 asignado ·
-
docs(mdbook-htmx): Parent Issue for documentationQuizá libre de nuevo @aRustyDev la tomó hace 290 días y no hay ningún pull request abierto. Abiertodocumentation
aRustyDev/mdbook-htmx#47 · 1 asignado ·
-
docs(examples): Secure Self-Hosted Meilisearch via CloudflareQuizá libre de nuevo @aRustyDev la tomó hace 290 días y no hay ningún pull request abierto. Abiertodocumentation
aRustyDev/mdbook-htmx#46 · 1 asignado ·
-
docs(examples): Kubernetes with MeilisearchQuizá libre de nuevo @aRustyDev la tomó hace 290 días y no hay ningún pull request abierto. Abiertodocumentation
aRustyDev/mdbook-htmx#45 · 1 asignado ·
Todos los issues de aRustyDev/mdbook-htmx
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
foxglove/mcap#1907 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
good first issue help wanted r-feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
servo/rust-smallvec#792 ·
Los mantenedores suelen responder en 1 día
-
A-Unicode C-bug P-low
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
rust-lang/rustfmt#7210 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
callTracer with withLog: true includes logs from a reverted top-level call (diverges from geth)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
paradigmxyz/revm-inspectors#570 ·
Los mantenedores suelen responder en 1 día