Skip to content

exdst/jss-astro-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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, 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.

NPM packages

Contacts

If you would like to see demo, please, contact

Contributors

Sponsored by EXDST