@samline/astrov7.29.0
OverviewGet startedRecipesBy samlineFAQExamplesDocs

@samline/astro

Explore Astro

Read the setup choices, examples and distribution docs.

  • 01OverviewSee the core setup and project conventions.↗
  • 02Get startedCreate a project and run it locally.↗
  • 03RecipesCreate a project, add Fields or register content.↗
  • 04By samlineExplore interface packages, forms, motion and utilities.↗
  • 05FAQUnderstand setup choices and server requirements.↗
  • 06ExamplesFollow each command, result and next step.↗
  • 07DocsRead setup guides and component API examples.↗

Project resources

  • GitHub↗(opens in a new tab)
  • Docs↗(opens in a new tab)

v7.29.0·MIT

GitHub(opens in a new tab)Get started
Examples

Choose a task. See what changes.

Create the static project first. Then add form controls or local content from the generated project root. Each example gives you the command, generated files and next step.

View the setup examples↓Installation guide↗

Choose npm, pnpm or Bun to run each command. Read the installation guide for requirements and setup options.

Setup examples

Create a project↓Add Fields↓Add content↓
Create a project

Create a static project

Create a projectSetup example

Start with the core configuration and a simple homepage. Optional integrations are omitted until you choose to add them.

Where to run it
The parent folder where you keep your projects.
Before you start
Node 22.23.4 or newer, with your chosen package manager available. Use a new or empty folder named my-site.

npm

Terminal
npx @samline/astro my-site --minimal --deploy static --locale en-us

pnpm

Terminal
pnpm dlx @samline/astro my-site --minimal --deploy static --locale en-us

Bun

Terminal
bunx @samline/astro my-site --minimal --deploy static --locale en-us

What you get

The installer creates my-site with Astro, Tailwind, local fonts, SEO components, a homepage and English dictionaries. Dependency installation uses the selected manager; add --package-manager npm, pnpm or bun to choose explicitly.

Files added or configured
my-site/
  astro.config.mjs
  src/layouts/Main.astro
  src/sections/Home/
  src/i18n/dictionaries/en-us/
  public/img/  public/docs/  public/video/

No server adapter is installed. This project builds files for static hosting; server features need a compatible adapter and runtime.

What to do next

Run cd my-site, then the development command in the generated README (npm run dev, pnpm run dev or bun run dev). Edit src/sections/Home/index.astro to build your homepage.

Read the setup guide↗
Add Fields

Add form controls to an existing project

Add FieldsSetup example

Add Astro components for native form controls, together with @samline/forms and @samline/formatter. You still create the form section and choose its submission handler.

Where to run it
Your generated project root: the folder containing package.json and astro.config.mjs.
Before you start
A project created by this modular installer. Create the project in the first recipe before running add.

npm

Terminal
npx @samline/astro add fields

pnpm

Terminal
pnpm dlx @samline/astro add fields

Bun

Terminal
bunx @samline/astro add fields

What you get

Form, Input, Select and the other Fields components, their styles and API docs, plus the package usage guide in src/forms. Both package dependencies are included.

Files added or configured
src/components/Fields/
src/forms/README.md
src/i18n/dictionaries/<your-locale>/forms/

Dependencies: @samline/forms, @samline/formatter

To add the packages and usage guide without the Fields components, run npx @samline/astro add forms and decline Fields when prompted.

What to do next

Read src/components/Fields/README.md, then compose Form, Input and Button inside your own section. Add labels to your dictionaries and connect an Action or endpoint before expecting submission to work.

Read the setup guide↗
Add content

Add a local articles collection

Add contentSetup example

Register a collection named articles with a schema and local sample data. This prepares content to query; you still build the article list and pages.

Where to run it
Your generated project root: the folder containing package.json and astro.config.mjs.
Before you start
A project created by this modular installer. The collection name articles must not conflict with your own source.

npm

Terminal
npx @samline/astro add content --source local --collection articles

pnpm

Terminal
pnpm dlx @samline/astro add content --source local --collection articles

Bun

Terminal
bunx @samline/astro add content --source local --collection articles

What you get

src/content.config.ts registers articles. The example stores locale, a dictionary copy key, a date and a draft flag in JSON, with display text in the content dictionary. It works offline.

Files added or configured
src/content.config.ts
src/content/articles/
  README.md
  index.ts
  data/

Choose API, Strapi, Shopify or another service when content lives elsewhere. Those examples need your source schema, credentials and explicit activation.

What to do next

Open src/content/articles/README.md for the getCollection example. Query articles from your content section, resolve the sample copy key through the dictionary, then replace the example with your project’s content model.

Read the setup guide↗

These commands prepare source; they do not build a finished contact page or blog. Component docs show the imports, props and section examples you can use next.

See how to use the components↗Read the setup guide↗
@samline/astro

An independent Astro starter from @samline/astro. Choose integrations, work with the generated source, and add more when needed.

v7.29.0·MIT

Explore

DocsInstallation guideWorking examples

Project

Astro skills for AI agentsnpm↗(opens in a new tab)Astro documentationGitHub↗(opens in a new tab)ChangelogLicense and notices↗(opens in a new tab)

© 2026 samline · Made for the open web.

Back to top↑