Skip to content

exdst/jss-astro-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sitecore JavaScript Software Development Kit for Astro

Library Astro projct initializer PRs Welcome

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.

Project structure

Development usage

  1. Initialize and start Sitecore instance. Please, follow instruction under Sitecore folder to setup Sitecore instance.
  2. Open Sitecore Content Editor and check that there is a new SXA managed headless website under path /sitecore/content/Headless/Astro
  3. Check your Node version using command node -v. If version is lower than 18, please, update it to LTS version 18+.
  4. Change directory to the Astro SDK project cd ./astro-sitecore-jss/packages/astro-sitecore-jss/
  5. Install npm packages with npm install
  6. Change directory to the Astro sample project cd ./astro-sitecore-jss/packages/astro-sitecore-jss-sample/
  7. Install npm packages with npm install
  8. Start the project with npm run dev command
  9. Open http://localhost:4321 in your browser (If port 4321 is busy, different port will be used)
  10. Open Sitecore Experience Editor for item /sitecore/content/Headless/Astro/home/styleguide

Production usage

Installation for production usage

  1. Create Sitecore Headless website. You can use any approach:
  2. Open command line
  3. Run npx @astro-sitecore-jss/create-astro-sitecore-jss@latest
  4. Follow instructions
  5. Change directory to the created project
  6. Start website with npm run dev

Production build

  1. Run npm run build command to build the project
  2. Copy ./dist folder to your web server

Astro support deployment to many platforms. Please, follow Astro documentation to deploy your website. Some examples:

  1. Netlify
  2. Vercel
  3. AWS
  4. Azure

Installation for development and contribution

Sitecore

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.

NPM packages

Contacts

If you would like to see the demo, please contact

Articles

  • 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

Demo Website

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.

Contributors

Sponsored by EXDST