A fully static Astro site that reads public content from WordPress at build
time with @spacefast/wordpress, then publishes the generated dist/
directory on Spacefast.
The demo defaults to
https://staticspacefastdemo.mystagingwebsite.com for local development.
Set WORDPRESS_URL to use another WordPress site. On Spacefast, configure the
WordPress site in Space settings → Data sources; the SDK automatically uses
the injected SPACEFAST_DATA_SOURCES value.
bun install
bun run devProduction output is static HTML:
bun run build- Create a Space from this repository. Build command:
bun run build; output directory:dist. - Add the WordPress origin as the default public WordPress data source in the Spacefast dashboard.
- In WordPress, install the Spacefast plugin, choose Headless CMS, continue to Spacefast, authorize the Team, and select this Space.
- Publish or edit public content. The plugin waits until changes have been quiet for 60 seconds, then starts one production build. Build now in WordPress or the Spacefast dashboard remains immediate.
Drafts, autosaves, revisions, and wp-admin page navigation do not trigger builds. The repository contains no WordPress or Spacefast credentials.
/— WordPress-backed home and latest posts/blog/and/blog/[slug]/— all published posts/category/[slug]/— published categories/[slug]/— published WordPress pages/case-studies/[slug]/— the customcase_studyREST collection/resources/[slug]/— the customresourceREST collection/launch-notes/[slug]/— the customlaunch_noteREST collection