Conversation
- Create src/pages/[...slug].md.ts Astro endpoint - Serves exact original source (from src/content/docs/) as text/markdown - Enables /index.md, /guides/.../*.md etc. for LLMs/agents - Works in dev and static builds
…lash - Add stripTrailingSlashesFromInternalLinks() helper in the endpoint - Rewrites Markdown links like [text](/path/) -> [text](/path) (and handles #fragments/?queries) - Ensures plain-text Markdown served at *.md URLs uses consistent non-trailing-slash page links - External links and non-page links are left untouched
Restructure the site into the four Diátaxis sections — Tutorials, How-to guides, Explanation, and Reference — replacing the old concepts/guides/references layout, with redirects from every old URL. Update everything to Charms v15 and fill the major gaps: - Explanation: why, apps, spells, transactions, beaming, Scrolls - Reference: CLI, spell structure (logical + serialized + on-chain Bitcoin/Cardano), SDK, Prover API, Scrolls canister - How-to: install, Bitcoin node, app contracts, app keys (versioned apps), call/run the prover (SP1 Prover Network), beaming (eBTC), Scroll outputs, and wallet integration - Tutorials: build an app, cast your first spell on testnet4 Correct stale facts: protocol v15, SP1 -> Groth16 proofs, single-tx OP_RETURN on Bitcoin (no commit/reveal), versioned apps, Cardano. Replace the Starlight-boilerplate README with a real project README and set the `site` config. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The SP1 SDK reads NETWORK_PRIVATE_KEY lazily when it builds the network prover (on the first proof request, via a Shared once-cell), not at server startup. Correct "the server will fail to start" to reflect that the process starts and the first prove fails. The env var name itself is confirmed correct against sp1-sdk network/builder.rs. Surfaced by an independent grok audit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Correct Bitcoin Core minimum (v28.0+ for testnet4), add missing prev_txs in the app-contract guide, document Cardano Scrolls canister and clarify that scrolls-api HTTP targets v14 only, fix broken scrolls anchor link, and align fee_rate defaults and install prerequisites with the source.
Update spend-scroll-outputs and scrolls-canister reference to use the recommended `icp canister call` syntax, verified against a live query to the v15 canister on IC mainnet.
Move content from explanation/ to concepts/, update sidebar links and internal references, and add redirects from old /explanation URLs.
State that the section explains what the Charms protocol is and why it exists, and tighten the pointers to How-to and Reference.
Correct spell check output behavior, option formats, prove/prover flow, and wallet, tx, and util command details against the Rust CLI source.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Charms documentation site for the v15 release, reorganizing content into a Diátaxis-style structure (Concepts / Tutorials / How-to / Reference) and refreshing site configuration to match the new IA and URL scheme.
Changes:
- Add a
.mdendpoint (src/pages/[...slug].md.ts) to serve raw Markdown for docs pages (with internal-link normalization). - Introduce new v15 docs across Tutorials/How-to/Reference/Concepts and remove legacy guide/reference pages.
- Update site config (redirects + sidebar) and bump Astro/Starlight/sharp dependencies.
Reviewed changes
Copilot reviewed 49 out of 50 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/[...slug].md.ts | Adds endpoint to serve raw Markdown for docs pages. |
| src/content/docs/tutorials/index.md | Adds Tutorials landing page. |
| src/content/docs/tutorials/build-a-charms-app.md | Adds tutorial for scaffolding/building/checking an app. |
| src/content/docs/tutorials/cast-your-first-spell.md | Adds tutorial for proving/signing/broadcasting on testnet4. |
| src/content/docs/references/spell-json.md | Removes legacy Spell JSON reference (v11-era). |
| src/content/docs/reference/index.md | Adds Reference landing page. |
| src/content/docs/reference/cli.md | Adds v15 CLI reference. |
| src/content/docs/reference/spell.md | Adds authoritative spell structure reference (logical/serialized/on-chain). |
| src/content/docs/reference/sdk.md | Adds SDK reference for writing app contracts. |
| src/content/docs/reference/prover-api.md | Adds v15 Prover API contract documentation. |
| src/content/docs/reference/scrolls-canister.md | Adds Scrolls canister API reference (Bitcoin + Cardano). |
| src/content/docs/index.mdx | Updates homepage CTAs and navigation cards to match new structure. |
| src/content/docs/how-to/index.md | Adds How-to landing page. |
| src/content/docs/how-to/install-charms.md | Adds install guide for CLI + prerequisites. |
| src/content/docs/how-to/set-up-a-bitcoin-node.md | Adds Bitcoin Core testnet4 setup guide. |
| src/content/docs/how-to/write-an-app-contract.md | Adds guide for implementing app_contract. |
| src/content/docs/how-to/manage-app-keys.md | Adds versioned-app key/signature workflow guide. |
| src/content/docs/how-to/call-the-prover-api.md | Adds client-side Prover API calling guide. |
| src/content/docs/how-to/run-a-prover-server.md | Adds self-hosted prover server guide. |
| src/content/docs/how-to/beam-charms.md | Adds beaming how-to walkthrough (eBTC example). |
| src/content/docs/how-to/spend-scroll-outputs.md | Adds guide for spending Scroll-controlled outputs via canister. |
| src/content/docs/how-to/wallet-integration/index.md | Adds wallet-integration overview page. |
| src/content/docs/how-to/wallet-integration/display-charms.md | Adds wallet guide for extracting/verifying/displaying charms. |
| src/content/docs/how-to/wallet-integration/transfer-nfts.md | Adds wallet guide for NFT transfer spells. |
| src/content/docs/how-to/wallet-integration/transfer-tokens.md | Adds wallet guide for token transfer spells. |
| src/content/docs/how-to/wallet-integration/sign-and-broadcast.md | Adds wallet guide for signing/broadcasting spell txs. |
| src/content/docs/guides/wallet-integration/introduction.md | Removes legacy wallet-integration introduction. |
| src/content/docs/guides/wallet-integration/visualization.md | Removes legacy charms visualization guide. |
| src/content/docs/guides/wallet-integration/transactions/overview.md | Removes legacy wallet tx overview. |
| src/content/docs/guides/wallet-integration/transactions/nft.md | Removes legacy NFT transfer guide. |
| src/content/docs/guides/wallet-integration/transactions/token.md | Removes legacy token transfer guide. |
| src/content/docs/guides/wallet-integration/transactions/prover-api.md | Removes legacy prover API guide. |
| src/content/docs/guides/wallet-integration/transactions/signing.md | Removes legacy signing guide. |
| src/content/docs/guides/wallet-integration/transactions/broadcasting.md | Removes legacy broadcasting guide. |
| src/content/docs/guides/charms-apps/introduction.md | Removes legacy charms-apps intro guide. |
| src/content/docs/guides/charms-apps/pre-reqs.md | Removes legacy prerequisites guide. |
| src/content/docs/guides/charms-apps/get-started.md | Removes legacy get-started guide. |
| src/content/docs/guides/charms-apps/cast-spell.md | Removes legacy cast-spell guide. |
| src/content/docs/concepts/index.md | Adds Concepts landing page. |
| src/content/docs/concepts/why.md | Removes legacy “Why” page. |
| src/content/docs/concepts/why-charms.md | Adds updated v15 “Why Charms?” page. |
| src/content/docs/concepts/apps.md | Updates Apps concept page for v15 + Diátaxis navigation. |
| src/content/docs/concepts/spells.md | Updates Spells concept page (v15 structure + proof explanation). |
| src/content/docs/concepts/transactions.md | Adds Transactions concept page (Bitcoin + Cardano embedding). |
| src/content/docs/concepts/beaming.md | Adds Beaming concept page. |
| src/content/docs/concepts/scrolls.md | Adds Scrolls concept page. |
| README.md | Replaces template README with Charms-specific contribution and structure notes. |
| package.json | Bumps Astro/Starlight/sharp versions. |
| astro.config.mjs | Sets site, trailingSlash: 'never', adds redirects, and replaces autogenerated sidebar with explicit Diátaxis structure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
+22
| function resolveDocsFile(id: string): string { | ||
| const base = join(process.cwd(), DOCS_DIR, id); | ||
| const md = `${base}.md`; | ||
| if (existsSync(md)) return md; | ||
| const mdx = `${base}.mdx`; | ||
| if (existsSync(mdx)) return mdx; | ||
| throw new Error(`No source file found for docs entry: ${id}`); | ||
| } |
| import { getCollection } from 'astro:content'; | ||
| import type { APIRoute } from 'astro'; | ||
| import { readFileSync, existsSync } from 'node:fs'; | ||
| import { join } from 'node:path'; |
|
|
||
| | Field | Type | Description | | ||
| | --- | --- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | `spell` | object or string | **Required.** The spell ([Spell structure](/reference/spell), a `NormalizedSpell`). In JSON, the spell object's hex-encoded CBOR. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.