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, project supports only Sitecore first approach. You are not able to push items to Sitecore from code. Please, follow instruction under Sitecore folder to setup Sitecore instance. It is Docker based, so you can easily run it locally with a few commands.
If you would like to see demo, please, contact
- Anton Tishchenko, GitHub, LinkedIn
- Bogdan Druziuk, GitHub, LinkedIn
- Oleksandr Melnyk, GitHub
- Stanislav Chernetsky, GitHub
- Vasyl Gavrylyuk, GitHub
Sponsored by EXDST