Export
Push your Pagesmith site code to GitHub. Available on Pro plans and above.
Pagesmith lets you push your site’s source code directly to a GitHub repository, giving you full ownership of the code. Sites are generated as Astro projects — standard, portable, and deployable anywhere Astro runs.
GitHub export is available on Pro plans and above.
GitHub Integration
Connect your GitHub account to push your site code to a repository.
Connecting GitHub
- Open your project in the AI Editor
- Go to Workspace → GitHub
- Click Connect GitHub
- Authorize Pagesmith to access your GitHub account
- Select or create a repository for your project
Pushing Your Code
Once connected:
- Go to Workspace → GitHub
- Click Push to GitHub
- Your site code is committed and pushed to the connected repository
You can push as often as you like — each push includes the latest changes made in Pagesmith. The repository becomes a mirror of your site’s source.
Two-Way Sync
Pagesmith also supports pulling changes back from GitHub. If you edit code locally and push to the connected repository, you can pull those changes into Pagesmith from the GitHub panel. See the GitHub integration guide for details on the bidirectional sync flow.
What Gets Exported
Your repository contains a complete Astro project:
src/pages/— Page routes (.astrofiles)src/components/— Reusable componentssrc/layouts/— Page layouts (BaseLayout, BlogLayout)src/content/— Content collections (blog posts, docs)src/styles/global.css— Global Tailwind stylespublic/— Static assets (images, fonts)astro.config.mjs— Astro configurationpackage.json— Dependencies- TypeScript config —
tsconfig.jsonand type definitions
The project uses Tailwind CSS, the @astrojs/cloudflare adapter (so it deploys to the same stack Pagesmith uses), and standard Astro tooling.
Using Your Exported Code
After pushing, you can:
- Clone the repository to your local machine
- Run locally with
npm install && npm run dev - Build for production with
npm run build(static output goes todist/) - Customize the code in your preferred editor
- Continue development with your own team
Deployment Options
The exported Astro project works with any Astro-compatible host:
Recommended:
- Pagesmith — keep using Pagesmith’s built-in hosting (Cloudflare Workers + automatic SSL)
- Cloudflare Workers / Pages — same stack Pagesmith uses, no adapter changes needed
Other options (require swapping the Astro adapter):
- Netlify — switch to
@astrojs/netlify - Vercel — switch to
@astrojs/vercel - Any Node.js host — switch to
@astrojs/node
Switching adapters means updating astro.config.mjs and reinstalling dependencies. See the Astro deployment docs for adapter-specific instructions.
Keeping Code in Sync
You can push as many times as you like to keep your GitHub repository updated with changes made in Pagesmith. Each push includes the latest version of your site.