Commit
Message
Changed Files (7)
-
modified abbaye.schema.json
diff --git a/abbaye.schema.json b/abbaye.schema.json index 35c2240..50875eb 100644 --- a/abbaye.schema.json +++ b/abbaye.schema.json @@ -377,7 +377,7 @@ "type": "object", "properties": { "input": { - "description": "Directory containing `.md` files to render.\n\nEvery `.md` file in the directory is rendered to a corresponding\n`.html` file in the output directory, preserving the subdirectory\nstructure. Non-Markdown files referenced (linked or embedded) inside\nany Markdown source — images, PDFs, downloadable assets, etc. — are\ncopied into the output directory next to the rendered HTML so that all\nrelative URLs remain valid.\n\nDefaults to `\".\"` (the current working directory).", + "description": "Directory containing `.md` files to render.\n\nEvery `.md` file in the directory is rendered to a corresponding\n`.html` file in the output directory, preserving the subdirectory\nstructure. Non-Markdown files referenced (linked or embedded) inside\nany Markdown source - images, PDFs, downloadable assets, etc. - are\ncopied into the output directory next to the rendered HTML so that all\nrelative URLs remain valid.\n\nDefaults to `\".\"` (the current working directory).", "type": [ "string", "null" -
modified logo.svg
diff --git a/logo.svg b/logo.svg index f70522f..d8b0d5a 100644 --- a/logo.svg +++ b/logo.svg @@ -29,7 +29,7 @@ <!-- ── Central nave ── --> <rect x="64" y="88" width="72" height="92" fill="#f0e6c8" /> - <!-- ── Left arched window — cherry-blossom pink ── + <!-- ── Left arched window - cherry-blossom pink ── Arc: (30,82)→(54,82), r=12, sweep=1 → clockwise → arch over top --> <path d="M30,108 L30,82 A12,12 0 0,1 54,82 L54,108 Z" fill="#f9adc5" /> -
modified src/builders/markdown.rs
diff --git a/src/builders/markdown.rs b/src/builders/markdown.rs index 94f9fac..9579b08 100644 --- a/src/builders/markdown.rs +++ b/src/builders/markdown.rs @@ -15,8 +15,8 @@ use crate::builders::{ArtifactPath, Builder, LogEvent, LogSender}; /// dump-theme` can write it to `.abbaye/theme/markdown.html.j2`. /// /// Template variables: -/// - `{{ title }}` — plain-text page title (auto-escaped by Tera). -/// - `{{ content | safe }}` — the rendered HTML body fragment. +/// - `{{ title }}` - plain-text page title (auto-escaped by Tera). +/// - `{{ content | safe }}` - the rendered HTML body fragment. pub const TEMPLATE_MARKDOWN: &str = include_str!("../templates/markdown.html.j2"); /// Filename looked up inside `.abbaye/theme/` at runtime. @@ -36,7 +36,7 @@ pub struct MarkdownBuilderConfig { /// Every `.md` file in the directory is rendered to a corresponding /// `.html` file in the output directory, preserving the subdirectory /// structure. Non-Markdown files referenced (linked or embedded) inside - /// any Markdown source — images, PDFs, downloadable assets, etc. — are + /// any Markdown source - images, PDFs, downloadable assets, etc. - are /// copied into the output directory next to the rendered HTML so that all /// relative URLs remain valid. /// @@ -124,7 +124,7 @@ impl Builder for MarkdownBuilder { /// /// Checks whether `.abbaye/theme/markdown.html.j2` exists and loads that /// file when present; otherwise falls back to the compiled-in -/// [`TEMPLATE_MARKDOWN`] constant — exactly the same override mechanism +/// [`TEMPLATE_MARKDOWN`] constant - exactly the same override mechanism /// used by the site templates (`root_index.html.j2` / `version_index.html.j2`). fn load_tera() -> Result<Tera> { let theme_path = PathBuf::from(".abbaye").join("theme"); @@ -281,7 +281,7 @@ fn collect_md_files(dir: &Path, recursive: bool) -> Result<Vec<PathBuf>> { /// /// Skipped silently: /// - Remote URLs (`://`), data URIs, and fragment-only refs (`#…`). -/// - `.md` files — those are rendered to `.html`, not copied. +/// - `.md` files - those are rendered to `.html`, not copied. /// - Refs that do not resolve to an existing file. /// - Refs that resolve to a file outside `input_dir` (a warning is logged /// to the caller instead). @@ -311,7 +311,7 @@ fn collect_referenced_files(md: &str, md_path: &Path, input_dir: &Path) -> Vec<( continue; } - // Skip links to other Markdown files — those will be rendered to + // Skip links to other Markdown files - those will be rendered to // .html and don't need to be copied as assets. if Path::new(path_part).extension().and_then(|e| e.to_str()) == Some("md") { continue; @@ -351,7 +351,7 @@ fn collect_referenced_files(md: &str, md_path: &Path, input_dir: &Path) -> Vec<( /// Convert a Markdown string to an HTML fragment. /// -/// Enables tables, strikethrough, and footnotes — a superset of what +/// Enables tables, strikethrough, and footnotes - a superset of what /// [`crate::site`]'s own renderer uses. fn render_markdown(md: &str) -> String { let opts = Options::ENABLE_TABLES | Options::ENABLE_STRIKETHROUGH | Options::ENABLE_FOOTNOTES; -
modified src/builders/mod.rs
diff --git a/src/builders/mod.rs b/src/builders/mod.rs index 343444e..49f4228 100644 --- a/src/builders/mod.rs +++ b/src/builders/mod.rs @@ -19,7 +19,7 @@ //! Every `[[builders]]` entry is executed as an independent Tokio async task. //! Tasks are launched at the same time (via a shared `JoinSet`) and may //! therefore run fully concurrently. When a builder declares `depends_on`, -//! its task simply waits — without blocking any thread — until all named +//! its task simply waits - without blocking any thread - until all named //! prerequisites have completed successfully before invoking the underlying //! build logic. //! @@ -64,22 +64,22 @@ //! //! The entire builder pipeline lives inside `build_site`, in three phases. //! -//! ### Phase 1 — Validation +//! ### Phase 1 - Validation //! //! Before any task is spawned, two checks are performed: //! -//! 1. **Reference check** — every string in `depends_on` must match an `id` +//! 1. **Reference check** - every string in `depends_on` must match an `id` //! of some other builder in the same config. Unknown IDs are reported as a //! hard error immediately. //! -//! 2. **Cycle detection** — a depth-first search visits the dependency graph +//! 2. **Cycle detection** - a depth-first search visits the dependency graph //! and returns an error if a cycle is found. //! //! The DFS tracks three states per node: `0 = unvisited`, `1 = in the current //! stack`, `2 = fully processed`. Encountering a node in state `1` means //! there is a back-edge, i.e. a cycle. //! -//! ### Phase 2 — Completion channels +//! ### Phase 2 - Completion channels //! //! For each builder that carries an `id`, a `tokio::sync::watch` channel is //! created: @@ -99,7 +99,7 @@ //! (e.g. the task panicked), `wait_for` returns an `Err`, which is treated as //! a failure and the dependent is skipped. //! -//! ### Phase 3 — Task spawning and collection +//! ### Phase 3 - Task spawning and collection //! //! All tasks are submitted to a single `tokio::task::JoinSet`. Every task //! follows the same lifecycle: @@ -145,7 +145,7 @@ //! ## Inner Parallelism: `CargoBuilder` //! //! When a `cargo` builder lists multiple `targets`, it spawns one Tokio task -//! per target inside its own inner `JoinSet` — a second level of concurrency +//! per target inside its own inner `JoinSet` - a second level of concurrency //! nested inside the outer builder task. //! //! Each inner task: @@ -406,7 +406,7 @@ pub struct ArtifactPath { /// src/builders/make.rs /// ``` /// -/// ## Step 1 — Create the builder file +/// ## Step 1 - Create the builder file /// /// Create `src/builders/make.rs`. Start with imports that mirror what the /// existing builders use: @@ -428,9 +428,9 @@ pub struct ArtifactPath { /// | `ArtifactPath` | The return type: a path plus display name and optional hash. | /// | `Builder` | The trait your struct must implement. | /// | `LogEvent` | The structured event type sent over the log channel. | -/// | `LogSender` | An `mpsc::UnboundedSender<LogEvent>` — your handle to the UI. | +/// | `LogSender` | An `mpsc::UnboundedSender<LogEvent>` - your handle to the UI. | /// -/// ## Step 2 — Write the config struct +/// ## Step 2 - Write the config struct /// /// The config struct holds every field that can appear in the TOML table. /// It must derive exactly these traits (all are required for the builder @@ -461,7 +461,7 @@ pub struct ArtifactPath { /// | `Serialize` | Needed for `abbaye init` and JSON Schema generation. | /// | `JsonSchema` | Powers `abbaye dump-schema` so editors get completion/validation. | /// -/// Every public field should have a doc comment — these become the field +/// Every public field should have a doc comment - these become the field /// descriptions in the generated JSON Schema and appear in editor tooltips. /// /// If `Default` cannot be derived because a field has a non-false/zero/empty @@ -470,7 +470,7 @@ pub struct ArtifactPath { /// `#[serde(default = "...")]` attribute. See [`crate::builders::cargo`] for /// an example. /// -/// ## Step 3 — Implement the `Builder` trait +/// ## Step 3 - Implement the `Builder` trait /// /// Define a zero-sized marker struct and implement [`Builder`] for it: /// @@ -567,7 +567,7 @@ pub struct ArtifactPath { /// to block forever before it can exit. /// /// **Errors from `log.send(…)` are silently ignored** (`let _ = …`). The -/// receiver may already be gone by the time a builder finishes — that is +/// receiver may already be gone by the time a builder finishes - that is /// expected and harmless. /// /// **File artifacts → `dist/`, directory artifacts → `docs/`.** The @@ -577,23 +577,23 @@ pub struct ArtifactPath { /// **CPU-bound or blocking I/O must use `spawn_blocking`.** Tokio runs on a /// small thread pool; blocking it starves other tasks. /// -/// ## Step 4 — Register in `mod.rs` +/// ## Step 4 - Register in `mod.rs` /// /// Open `src/builders/mod.rs` and make four additions. /// -/// **4a — Declare the module:** +/// **4a - Declare the module:** /// /// ```rust,ignore /// pub mod make; /// ``` /// -/// **4b — Import the types:** +/// **4b - Import the types:** /// /// ```rust,ignore /// use make::{MakeBuilder, MakeBuilderConfig}; /// ``` /// -/// **4c — Add a variant to [`AnyBuilder`]** with a doc comment containing a +/// **4c - Add a variant to [`AnyBuilder`]** with a doc comment containing a /// canonical TOML usage example (this becomes the JSON Schema description): /// /// ```rust,ignore @@ -612,7 +612,7 @@ pub struct ArtifactPath { /// becomes `type = "make"` in TOML. Multi-word names use `CamelCase` in /// Rust and become `snake_case` in TOML (e.g. `WasmPack` → `wasm_pack`). /// -/// **4d — Wire up `label()` and `build()`:** +/// **4d - Wire up `label()` and `build()`:** /// /// ```rust,ignore /// Self::Make(_) => "make", // in label() @@ -622,14 +622,14 @@ pub struct ArtifactPath { /// `label()` provides the default spinner prefix when the user hasn't given /// the builder an `id`. Keep it short and lowercase-kebab. /// -/// ## Step 5 — Verify +/// ## Step 5 - Verify /// /// ```sh /// cargo build /// cargo run -- dump-schema | python3 -m json.tool | grep -A 20 '"make"' /// ``` /// -/// ## Step 6 — Use it in `abbaye.toml` +/// ## Step 6 - Use it in `abbaye.toml` /// /// ```toml /// [[builders]] @@ -651,7 +651,7 @@ pub struct ArtifactPath { /// depends_on = ["make-release"] /// ``` /// -/// ## Advanced — Parallel sub-tasks with child spinners +/// ## Advanced - Parallel sub-tasks with child spinners /// /// If your builder naturally fans out into independent sub-tasks (like the /// `cargo` builder running one `cargo build` per target triple), you can run @@ -681,7 +681,7 @@ pub struct ArtifactPath { /// ``` /// /// The `line_bridge` helper in [`crate::builders::cargo`] is a reusable -/// pattern for adapting a plain-string sender to structured [`LogEvent`]s — +/// pattern for adapting a plain-string sender to structured [`LogEvent`]s - /// feel free to copy or generalise it. /// /// ## Reviewer checklist -
modified src/git_ui.rs
diff --git a/src/git_ui.rs b/src/git_ui.rs index df48aef..c5f3093 100644 --- a/src/git_ui.rs +++ b/src/git_ui.rs @@ -1,14 +1,14 @@ //! Generates a static git repository web UI and a clonable bare clone. //! //! Produces: -//! - `<output>/repository/` — one HTML log page per branch, refs page, +//! - `<output>/repository/` - one HTML log page per branch, refs page, //! per-commit detail pages -//! - `<output>/repository.git/` — bare clone suitable for dumb HTTP serving +//! - `<output>/repository.git/` - bare clone suitable for dumb HTTP serving //! //! The branch named by `git_ui.default_branch` is rendered to `index.html`; //! every other branch gets `<sanitized-name>.html`. //! -//! It also generates `<output>/repository/browse/<hash>/` — a full recursive +//! It also generates `<output>/repository/browse/<hash>/` - a full recursive //! static file tree browser with server-side syntax highlighting (via syntect), //! generated for every branch tip and every tagged commit. //! @@ -125,7 +125,7 @@ struct RefBadge { struct Crumb { name: String, /// Relative link to this directory's `index.html`. `None` for the last - /// (current) segment — rendered as plain text, not a link. + /// (current) segment - rendered as plain text, not a link. url: Option<String>, } @@ -168,7 +168,7 @@ struct BranchEntry { // ── Public entry point ──────────────────────────────────────────────────────── /// Generate the repository web UI and bare clone into `config.site.output_dir`. -/// Shared spinner style — matches the builder spinners in `site.rs`. +/// Shared spinner style - matches the builder spinners in `site.rs`. fn make_spinner(label: &str) -> ProgressBar { let pb = ProgressBar::new_spinner(); pb.set_style( @@ -207,10 +207,10 @@ pub async fn build_git_repository_ui(config: &AbbayeConfig, git_cfg: &GitUiConfi // ── All gix work happens inside one blocking task (Repository is !Send) ─── // // Returns: - // branch_pages — (short_name, filename, commits) per branch - // unique_commits — all commits across all branches, deduplicated - // tags / ref_branches — for refs.html - // browse_revisions — (hex_hash, ObjectId) for every branch tip + tag tip + // branch_pages - (short_name, filename, commits) per branch + // unique_commits - all commits across all branches, deduplicated + // tags / ref_branches - for refs.html + // browse_revisions - (hex_hash, ObjectId) for every branch tip + tag tip let (branch_pages, unique_commits, tags, ref_branches, browse_revisions) = tokio::task::spawn_blocking(move || -> Result<_> { let repo = match gix::discover(&repo_path_clone) { -
modified src/main.rs
diff --git a/src/main.rs b/src/main.rs index 30ac5f2..0596f16 100644 --- a/src/main.rs +++ b/src/main.rs @@ -220,7 +220,7 @@ async fn build_all() -> Result<()> { .trim() .to_owned() } else { - // Detached HEAD — fall back to the commit SHA. + // Detached HEAD - fall back to the commit SHA. let sha_out = tokio::process::Command::new("git") .args(["rev-parse", "HEAD"]) .output() @@ -376,7 +376,7 @@ async fn main() -> Result<()> { cli::CliCommand::DumpSchema => { // Emit a JSON Schema draft-07 document rather than the 2020-12 // default. Taplo (and most TOML LSP tooling) validates against - // draft-07, which treats `$ref` as exclusive — it ignores any + // draft-07, which treats `$ref` as exclusive - it ignores any // sibling keywords. Draft-07 output from schemars wraps `$ref` // in `allOf` instead, keeping the `const` type-discriminators // visible to the validator and resolving `oneOf` ambiguity. -
modified src/site.rs
diff --git a/src/site.rs b/src/site.rs index 8fdfed1..68106e6 100644 --- a/src/site.rs +++ b/src/site.rs @@ -445,7 +445,7 @@ pub async fn build_site(config: AbbayeConfig) -> Result<()> { let docs_dir = version_dir.join("docs"); for artifact in &doc_artifacts { - // Copy the complete target/doc tree — this includes the shared + // Copy the complete target/doc tree - this includes the shared // rustdoc CSS, JS, fonts and search indices at the root of the // directory in addition to the per-crate HTML subdirectories. copy_dir_recursive(artifact.path.clone(), docs_dir.clone()).await?; @@ -634,7 +634,7 @@ fn extract_local_refs(md: &str) -> Vec<String> { let url: Option<pulldown_cmark::CowStr> = match event { Event::Start(Tag::Image { dest_url, .. }) => Some(dest_url), Event::Start(Tag::Link { dest_url, .. }) => Some(dest_url), - // pulldown-cmark emits End events with a TagEnd — ignore those. + // pulldown-cmark emits End events with a TagEnd - ignore those. Event::End(TagEnd::Image | TagEnd::Link) => None, _ => None, }; @@ -935,8 +935,8 @@ fn update_latest_symlink(output_dir: &Path, version_dir_name: &str) -> Result<() /// `.j2` suffix, e.g. `"base.html"`) is **not** already listed in `skip`, and /// loads each one into `tera` under that stem name. /// -/// This makes user-supplied helper or base templates — e.g. a `base.html.j2` -/// referenced by `{% extends "base.html" %}` in a customised main template — +/// This makes user-supplied helper or base templates - e.g. a `base.html.j2` +/// referenced by `{% extends "base.html" %}` in a customised main template - /// available at render time without the caller needing to enumerate them. pub(crate) fn load_extra_theme_templates( tera: &mut tera::Tera, @@ -945,7 +945,7 @@ pub(crate) fn load_extra_theme_templates( ) -> miette::Result<()> { let entries = match std::fs::read_dir(theme_path) { Ok(e) => e, - Err(_) => return Ok(()), // theme dir absent — nothing to do + Err(_) => return Ok(()), // theme dir absent - nothing to do }; for entry in entries.flatten() { let path = entry.path();