Get started with Starlight using containers
Getting started with Starlight, a full-featured documentation theme built on top of the Astro framework, using a Node container with Podman or Docker
Published on
You do not need to install Node.js to use Starlight . Using Node.js from an official container is an easy task.
Compared to initialization of an Astro project, for initializing of a Starlight project the main requirement is changing the template to starlight when running npm -y create astro.
A more elegant approach is initializing and developing using scripts.
To initialize a Starlight project just run create_astro_project.sh found in Astro directory from github.com/CalinRadoni/Scripts repository and pass the name of a new directory as parameter.
From the new directory call the scripts as:
./scripts/run_dev.shto start anAstrodevelopment server that listen for live file changes in thesrc/directory and updates the site, like theastro devCLI command. Access the server at http://localhost:4321./scripts/build.shto build the site for production. Use it before pushing your site in production to check for build errors../scripts/preview_build.shstarts anAstrodevelopment server for the site built bybuild.shscript. Access it at http://localhost:4321./scripts/update_node_astro_packages.shto update theNode.jscontainer, the packages and theAstroframework.
If you want more information check the Get started with Astro using containers article.