This project is an implementation of Sitecore JavaScript Services Software Development Kit(SDK) for Astro. It contains Astro components and integration for JSS. It is fully featured SDK. You can use it to build your website with Astro and Sitecore.
- Initialize and start Sitecore instance. Please, follow instruction under Sitecore folder to setup Sitecore instance.
- Open Sitecore Content Editor and check that there is a new SXA managed headless website under path
/sitecore/content/Headless/Astro
- Check your Node version using command
node -v
. If version is lower than 18, please, update it to LTS version 18+. - Change directory to the Astro SDK project
cd ./astro-sitecore-jss/packages/astro-sitecore-jss/
- Install npm packages with
npm install
- Change directory to the Astro sample project
cd ./astro-sitecore-jss/packages/astro-sitecore-jss-sample/
- Install npm packages with
npm install
- Start the project with
npm run dev
command - Open http://localhost:4321 in your browser (If port 4321 is busy, different port will be used)
- Open Sitecore Experience Editor for item
/sitecore/content/Headless/Astro/home/styleguide
- Create Sitecore Headless website. You can use any approach:
- SXA managed approach
- Config manages site
- Open command line
- Run
npx @astro-sitecore-jss/create-astro-sitecore-jss@latest
- Follow instructions
- Change directory to the created project
- Start website with
npm run dev
- Run
npm run build
command to build the project - Copy
./dist
folder to your web server
Astro support deployment to many platforms. Please, follow Astro documentation to deploy your website. Some examples:
Currently, the project supports only the Sitecore first approach. You are not able to push items to Sitecore from code. Please follow the instructions in the Sitecore folder to set up the Sitecore instance. It is Docker based, so you can easily run it locally with a few commands.
If you would like to see the demo, please contact
- Sitecore JavaScript Software Development Kit for Astro, EXDST blog
- Interactive React Islands with Sitecore and Astro, EXDST blog
- Interactive Vue Islands with Sitecore and Astro, EXDST blog
- Interactive Angular Islands with Sitecore and Astro, EXDST blog
- Sitecore XM Cloud and Astro Web Framework, EXDST blog
- Starting Your First Sitecore Astro Project, EXDST blog
- Creating Your First Sitecore Astro Rendering, EXDST blog
- Migration of Sitecore Vue Website to Astro, EXDST blog
- Migration of Sitecore React Website to Astro, EXDST blog
- Astro + React + Angular together, EXDST blog
- Deploy Astro to XM Cloud, EXDST blog
- Sitecore + Astro, Youtube, SUG Latam
- Sitecore Headless Software Development Kit for Astro, Youtube, SUGCON
You can see Astro together with Sitecore in action in this repository. It is a fork of the Sitecore Next.js Demo website, reimplemented on Astro, which proves Astro capabilities and better Astro performance compared to Next.js.
- Anton Tishchenko, GitHub, LinkedIn
- Bogdan Druziuk, GitHub, LinkedIn
- Oleksandr Melnyk, GitHub
- Stanislav Chernetsky, GitHub
- Vasyl Gavrylyuk, GitHub
- Vadym Shcherban, GitHub
Sponsored by EXDST