sproutsite 0.5.32 → 0.5.34

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 (3) hide show
  1. package/README.md +37 -2
  2. package/VERSION +1 -1
  3. package/package.json +5 -1
package/README.md CHANGED
@@ -17,7 +17,7 @@ Official website: [sproutsite.dev](https://sproutsite.dev) · [Documentation](ht
17
17
 
18
18
  ## Installation
19
19
 
20
- Use Sproutsite in your own Astro project. You maintain the content files; the package provides the content model, page assembly, and default theme. The published `create-sproutsite` generator prepares a minimal English or German website. Sproutsite has no administration interface.
20
+ Use Sproutsite in your own Astro project. You maintain the content files; the package provides the content model, page assembly, and default theme. The published `create-sproutsite` generator prepares an English, German, or bilingual website. Sproutsite has no administration interface.
21
21
 
22
22
  Requires Node.js 24 or a newer supported LTS version, and npm. Create an English website:
23
23
 
@@ -29,7 +29,15 @@ npm run dev
29
29
 
30
30
  For German content, use `--language de`. The assistant asks for a website name and whether to install dependencies. If you skip installation, run `npm install` before `npm run dev`. The starter includes Astro configuration, content collections, a shared page route, a small homepage and editorial guidance in `AGENTS.md`. Edit the generated files under `src/content/`; the design stays in the installed Sproutsite package.
31
31
 
32
- The German starter serves German directly at `/`. It follows the existing locale convention with `site.de.yaml`, `page.de.yaml` and `.de.md`/`.de.mdx` content, plus base configuration and page metadata. Its README explains which configuration and metadata pairs to keep synchronized. It does not generate an English website.
32
+ The single-language German starter serves German at `/`. It uses `site.de.yaml` for locale overrides and `page.de.yaml`, `.de.md`, and `.de.mdx` for German content alongside the base configuration and page metadata. The generated README explains which files to edit.
33
+
34
+ For a bilingual website with German at `/` and English at `/en/`, use this generator command in the same workflow:
35
+
36
+ ```sh
37
+ npm create sproutsite@latest my-website -- --language de --bilingual
38
+ ```
39
+
40
+ The [bilingual starter guide](https://sproutsite.dev/documentation/getting-started/your-website/languages/) shows which files to edit in each language and how to check translated navigation.
33
41
 
34
42
  Set your production URL before deployment. The new website's README explains preview, content editing and building. The generator has its own [repository](https://github.com/sproutsite/create-sproutsite) and [npm package](https://www.npmjs.com/package/create-sproutsite); its version is independent of the library.
35
43
 
@@ -628,6 +636,12 @@ error_page 500 /500.html;
628
636
 
629
637
  These local error documents preserve the original error status. For a subpath deployment, prefix the error-document URLs with the deployment base (for example `/demo/404.html`). Error pages still load their shared CSS, logo, and scripts from the generated asset directory, so deploy the complete build. See the official [Astro error-page documentation](https://docs.astro.build/en/basics/astro-pages/), [Apache ErrorDocument reference](https://httpd.apache.org/docs/2.4/mod/core.html#errordocument), and [Nginx error_page reference](https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page).
630
638
 
639
+ ## Documentation export for MCP
640
+
641
+ From this framework checkout, run `npm run export:mcp` to validate and export documentation and showcase content to ignored `artifacts/mcp/`. The artifact contains `snapshot.json`, its generated `schema.json`, LICENSE, NOTICE and third-party notices. It includes configured English/German pages, normalized Markdown, examples, tables, capability notices, source hashes and a public component-to-document index. It records the Sproutsite version and Git provenance. MDX components and expressions are not executed, private legal settings are not required and `dist/` is untouched.
642
+
643
+ The separate `sproutsite-mcp` project validates a pinned artifact and loads it from a read-only mount at startup. The export stays local, and consumer npm packages omit the exporter and its data. See the [export data contract](docs/mcp-export.md), [live snapshot update guide](docs/deployment/mcp-snapshot.md), and bilingual [package guide](https://sproutsite.dev/documentation/package/).
644
+
631
645
  ## Validation and Limitations
632
646
 
633
647
  A website without blog articles does not need `src/content/blog/`. Missing, empty and asset-only blog directories are handled without missing-directory or empty-collection warnings. The existing empty blog overview remains available; no page URLs are removed. Once source files exist, Astro's glob loader performs the normal loading, schema validation and content watching. A small optional-blog loader waits for the first source file using Astro's public loader watcher API; it does not create placeholders or filter diagnostics for actual content. Page rendering and language navigation query optional collections only after Astro has stored their first entry. A small internal readiness collection records this state through the public loader store API, including watcher updates; files appearing on disk alone do not imply that parsing has finished. This avoids empty-collection warnings during first-article loading and also supports a custom blog directory. The package test checks both warning-free builds and adding, editing and removing the first article without restarting the dev server, with deliberately delayed parsing to exercise requests while loading is still in progress.
@@ -691,6 +705,7 @@ npm run build:demo # builds once with base /demo/
691
705
  npm run storybook # isolated Astro component workshop on port 6006
692
706
  npm run build:storybook # static Storybook output to storybook-static/
693
707
  npm run test:package # install and build the local archive in a fresh consumer
708
+ npm run export:mcp # validated documentation/showcase JSON artifact to artifacts/mcp/
694
709
  npm run prepublishOnly # run all publication checks without publishing
695
710
  ```
696
711
 
@@ -700,6 +715,26 @@ Storybook is a local developer tool and not part of the published website. It re
700
715
 
701
716
  The product identity is consistently Sproutsite: package imports use `sproutsite/*`, public helpers use `createSproutsiteCollections()`, `createSproutsiteConfig()` and `getSproutsiteStaticPaths()`, and theme classes use the `ss-` prefix. Update local consumers' dependency, imports, environment variables and custom theme overrides together.
702
717
 
718
+ ### Preview the default starter
719
+
720
+ After installing the repository dependencies, preview a starter in its own Astro project:
721
+
722
+ ```sh
723
+ npm run dev:starter -- --language en
724
+ npm run dev:starter -- --language de
725
+ npm run dev:starter -- --language de --bilingual
726
+ npm run build:starter -- --language de
727
+ npm run build:starter -- --language de --bilingual
728
+ ```
729
+
730
+ The starter defaults to English and uses port 4322 for development. Follow the URL printed by Astro. Use `--port 4323` to run a second starter alongside it. Each command generates a fresh project under ignored `artifacts/starter/` and prints its path. The build writes to that project's `dist/`.
731
+
732
+ The bilingual preview puts German at `/` and English at `/en/`. Use the header language switcher on the homepage or on the example About page, which has separate URLs at `/ueber-uns/` and `/en/about/`. The preview starts from the German starter, adds the English homepage files, and applies the configuration and files under `starters/minimal/de-en/`. The published generator provides this setup with `--language de --bilingual`.
733
+
734
+ Edit the shared and locale-specific files under `starters/minimal/`, then rerun the command to regenerate the starter. These templates were taken from `create-sproutsite@0.1.9`. The preview adds the neutral artwork from `src/package/starter-assets/` and copies the repository's agent instructions for Codex and Claude Code. The generated site's Sproutsite dependency points to this checkout for development, so theme and component updates use Astro's live reload with the repository's existing dependencies. The existing `npm run dev` serves the full demo and Showcase independently.
735
+
736
+ The starter templates and generated previews are excluded from the Sproutsite npm package.
737
+
703
738
  ### Legal details for the demo website
704
739
 
705
740
  The legal-notice pages read operator details from a local `.env`. Copy `.env.dist` to `.env` and enter your details before running `npm run build`. `.env` is ignored by Git; `.env.dist` contains example values for version control. Without `.env`, `npm run dev` displays clearly marked sample details. Builds of pages using `LegalIdentity` reject a missing file, incomplete/invalid fields, or the sample name, email and LinkedIn profile. Consumer websites without this component do not require these variables. Generated HTML intentionally contains the legal details for publication.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.32
1
+ 0.5.34
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sproutsite",
3
- "version": "0.5.32",
3
+ "version": "0.5.34",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Björn Hempel",
6
6
  "description": "Agent-first Static CMS powered by Astro and TypeScript, with Markdown-first content.",
@@ -80,8 +80,11 @@
80
80
  "branding:generate": "node --import tsx scripts/generate-branding.ts && npm run starter-assets:generate",
81
81
  "starter-assets:generate": "node --import tsx scripts/generate-starter-assets.ts",
82
82
  "dev": "astro dev --force",
83
+ "dev:starter": "node --import tsx scripts/starter.ts dev",
84
+ "build:starter": "node --import tsx scripts/starter.ts build",
83
85
  "build": "npm run validate && astro build && node --import tsx scripts/verify-build.ts",
84
86
  "build:demo": "SPROUTSITE_BASE=/demo/ npm run build",
87
+ "export:mcp": "npm run validate && astro build --config astro.mcp.config.ts && node --import tsx scripts/verify-mcp-export.ts",
85
88
  "preview": "astro preview",
86
89
  "check": "npm run validate && astro check",
87
90
  "validate": "node --import tsx scripts/validate-content.ts",
@@ -136,6 +139,7 @@
136
139
  "playwright": "^1.63.0",
137
140
  "prettier": "^3.9.10",
138
141
  "prettier-plugin-astro": "^1.1.2",
142
+ "remark-stringify": "^11.0.0",
139
143
  "sharp": "^0.35.5",
140
144
  "storybook": "^10.6.6",
141
145
  "tsx": "^4.23.15",