Repository navigation
v0.0.1
First published release of AstroSharp — write the coded parts of Astro in C#.
Components and pages in Razor, plus loaders, actions, endpoints and middleware in plain C#, running
against Astro's own routing, content collections, asset pipeline and action handling.
Installing
npm install astrosharpimport { defineConfig } from 'astro/config';
import astrosharp from 'astrosharp';
export default defineConfig({ integrations: [astrosharp()] });Requires the .NET SDK 10 or newer on your PATH as dotnet, and Node 20 or newer.
What's in it
.razorpages and components, with C#.csfiles compiled alongside them- Content collection loaders, including live collections
- Actions, with input types reflected into schemas and form/file handling
- Endpoints, static and dynamic, with
getStaticPaths - Middleware
- Scoped
<style>blocks lifted through Vite into the document head - Generated TypeScript types for component props and collection entries
- An experimental WASI render mode compiled on the user's machine
Supported Astro versions
Astro 5 and above. The declared peer range is held honest by a CI job that builds fixtures against
an actual Astro 5 on every push, rather than by assertion.
Package size
389 kB packed, 1.1 MB unpacked. The .NET sidecar is three assemblies, all of them AstroSharp's own —
no third-party runtime dependencies ship with it.
Provenance
Published from GitHub Actions with npm provenance, from the exact tarball CI built, installed
outside the workspace and used to build a real site before publishing.