Your First Site Configuration
Your First Site Configuration
Section titled “Your First Site Configuration”In about five minutes, validate a site configuration without a CMS or deployment. The packages use GitHub Packages. Prerequisites: Bun, access to the package registry, and registry authentication configured outside source files. Examples use fictional site identifiers and reserved example domains.
1. Create a project
Section titled “1. Create a project”mkdir site-democd site-demobun init -yExpected result: Bun creates package.json and the starter project files.
2. Install the framework
Section titled “2. Install the framework”bun add @dataarthub/eaos-host-site-astro astroExpected result: Bun reports both packages installed and writes the lockfile.
3. Save the configuration
Section titled “3. Save the configuration”Create example.ts with this content:
import { defineSite } from '@dataarthub/eaos-host-site-astro/config';
const site = defineSite({ id: 'example', revision: 1, content: { snapshot: { siteId: 'example', revision: 1, posts: [], assets: [] } },});console.log(site.id, site.revision); // example 1Expected result: example.ts contains the inline snapshot and matching site identity.
4. Run it
Section titled “4. Run it”bun example.tsExpected output:
example 1You now have a validated site configuration. This exercise validates configuration only; rendering pages requires Astro pages and the build entry point documented in the API reference.