From 69dcb2c4dfde57b1759b7f5f4d310ad63f23043d Mon Sep 17 00:00:00 2001 From: Santiago Date: Mon, 15 Jun 2026 11:07:06 -0300 Subject: [PATCH] docs: fix MDX/Mermaid build errors in v2 docs The Starlight docs build (txpipe/docs) failed compiling the v2 docset merged in #950: - advanced/stateful_cursor.mdx: a `` indented two spaces directly after a Markdown list was absorbed as a loose list-item paragraph, so MDX never saw the closing tag ("Expected the closing tag "). Moving the Tabs/TabItem JSX tags to column 0 with blank lines around the content puts the tags outside the list. - how_it_works.mdx: harden the Mermaid block to canonical syntax (spaced dotted-link labels, non-reserved node id) so rehype-mermaid's img-svg renderer accepts it. Verified with a full local `astro build` of txpipe/docs against this content: 195 pages built, the diagram rasterizes to SVG, all three new pages render. Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/v2/advanced/stateful_cursor.mdx | 18 ++++++++++++------ docs/v2/how_it_works.mdx | 6 +++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/v2/advanced/stateful_cursor.mdx b/docs/v2/advanced/stateful_cursor.mdx index fe401d41..65765f4c 100644 --- a/docs/v2/advanced/stateful_cursor.mdx +++ b/docs/v2/advanced/stateful_cursor.mdx @@ -25,7 +25,8 @@ and resumes the source from there. Add a top-level `[cursor]` section to enable the feature, and pick a backend with `type`: - + + Keeps the cursor in memory only — the position is **not** persisted across restarts. This is the default when no `[cursor]` section is present, and takes no extra fields. @@ -33,8 +34,10 @@ the default when no `[cursor]` section is present, and takes no extra fields. [cursor] type = "Memory" ``` - - + + + + Stores the cursor in a JSON file on the local file system. ```toml title="daemon.toml" @@ -51,8 +54,10 @@ flush_interval = 10 recover across rollbacks. - `flush_interval` (optional, default = `10`): how often, in seconds, the position is written to disk. - - + + + + Stores the cursor in a Redis instance — handy when running multiple environments or ephemeral containers. @@ -70,5 +75,6 @@ flush_interval = 10 - `max_breadcrumbs` (optional, default = `10`): how many recent positions to retain. - `flush_interval` (optional, default = `10`): how often, in seconds, the position is flushed to Redis. - + + diff --git a/docs/v2/how_it_works.mdx b/docs/v2/how_it_works.mdx index 63ca41c8..774c4107 100644 --- a/docs/v2/how_it_works.mdx +++ b/docs/v2/how_it_works.mdx @@ -11,11 +11,11 @@ batches. ```mermaid flowchart LR - node([Cardano node]) -->|Ouroboros mini-protocols| source[Source] + cnode([Cardano node]) -->|Ouroboros mini-protocols| source[Source] source --> f1[Filter] --> f2[Filter] --> sink[Sink] sink --> dest([Destination]) - sink -.reports position.-> cursor[(Cursor)] - cursor -.restores on restart.-> source + sink -. reports position .-> cursor[(Cursor)] + cursor -. restores on restart .-> source ``` ## The pipeline