create-sproutsite 0.0.0-stage → 0.1.0

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 (33) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +15 -0
  4. package/README.md +120 -2
  5. package/THIRD_PARTY_NOTICES.md +7 -0
  6. package/dist/index.js +156 -0
  7. package/dist/project.js +91 -0
  8. package/package.json +60 -5
  9. package/templates/minimal/common/.nvmrc +1 -0
  10. package/templates/minimal/common/LICENSE-SPROUTSITE +202 -0
  11. package/templates/minimal/common/NOTICE-SPROUTSITE +13 -0
  12. package/templates/minimal/common/astro.config.ts +4 -0
  13. package/templates/minimal/common/gitignore +6 -0
  14. package/templates/minimal/common/package.json +24 -0
  15. package/templates/minimal/common/src/content.config.ts +3 -0
  16. package/templates/minimal/common/src/pages/[...slug].astro +9 -0
  17. package/templates/minimal/common/tsconfig.json +3 -0
  18. package/templates/minimal/de/AGENTS.md +20 -0
  19. package/templates/minimal/de/README.md +32 -0
  20. package/templates/minimal/de/src/content/pages/01-introduction.de.md +9 -0
  21. package/templates/minimal/de/src/content/pages/02-next-steps.de.mdx +14 -0
  22. package/templates/minimal/de/src/content/pages/hero.de.md +8 -0
  23. package/templates/minimal/de/src/content/pages/page.de.yaml +2 -0
  24. package/templates/minimal/de/src/content/pages/page.yaml +2 -0
  25. package/templates/minimal/de/src/content/site.de.yaml +16 -0
  26. package/templates/minimal/de/src/content/site.yaml +16 -0
  27. package/templates/minimal/en/AGENTS.md +19 -0
  28. package/templates/minimal/en/README.md +32 -0
  29. package/templates/minimal/en/src/content/pages/01-introduction.md +9 -0
  30. package/templates/minimal/en/src/content/pages/02-next-steps.mdx +14 -0
  31. package/templates/minimal/en/src/content/pages/hero.md +8 -0
  32. package/templates/minimal/en/src/content/pages/page.yaml +2 -0
  33. package/templates/minimal/en/src/content/site.yaml +16 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ All notable changes are documented here using Keep a Changelog and Semantic Versioning.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.0] - 2026-11-17
8
+
9
+ ### Added
10
+
11
+ - Added a TypeScript project initializer with interactive and unattended modes, website-name and language selection, and optional npm installation.
12
+ - Added minimal English and German Astro starters using published Sproutsite, a shared hero, Markdown/MDX sections and localized editorial guidance.
13
+ - Added overwrite and symlink protection, safe metadata handling, isolated unit tests and packed-CLI installation/build checks for both languages and deployment bases.
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,15 @@
1
+ create-sproutsite
2
+ Copyright 2026 Björn Hempel
3
+
4
+ create-sproutsite was originally created by Björn Hempel
5
+ as part of the Sproutsite project.
6
+
7
+ Original project:
8
+ https://github.com/sproutsite/sproutsite
9
+
10
+ Official website:
11
+ https://sproutsite.dev
12
+
13
+ This product includes software developed as part of the
14
+ Sproutsite project and is licensed under the Apache License,
15
+ Version 2.0.
package/README.md CHANGED
@@ -1,3 +1,121 @@
1
- # Temporary Holding Version
1
+ # create-sproutsite
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Create your own Markdown-first website with Sproutsite and Astro. The generator supplies the initial configuration, a small homepage, and editorial guidance. The installed `sproutsite` library provides the default design and components. Sproutsite contains no integrated AI agent or CMS administration interface.
4
+
5
+ Requires Node.js 24 or later and npm. The current starter is tested against `sproutsite@~0.5.8`, Astro `^7.4.4`, and MDX `^8.1.2`. `.nvmrc` pins Node.js 24.22.2 for generator development.
6
+
7
+ ## Create a website
8
+
9
+ **This generator has not been published to npm yet.** The following command is the intended entry point after its first publication. For now, use the local archive instructions below; do not install an unverified registry package with this name.
10
+
11
+ ```sh
12
+ npm create sproutsite@latest my-website
13
+ cd my-website
14
+ npm run dev
15
+ ```
16
+
17
+ The assistant asks for the directory, English or German content, website name, and whether to install dependencies. If you skip installation, run `npm install` before `npm run dev`. The generator never publishes, deploys, or initializes a Git repository automatically.
18
+
19
+ To choose German and accept the other defaults after publication:
20
+
21
+ ```sh
22
+ npm create sproutsite@latest meine-website -- --language de --name "Meine Website" --yes
23
+ ```
24
+
25
+ To create files without downloading website dependencies:
26
+
27
+ ```sh
28
+ npm create sproutsite@latest my-website -- --language en --yes --no-install
29
+ ```
30
+
31
+ `--yes` defaults to installing dependencies. `--no-install` overrides that. Without a terminal, provide `--yes` or all four choices (directory, name, language, install/no-install). Unknown options and invalid languages fail; existing non-empty directories, including hidden files, are never overwritten. Installation failures preserve the website files and show how to retry.
32
+
33
+ ## What you edit
34
+
35
+ ```text
36
+ my-website/
37
+ ├── package.json
38
+ ├── astro.config.ts
39
+ ├── tsconfig.json
40
+ ├── README.md
41
+ ├── AGENTS.md
42
+ └── src/
43
+ ├── content.config.ts
44
+ ├── pages/[...slug].astro
45
+ └── content/
46
+ ├── site.yaml
47
+ └── pages/
48
+ ├── page.yaml
49
+ ├── hero.md
50
+ ├── 01-introduction.md
51
+ └── 02-next-steps.mdx
52
+ ```
53
+
54
+ Edit the supplied content rather than building a theme. The starter's README and AGENTS.md explain headings, numbering, links, images, component use, preview, checks and publishing. The example MDX section uses the existing Feature component. No website contact details, images, AI services or external font downloads are invented or added.
55
+
56
+ The German starter serves German at `/`. To follow Sproutsite's existing language contract, it uses `.de.md`/`.de.mdx`, `page.de.yaml` and `site.de.yaml`, plus base `page.yaml` and `site.yaml`. Keep each metadata/configuration pair synchronized. It does not create an English website or change the library's locale conventions.
57
+
58
+ The initial URL is `https://example.com`. Replace it with the real production origin in the site configuration before deployment. Generated website packages are `private: true` to prevent accidental npm publication; this is independent of the generator's public package settings.
59
+
60
+ ```sh
61
+ npm run check
62
+ npm run build
63
+ npm run preview
64
+ ```
65
+
66
+ Deploy the entire `dist/` directory. Sproutsite generates assets, a sitemap, manifest, and static error documents; your hosting configuration must select the error documents. No deployment is performed by the generator.
67
+
68
+ ## Local use before publication
69
+
70
+ In this generator repository:
71
+
72
+ ```sh
73
+ npm ci
74
+ npm run build
75
+ node dist/index.js /absolute/path/to/my-website
76
+ ```
77
+
78
+ Alternatively, run `npm pack` and use the resulting archive without fetching a registry generator:
79
+
80
+ ```sh
81
+ npm exec --yes --package=/absolute/path/to/create-sproutsite-0.1.0.tgz -- create-sproutsite /absolute/path/to/my-website --language en --yes
82
+ ```
83
+
84
+ The archive includes compiled CLI code, templates and license notices. It excludes tests, build scripts, source code and development dependencies. The generator has no runtime dependencies. Its version is independent of the installed Sproutsite version.
85
+
86
+ ## Develop the generator
87
+
88
+ ```sh
89
+ npm ci
90
+ npm run dev -- --help
91
+ npm run format
92
+ npm run format:check
93
+ npm run check
94
+ npm test
95
+ npm run build
96
+ npm run test:starter
97
+ ```
98
+
99
+ `test:starter` builds and packs this generator, invokes the packed executable with npm exec, installs the published website dependencies, and runs Astro checks and builds for English/German at both `/` and `/demo/`. It verifies locale, homepage/Feature content, metadata, assets, sitemap and error documents. Network access or a suitable npm cache is required. Temporary files are removed on success and retained with their path on failure. Only temporary websites are installed; nothing is published. Unit tests cover occupied directories, symlinks, invalid inputs, safe website names and unattended behavior.
100
+
101
+ `npm pack` runs the TypeScript build. `npm run prepublishOnly` runs formatting, checking, unit tests and the full starter test without publishing. A publishing dry run still creates and installs real **local test archives**, while the outer publication remains a dry run. Actual `npm publish` always requires an explicit maintainer request and npm authentication.
102
+
103
+ Maintainers preparing an npm release should follow `RELEASING.md` in the source checkout. That guide is excluded from the npm archive.
104
+
105
+ ## Scope and limitations
106
+
107
+ - A single minimal starter with either English or German, not a theme catalog or unrestricted template engine.
108
+ - The current library generates an empty blog overview even without articles and emits empty-collection warnings. No fake article or placeholder image is added to hide this behavior.
109
+ - The current library's German file conventions require the paired metadata files explained above. Its existing localized validation limitations are not repaired by the generator.
110
+ - No automatic Git initialization, deployments, updates to existing websites, blog setup, multilingual website wizard, or package publication.
111
+ - The npm executable is supplied by npm create/exec. Standalone direct execution needs npm on the system; automated execution is tested on Linux with Node 24 and npm. Other operating systems require a separate acceptance run.
112
+ - Generated code and automated checks do not replace visual, accessibility, editorial, or production-host review.
113
+ - The package name's availability and publication permissions must be checked before first publication.
114
+
115
+ ## License
116
+
117
+ Apache License, Version 2.0. Copyright © 2026 Björn Hempel.
118
+
119
+ See [LICENSE](LICENSE), [NOTICE](NOTICE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). The software license does not grant trademark rights or assign a license to the user's own website content.
120
+
121
+ [Sproutsite](https://sproutsite.dev) · [Documentation](https://sproutsite.dev/documentation/) · [Source](https://github.com/sproutsite/create-sproutsite) · [Issues](https://github.com/sproutsite/create-sproutsite/issues)
@@ -0,0 +1,7 @@
1
+ # Third-party notices
2
+
3
+ The generator has no third-party runtime dependencies and bundles no third-party images, fonts, or logo assets. Its code and starter templates are first-party Sproutsite work licensed under Apache-2.0. The adjacent LICENSE is the unchanged Apache License, Version 2.0; NOTICE records attribution.
4
+
5
+ Development tools remain separate dependencies with their own licenses; they are excluded from the published archive. The generated website installs Sproutsite, Astro, MDX and checking tools from npm. Those packages retain their own licenses and notices; they are not bundled or relicensed by this generator. Sproutsite contains its own LICENSE, NOTICE, third-party notices and font licenses.
6
+
7
+ The software license does not grant trademark rights. The generator sets the website package to private and makes no licensing declaration for the user's own editorial content.
package/dist/index.js ADDED
@@ -0,0 +1,156 @@
1
+ #!/usr/bin/env node
2
+ import { spawn } from 'node:child_process';
3
+ import { createInterface } from 'node:readline/promises';
4
+ import { parseArgs } from 'node:util';
5
+ import { resolve } from 'node:path';
6
+ import { assertEmptyTarget, createProject, validateName, } from './project.js';
7
+ const help = `Create a website with Sproutsite and Astro (Node.js 24+).
8
+
9
+ Usage: npm create sproutsite@latest [directory] -- [options]
10
+ create-sproutsite [directory] [options]
11
+
12
+ Options:
13
+ --name <name> Website name (default: My website / Meine Website)
14
+ --language <en|de> Content language (default: en)
15
+ --install Install dependencies with npm
16
+ --no-install Create files without installing dependencies
17
+ --yes, -y Use defaults without interactive questions; installs by default
18
+ --help, -h Show this help
19
+ --version, -v Show the generator version
20
+
21
+ Existing non-empty directories are never overwritten.
22
+ Without a TTY, pass --yes to accept defaults or supply directory, name,
23
+ language and --install/--no-install explicitly.
24
+ `;
25
+ async function install(directory) {
26
+ // npm sets npm_execpath for npm create/exec/run; no shell interpolation.
27
+ const npmCli = process.env.npm_execpath;
28
+ const child = npmCli
29
+ ? spawn(process.execPath, [
30
+ npmCli,
31
+ 'install',
32
+ '--no-audit',
33
+ '--no-fund',
34
+ '--dry-run=false',
35
+ '--package-lock=true',
36
+ ], {
37
+ cwd: directory,
38
+ stdio: 'inherit',
39
+ })
40
+ : spawn(process.platform === 'win32' ? 'npm.cmd' : 'npm', [
41
+ 'install',
42
+ '--no-audit',
43
+ '--no-fund',
44
+ '--dry-run=false',
45
+ '--package-lock=true',
46
+ ], {
47
+ cwd: directory,
48
+ stdio: 'inherit',
49
+ shell: false,
50
+ });
51
+ await new Promise((accept, reject) => {
52
+ child.once('error', reject);
53
+ child.once('exit', (code, signal) => code === 0
54
+ ? accept()
55
+ : reject(new Error(`npm install failed (${code ?? signal}). Your project files were kept. Run npm install in ${JSON.stringify(directory)} to retry.`)));
56
+ });
57
+ }
58
+ async function main() {
59
+ const { values, positionals } = parseArgs({
60
+ allowPositionals: true,
61
+ options: {
62
+ name: { type: 'string' },
63
+ language: { type: 'string' },
64
+ install: { type: 'boolean' },
65
+ 'no-install': { type: 'boolean' },
66
+ yes: { type: 'boolean', short: 'y' },
67
+ help: { type: 'boolean', short: 'h' },
68
+ version: { type: 'boolean', short: 'v' },
69
+ },
70
+ });
71
+ if (values.help) {
72
+ console.log(help);
73
+ return;
74
+ }
75
+ if (values.version) {
76
+ const { readFile } = await import('node:fs/promises');
77
+ const metadata = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
78
+ console.log(metadata.version);
79
+ return;
80
+ }
81
+ if (Number(process.versions.node.split('.')[0]) < 24)
82
+ throw new Error('Node.js 24 or later is required.');
83
+ if (positionals.length > 1)
84
+ throw new Error('Provide only one target directory.');
85
+ if (values.install && values['no-install'])
86
+ throw new Error('Choose either --install or --no-install.');
87
+ if (values.language !== undefined &&
88
+ values.language !== 'en' &&
89
+ values.language !== 'de')
90
+ throw new Error('Language must be en or de.');
91
+ const interactive = Boolean(process.stdin.isTTY && process.stdout.isTTY && !values.yes);
92
+ if (!interactive &&
93
+ !values.yes &&
94
+ (!positionals[0] ||
95
+ !values.name ||
96
+ !values.language ||
97
+ (!values.install && !values['no-install']))) {
98
+ throw new Error('Non-interactive mode requires --yes or directory, --name, --language and --install/--no-install.');
99
+ }
100
+ const questions = interactive
101
+ ? createInterface({ input: process.stdin, output: process.stdout })
102
+ : undefined;
103
+ const prompt = async (message, fallback) => {
104
+ if (!questions)
105
+ return fallback;
106
+ return ((await questions.question(`${message} (${fallback}): `)).trim() ||
107
+ fallback);
108
+ };
109
+ let directory;
110
+ let language;
111
+ let name;
112
+ let shouldInstall;
113
+ try {
114
+ directory =
115
+ positionals[0] ?? (await prompt('Project directory', 'my-website'));
116
+ if (!directory.trim())
117
+ throw new Error('Project directory must not be empty.');
118
+ await assertEmptyTarget(resolve(directory));
119
+ const selected = values.language ??
120
+ (await prompt('Content language: en / de', 'en'));
121
+ if (selected !== 'en' && selected !== 'de')
122
+ throw new Error('Language must be en or de.');
123
+ language = selected;
124
+ name = validateName(values.name ??
125
+ (await prompt('Website name', language === 'de' ? 'Meine Website' : 'My website')));
126
+ const response = values['no-install']
127
+ ? 'no'
128
+ : values.install
129
+ ? 'yes'
130
+ : await prompt('Install dependencies? yes / no', 'yes');
131
+ if (!['yes', 'y', 'no', 'n'].includes(response.toLowerCase()))
132
+ throw new Error('Answer yes or no for dependency installation.');
133
+ shouldInstall = ['yes', 'y'].includes(response.toLowerCase());
134
+ }
135
+ finally {
136
+ questions?.close();
137
+ }
138
+ const target = await createProject({ directory, language, name });
139
+ console.log(language === 'de'
140
+ ? `Website angelegt: ${target}`
141
+ : `Website created: ${target}`);
142
+ if (shouldInstall)
143
+ await install(target);
144
+ console.log(language === 'de' ? '\nNächste Schritte:' : '\nNext steps:');
145
+ console.log(` cd ${JSON.stringify(target)}`);
146
+ if (!shouldInstall)
147
+ console.log(' npm install');
148
+ console.log(' npm run dev');
149
+ console.log(language === 'de'
150
+ ? '\nInhalte: src/content/ · Produktionsadresse vor Veröffentlichung in site.yaml anpassen.\nAGENTS.md enthält Hinweise für die redaktionelle Arbeit.'
151
+ : '\nContent: src/content/ · Set the production URL in site.yaml before deployment.\nAGENTS.md contains guidance for editorial work.');
152
+ }
153
+ main().catch((error) => {
154
+ console.error(`create-sproutsite: ${error instanceof Error ? error.message : 'Unexpected error.'}`);
155
+ process.exitCode = 1;
156
+ });
@@ -0,0 +1,91 @@
1
+ import { lstat, mkdir, readdir, readFile, writeFile } from 'node:fs/promises';
2
+ import { basename, dirname, join, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ const templateRoot = fileURLToPath(new URL('../templates/minimal/', import.meta.url));
5
+ export function packageName(directory) {
6
+ const name = basename(resolve(directory))
7
+ .toLowerCase()
8
+ .replace(/[^a-z0-9-]+/g, '-')
9
+ .replace(/^-+|-+$/g, '')
10
+ .slice(0, 100);
11
+ return name && name !== 'node-modules' ? name : 'my-website';
12
+ }
13
+ export function validateName(name) {
14
+ const trimmed = name.trim();
15
+ if (!trimmed ||
16
+ trimmed.length > 120 ||
17
+ /[\u0000-\u001f\u007f]/.test(trimmed)) {
18
+ throw new Error('Website name must contain 1–120 characters without control characters.');
19
+ }
20
+ return trimmed;
21
+ }
22
+ /** A starter only: refuse links and populated targets, including dotfiles. */
23
+ export async function assertEmptyTarget(directory) {
24
+ try {
25
+ const entry = await lstat(directory);
26
+ if (entry.isSymbolicLink() || !entry.isDirectory()) {
27
+ throw new Error(`Target must be an empty directory, not a file or symlink: ${directory}`);
28
+ }
29
+ if ((await readdir(directory)).length) {
30
+ throw new Error(`Target is not empty; no files were changed: ${directory}`);
31
+ }
32
+ }
33
+ catch (error) {
34
+ if (!(error instanceof Error &&
35
+ 'code' in error &&
36
+ error.code === 'ENOENT'))
37
+ throw error;
38
+ }
39
+ }
40
+ async function templateFiles(directory, prefix = '') {
41
+ const entries = await readdir(directory, { withFileTypes: true });
42
+ const files = [];
43
+ for (const entry of entries) {
44
+ if (entry.isSymbolicLink())
45
+ throw new Error('Template symlinks are not supported.');
46
+ const name = join(prefix, entry.name);
47
+ if (entry.isDirectory())
48
+ files.push(...(await templateFiles(join(directory, entry.name), name)));
49
+ else if (entry.isFile())
50
+ files.push(name);
51
+ }
52
+ return files;
53
+ }
54
+ export async function createProject(options) {
55
+ if (options.language !== 'en' && options.language !== 'de')
56
+ throw new Error('Language must be en or de.');
57
+ const name = validateName(options.name);
58
+ const target = resolve(options.directory);
59
+ await assertEmptyTarget(target);
60
+ // Only fixed template tokens are replaced, once. JSON string literals are
61
+ // valid YAML scalars and prevent names from injecting YAML or frontmatter.
62
+ const tokens = {
63
+ PACKAGE_NAME: packageName(target),
64
+ SITE_NAME_YAML: JSON.stringify(name),
65
+ LOCALE_JSON: JSON.stringify(options.language),
66
+ };
67
+ const output = new Map();
68
+ for (const layer of ['common', options.language]) {
69
+ const directory = join(templateRoot, layer);
70
+ for (const file of await templateFiles(directory)) {
71
+ const destination = file === 'gitignore' ? '.gitignore' : file;
72
+ if (output.has(destination))
73
+ throw new Error(`Duplicate template file: ${destination}`);
74
+ const content = await readFile(join(directory, file), 'utf8');
75
+ output.set(destination, content.replace(/__([A-Z_]+)__/g, (_token, key) => {
76
+ const value = tokens[key];
77
+ if (value === undefined)
78
+ throw new Error(`Unknown template token: ${key}`);
79
+ return value;
80
+ }));
81
+ }
82
+ }
83
+ await mkdir(target, { recursive: true });
84
+ await assertEmptyTarget(target);
85
+ for (const [file, content] of output) {
86
+ const path = join(target, file);
87
+ await mkdir(dirname(path), { recursive: true });
88
+ await writeFile(path, content, { flag: 'wx' });
89
+ }
90
+ return target;
91
+ }
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
- "name": "create-sproutsite",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "create-sproutsite",
3
+ "version": "0.1.0",
4
+ "description": "Create a Markdown-first website with Sproutsite and Astro.",
5
+ "type": "module",
6
+ "license": "Apache-2.0",
7
+ "author": "Björn Hempel",
8
+ "homepage": "https://sproutsite.dev",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/sproutsite/create-sproutsite.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/sproutsite/create-sproutsite/issues"
15
+ },
16
+ "keywords": [
17
+ "sproutsite",
18
+ "astro",
19
+ "create",
20
+ "starter",
21
+ "markdown",
22
+ "website"
23
+ ],
24
+ "bin": {
25
+ "create-sproutsite": "dist/index.js"
26
+ },
27
+ "files": [
28
+ "dist/",
29
+ "templates/",
30
+ "README.md",
31
+ "CHANGELOG.md",
32
+ "LICENSE",
33
+ "NOTICE",
34
+ "THIRD_PARTY_NOTICES.md"
35
+ ],
36
+ "engines": {
37
+ "node": ">=24.0.0"
38
+ },
39
+ "publishConfig": {
40
+ "access": "public",
41
+ "registry": "https://registry.npmjs.org/"
42
+ },
43
+ "scripts": {
44
+ "dev": "node --import tsx src/index.ts",
45
+ "build": "tsc -p tsconfig.build.json",
46
+ "check": "tsc --noEmit",
47
+ "test": "node --import tsx --test tests/*.test.ts",
48
+ "test:starter": "node --import tsx scripts/test-starter.ts",
49
+ "format": "prettier --write .",
50
+ "format:check": "prettier --check .",
51
+ "prepack": "npm run build",
52
+ "prepublishOnly": "npm run format:check && npm run check && npm test && npm run test:starter"
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "24.13.6",
56
+ "prettier": "3.9.10",
57
+ "prettier-plugin-astro": "1.1.2",
58
+ "tsx": "4.23.15",
59
+ "typescript": "6.0.3"
60
+ }
61
+ }
@@ -0,0 +1 @@
1
+ 24.22.2
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,13 @@
1
+ Sproutsite starter templates
2
+ Copyright 2026 Björn Hempel
3
+
4
+ The supplied Astro configuration, route integration, initial example content
5
+ and editorial guidance were created as part of the Sproutsite project.
6
+ They are licensed under the Apache License, Version 2.0.
7
+ See LICENSE-SPROUTSITE for the license text.
8
+
9
+ Original project: https://github.com/sproutsite/sproutsite
10
+ Official website: https://sproutsite.dev
11
+
12
+ This notice covers the original starter files. It does not assign a license
13
+ to the website owner's independently authored content or grant trademark rights.
@@ -0,0 +1,4 @@
1
+ import { defineConfig } from 'astro/config';
2
+ import { createSproutsiteConfig } from 'sproutsite/config';
3
+
4
+ export default defineConfig(createSproutsiteConfig());
@@ -0,0 +1,6 @@
1
+ node_modules/
2
+ dist/
3
+ .astro/
4
+ .env
5
+ .env.*
6
+ !.env.example
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "__PACKAGE_NAME__",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "engines": {
7
+ "node": ">=24.0.0"
8
+ },
9
+ "scripts": {
10
+ "dev": "astro dev",
11
+ "check": "astro check",
12
+ "build": "astro build",
13
+ "preview": "astro preview"
14
+ },
15
+ "dependencies": {
16
+ "sproutsite": "~0.5.8",
17
+ "astro": "^7.4.4",
18
+ "@astrojs/mdx": "^8.1.2"
19
+ },
20
+ "devDependencies": {
21
+ "@astrojs/check": "^0.9.10",
22
+ "typescript": "^6.0.3"
23
+ }
24
+ }
@@ -0,0 +1,3 @@
1
+ import { createSproutsiteCollections } from 'sproutsite/content';
2
+
3
+ export const collections = createSproutsiteCollections();
@@ -0,0 +1,9 @@
1
+ ---
2
+ import SproutsitePage, { getSproutsiteStaticPaths } from 'sproutsite/page';
3
+
4
+ export async function getStaticPaths() {
5
+ return getSproutsiteStaticPaths(__LOCALE_JSON__);
6
+ }
7
+ ---
8
+
9
+ <SproutsitePage {...Astro.props} />
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "astro/tsconfigs/strict"
3
+ }
@@ -0,0 +1,20 @@
1
+ # Redaktionelle Regeln für diese Website
2
+
3
+ Dies ist die eigene Website des Nutzers auf Basis von Sproutsite und Astro. Die installierte Bibliothek liefert Design und Komponenten. Sproutsite enthält keinen KI-Agenten und kein Administrationsbackend; externe Coding-Agenten unterstützen bei der Pflege der Dateien.
4
+
5
+ - Schreibe aus Sicht der Besucher und der Person, die diese Website pflegt. Verwende klares Deutsch, konkrete Aussagen und natürliche Überschriften. Keine erfundenen Fakten, übertriebenen Versprechen, Textwiederholungen oder austauschbaren Werbephrasen.
6
+ - Frage nach fehlenden Angaben zum Unternehmen, statt Kontaktadressen, Preise, Leistungen oder Qualifikationen zu erfinden. Verwende nur freigegebene Bilder und erhalte Lizenz- und Urheberhinweise.
7
+ - Bearbeite bei redaktionellen Aufgaben Inhalte unter `src/content/`, passende Website-Einstellungen und freigegebene Assets. Verändere nicht das installierte Paket und erfinde keine neuen Komponenten, um Inhalte passend zu machen.
8
+ - Allgemeine Einstellungen, Navigation, Produktionsadresse und Footer stehen in `src/content/site.yaml` und `src/content/site.de.yaml`. Halte beide Dateien für diesen einsprachigen Starter synchron. Ersetze `https://example.com` vor der Veröffentlichung durch die echte Adresse.
9
+ - Jede Seite liegt in einem Ordner unter `src/content/pages/`. `page.yaml` definiert die Seite; `page.de.yaml` enthält die deutschen Metadaten. Halte Titel und Beschreibung dieser beiden Dateien gleich. Sichtbare Inhalte stehen in `hero.de.md` und den nummerierten `.de.md`/`.de.mdx`-Dateien. Die Dateinamen folgen dem bestehenden Sprachvertrag von Sproutsite; es gibt keine englische Website.
10
+ - Beginne Sections bei `01` und nummeriere sie lückenlos mit aussagekräftigen Dateinamen. Eine neue Seite erscheint nicht automatisch im Menü.
11
+ - Der Hero liefert die H1. Ohne Hero wird der Seitentitel zur H1. Sections beginnen mit H2; keine weitere H1 ergänzen. Achte auf sinnvolle Überschriften, aussagekräftige Links und passende Alternativtexte bei Bildern.
12
+ - `.md` ist für normales Markdown. `.mdx` darf nur dokumentierte Komponenten aus `sproutsite/components` importieren. Keine Skripte, beliebiges HTML oder eigenes CSS in Inhaltsdateien. Design und Abstände liefern die vorhandenen Komponenten und Tokens.
13
+ - Verwende interne Links relativ zur Website-Wurzel, etwa `/kontakt/`. Lokale Bilder liegen in `_assets/` und werden relativ referenziert. Keine absoluten Entwicklerpfade verwenden.
14
+ - Prüfe Lesereihenfolge, Abstände, Kontraste und Tastaturbedienung auf Desktop und Mobilgeräten. Benenne unklare Texte, schwache Handlungsaufforderungen, Wiederholungen und fehlende Informationen ehrlich und erkläre die konkrete Verbesserung.
15
+ - Führe nach Änderungen `npm run check` und `npm run build` aus. Behaupte keine nicht durchgeführten Prüfungen. Die Vorschau startet mit `npm run dev`. Automatische Prüfungen ersetzen keine visuelle und redaktionelle Kontrolle.
16
+ - Veröffentliche nur mit ausdrücklichem Auftrag. Lade den kompletten `dist/`-Ordner hoch; Fehlerseiten werden zusätzlich beim Hosting eingerichtet. Keine Geheimnisse committen oder das private Website-Paket automatisch auf npm veröffentlichen.
17
+
18
+ Entwicklungsarbeit ist nachrangig und benötigt einen vereinbarten Umfang. Verwende Astro-Standards und TypeScript, erhalte das Inhaltsmodell, nutze dokumentierte Sproutsite-Komponenten und bearbeite `node_modules/` nicht. Erhalte Apache-2.0- und Drittanbieterhinweise weiterverbreiteter Abhängigkeiten. Die Softwarelizenz gewährt keine Markenrechte und legt keine Lizenz für die eigenen Website-Inhalte fest.
19
+
20
+ Referenz: https://sproutsite.dev/de/dokumentation/
@@ -0,0 +1,32 @@
1
+ # Deine Website
2
+
3
+ Diese Website verwendet das Standard-Theme von Sproutsite und einen deutschen Inhaltsstarter. Die deutsche Startseite liegt direkt unter `/`.
4
+
5
+ ```sh
6
+ npm install
7
+ npm run dev
8
+ ```
9
+
10
+ Wenn der Generator die Abhängigkeiten bereits installiert hat, entfällt `npm install`.
11
+
12
+ - `src/content/site.yaml` und `site.de.yaml`: Name, Produktionsadresse, Navigation und Footer. Halte beide Dateien synchron.
13
+ - `src/content/pages/page.yaml` und `page.de.yaml`: Titel und Beschreibung für die Startseite. Halte beide Metadaten-Dateien synchron.
14
+ - `src/content/pages/hero.de.md`: Einleitung und sichtbare H1.
15
+ - Nummerierte `.de.md`- und `.de.mdx`-Dateien: einzelne Inhaltsbereiche ab `01`.
16
+ - `AGENTS.md`: Regeln für die redaktionelle Arbeit mit einem externen Coding-Agenten.
17
+
18
+ Die `.de`-Dateien und die ergänzenden Basis-Metadaten folgen dem Sprachvertrag der bestehenden Sproutsite-Version. Es wird keine englische Website erzeugt. Bei einer neuen Seite lege einen Ordner mit `page.yaml`, `page.de.yaml`, optionalem `hero.de.md` und nummerierten deutschen Sections an. Ergänze bei Bedarf die Navigation in beiden Website-Konfigurationen. MDX kann dokumentierte Komponenten aus `sproutsite/components` verwenden.
19
+
20
+ ```sh
21
+ npm run check
22
+ npm run build
23
+ npm run preview
24
+ ```
25
+
26
+ Setze vor der Veröffentlichung die echte Produktionsadresse. Lade den gesamten `dist/`-Ordner hoch. Er enthält `sitemap.xml`, `404.html` und `500.html`; die Fehlerseiten müssen zusätzlich beim Hosting eingerichtet werden. Der Starter enthält keine Blogartikel. Sproutsite erzeugt derzeit eine leere Blogübersicht und kann vor leeren Blog-Collections warnen. Dies ist eine bekannte Einschränkung der Bibliothek und verhindert den Build nicht.
27
+
28
+ Sproutsite bleibt eine installierte Abhängigkeit; das Theme wird nicht kopiert. Committe nach der Installation auch `package-lock.json`. Der Starter begrenzt Sproutsite-Updates auf die getestete `0.5.x`-Reihe. Prüfe Änderungen, bevor du darüber hinaus aktualisierst.
29
+
30
+ Das Website-Paket ist privat, um eine versehentliche npm-Veröffentlichung zu verhindern. Über die Lizenz deiner eigenen Inhalte entscheidest du selbst. Sproutsite und die ursprünglichen Startervorlagen stehen unter Apache-2.0; für die mitgelieferten Dateien liegen LICENSE-SPROUTSITE und NOTICE-SPROUTSITE bei. Lizenzen von Abhängigkeiten und Markenrechte bleiben getrennt.
31
+
32
+ [Dokumentation](https://sproutsite.dev/de/dokumentation/) · [Komponenten](https://sproutsite.dev/de/showcase/)
@@ -0,0 +1,9 @@
1
+ ---
2
+ tone:
3
+ odd: default
4
+ even: muted
5
+ ---
6
+
7
+ ## Stelle deine Arbeit vor
8
+
9
+ Erkläre deinen Besuchern, wer du bist, was du anbietest und wie du ihnen helfen kannst. Ersetze diesen Text durch eine kurze Vorstellung deiner Website.
@@ -0,0 +1,14 @@
1
+ ---
2
+ tone:
3
+ odd: default
4
+ even: muted
5
+ ---
6
+
7
+ import { Feature } from 'sproutsite/components';
8
+
9
+ ## Fülle die Website mit deinen Inhalten
10
+
11
+ <Feature icon="FilePenLine" title="Beginne mit deinen Texten">
12
+ Bearbeite die Markdown-Dateien in src/content/pages/ und prüfe die
13
+ Änderungen im Browser.
14
+ </Feature>
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: Ein Platz für deine Ideen
3
+ eyebrow: Willkommen
4
+ type: small
5
+ tone: brand
6
+ ---
7
+
8
+ Zeige, woran du arbeitest, und hilf deinen Besuchern, die passenden Informationen zu finden.
@@ -0,0 +1,2 @@
1
+ title: Startseite
2
+ description: Einblicke, Neuigkeiten und nützliche Informationen aus unserem Team.
@@ -0,0 +1,2 @@
1
+ title: Startseite
2
+ description: Einblicke, Neuigkeiten und nützliche Informationen aus unserem Team.
@@ -0,0 +1,16 @@
1
+ name: __SITE_NAME_YAML__
2
+ url: https://example.com
3
+ base: /
4
+ language: de
5
+ locales: [de]
6
+ hero-classes:
7
+ - ss-hero--theme-1
8
+ header:
9
+ links:
10
+ - label: Startseite
11
+ href: /
12
+ footer:
13
+ text: Einblicke, Neuigkeiten und Ideen aus unserem Team.
14
+ links:
15
+ - label: Startseite
16
+ href: /
@@ -0,0 +1,16 @@
1
+ name: __SITE_NAME_YAML__
2
+ url: https://example.com
3
+ base: /
4
+ language: de
5
+ locales: [de]
6
+ hero-classes:
7
+ - ss-hero--theme-1
8
+ header:
9
+ links:
10
+ - label: Startseite
11
+ href: /
12
+ footer:
13
+ text: Einblicke, Neuigkeiten und Ideen aus unserem Team.
14
+ links:
15
+ - label: Startseite
16
+ href: /
@@ -0,0 +1,19 @@
1
+ # Website editorial guidelines
2
+
3
+ This is the user's website, built with Sproutsite and Astro. The installed library provides the design and components. Sproutsite contains no AI agent or administration backend; external coding agents help maintain these files.
4
+
5
+ - Write for visitors and the person maintaining this website. Use clear English, concrete benefits, and natural headings. Avoid invented facts, exaggerated claims, repetitive copy, and generic marketing phrases.
6
+ - Ask for missing business facts instead of inventing contact details, prices, services, or credentials. Use only approved images and preserve licensing and attribution notices.
7
+ - For editorial tasks, edit content under `src/content/`, the relevant website settings, and approved assets. Do not change the installed package or invent new components to make content fit.
8
+ - Global website settings, navigation, production URL and footer belong in `src/content/site.yaml`. Set the real production URL before deployment; `https://example.com` is a placeholder.
9
+ - Each page is a directory under `src/content/pages/` with `page.yaml` (`title` and `description`), optional `hero.md`, and numbered sections starting at `01`. Keep numbering consecutive and descriptive. A new page is not automatically added to the menu.
10
+ - The hero supplies the H1. Without it, the page title becomes the H1. Sections start with H2; do not add another H1. Use meaningful headings, descriptive links and appropriate image alternative text.
11
+ - `.md` is for ordinary Markdown. `.mdx` may import only documented components from `sproutsite/components`. Keep scripts, arbitrary HTML and custom CSS out of content files. Existing components and tokens define the design.
12
+ - Use root-relative internal links such as `/about/`. Local images belong in `_assets/` and are referenced relatively. Do not use absolute developer filesystem paths.
13
+ - Check desktop and mobile reading order, spacing, contrast and keyboard operation. Be candid about unclear copy, weak calls to action, redundant sections and missing information; explain the practical improvement.
14
+ - Run `npm run check` and `npm run build` after edits; do not report checks you did not run. Preview with `npm run dev`. A successful automated check does not replace visual and editorial review.
15
+ - Publish only with the user's explicit request. Deploy the complete `dist/` directory; configure the host's error documents separately. Never commit secrets or automatically publish this private website package to npm.
16
+
17
+ Developer work is secondary and requires an agreed scope. Keep Astro standards and TypeScript, preserve the content model, reuse documented Sproutsite components, and do not edit `node_modules/`. Preserve Apache-2.0 and third-party notices for distributed dependencies; the software license does not grant trademark rights or determine the license of this website's own content.
18
+
19
+ Reference: https://sproutsite.dev/documentation/
@@ -0,0 +1,32 @@
1
+ # Your website
2
+
3
+ This website uses Sproutsite's default theme and an English content starter.
4
+
5
+ ```sh
6
+ npm install
7
+ npm run dev
8
+ ```
9
+
10
+ If dependencies were installed by the generator, skip `npm install`.
11
+
12
+ - `src/content/site.yaml`: website name, production URL, navigation and footer.
13
+ - `src/content/pages/page.yaml`: homepage title and description for search and browser metadata.
14
+ - `src/content/pages/hero.md`: introductory hero and visible H1.
15
+ - Numbered `.md` and `.mdx` files: individual content sections, starting at `01`.
16
+ - `AGENTS.md`: guidance for editorial work with an external coding agent.
17
+
18
+ To add a page, create a directory containing `page.yaml`, an optional hero and numbered sections. Add a navigation link in `site.yaml` if needed. MDX can use documented components from `sproutsite/components`.
19
+
20
+ ```sh
21
+ npm run check
22
+ npm run build
23
+ npm run preview
24
+ ```
25
+
26
+ Set your real production URL before deployment. Deploy the complete `dist/` directory. It contains `sitemap.xml`, `404.html` and `500.html`; configure your host to use the error documents. This starter has no blog articles; Sproutsite currently generates an empty blog overview and may warn about empty blog collections. This is a known library limitation and does not prevent a build.
27
+
28
+ Sproutsite remains an installed dependency, not a copied theme. Commit `package-lock.json` after installation. The starter restricts Sproutsite upgrades to the tested `0.5.x` line; review version changes before upgrading beyond it.
29
+
30
+ The website package is private to prevent accidental npm publication. Your own content remains yours; choose its licensing separately. Sproutsite and the original starter templates are Apache-2.0; see LICENSE-SPROUTSITE and NOTICE-SPROUTSITE for the supplied starter files. Dependency licenses and trademark rights remain separate.
31
+
32
+ [Documentation](https://sproutsite.dev/documentation/) · [Components](https://sproutsite.dev/showcase/)
@@ -0,0 +1,9 @@
1
+ ---
2
+ tone:
3
+ odd: default
4
+ even: muted
5
+ ---
6
+
7
+ ## Introduce your work
8
+
9
+ Tell your visitors who you are, what you offer, and how you can help them. Replace this text with a short introduction to your website.
@@ -0,0 +1,14 @@
1
+ ---
2
+ tone:
3
+ odd: default
4
+ even: muted
5
+ ---
6
+
7
+ import { Feature } from 'sproutsite/components';
8
+
9
+ ## Make this website yours
10
+
11
+ <Feature icon="FilePenLine" title="Start with your content">
12
+ Edit the Markdown files in src/content/pages/ and preview the changes in
13
+ your browser.
14
+ </Feature>
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: A place for your ideas
3
+ eyebrow: Welcome
4
+ type: small
5
+ tone: brand
6
+ ---
7
+
8
+ Share what you are working on and help your visitors find what they need.
@@ -0,0 +1,2 @@
1
+ title: Home
2
+ description: Notes, updates, and useful information from our team.
@@ -0,0 +1,16 @@
1
+ name: __SITE_NAME_YAML__
2
+ url: https://example.com
3
+ base: /
4
+ language: en
5
+ locales: [en]
6
+ hero-classes:
7
+ - ss-hero--theme-1
8
+ header:
9
+ links:
10
+ - label: Home
11
+ href: /
12
+ footer:
13
+ text: Notes, updates, and ideas from our team.
14
+ links:
15
+ - label: Home
16
+ href: /