Skip to content

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.

Terminal window
mkdir site-demo
cd site-demo
bun init -y

Expected result: Bun creates package.json and the starter project files.

Terminal window
bun add @dataarthub/eaos-host-site-astro astro

Expected result: Bun reports both packages installed and writes the lockfile.

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 1

Expected result: example.ts contains the inline snapshot and matching site identity.

Terminal window
bun example.ts

Expected output:

example 1

You 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.