Skip to content

Latest commit

Β 

History

History
94 lines (79 loc) Β· 3.43 KB

README.md

File metadata and controls

94 lines (79 loc) Β· 3.43 KB

Cloudstrap Theme for Astro

Netlify StatusGitHub last commit

npm create astro@latest -- --template hvxley/cloudstrap

This free Astro starter template brings Bootstrap, Astro-Icons, and Sass to your project.

Check back again soon!

Features:

  • Astro v4.9
  • Bootstrap v5.3
  • Color mode featuring Light, Dark, and Auto.
  • Icon Pack from astro-icons, iconify, and remix
  • Mobile-first design
  • SEO Optimization
  • Netlify-ready Contact Form with Recaptcha
  • Sitemap

Project structure

Inside Cloudstrap template, you'll see the following folders and files:

/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ favicons/
β”‚   β”‚   └── favicon.svg
β”‚   β”œβ”€β”€ bootstrap-logo-white.svg
β”‚   β”œβ”€β”€ lighthouse.png
β”‚   β”œβ”€β”€ humans.txt
β”‚   └── robots.txt
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ColorModeButton.astro
β”‚   β”‚   β”œβ”€β”€ ColorModeGraphics.astro
β”‚   β”‚   β”œβ”€β”€ FormattedDate.astro
β”‚   β”‚   β”œβ”€β”€ Footer.astro
β”‚   β”‚   β”œβ”€β”€ Meta.astro
β”‚   β”‚   └── Navbar.astro
β”‚   β”œβ”€β”€ content/
β”‚   β”‚   β”œβ”€β”€ blog/
|   β”‚   β”‚   β”œβ”€β”€ bootstrap-cheatsheet.md
|   β”‚   β”‚   └── bootstrap-grid.md
β”‚   β”‚   └── config.ts
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   β”œβ”€β”€ BlogPost.astro
β”‚   β”‚   └── Layout.astro
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€blog/
|   β”‚   β”‚   β”œβ”€β”€ [...slug].astro
|   β”‚   β”‚   └── index.astro
β”‚   β”‚   β”œβ”€β”€ about.astro
β”‚   β”‚   β”œβ”€β”€ index.astro
β”‚   β”‚   └── thankyou.astro
β”‚   β”œβ”€β”€ scripts/
β”‚   β”‚   β”œβ”€β”€ bs-initial.js
β”‚   β”‚   └── color-modes.js
β”‚   β”œβ”€β”€ styles/
β”‚   β”‚   └── stylesheet.scss
β”‚   └── env.d.ts
β”œβ”€β”€ .gitignore
β”œβ”€β”€ astro.config.mjs
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ tsconfig.json
└── ...

Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.

There's nothing special about src/components/, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the public/ directory if they do not require any transformation or in the assets/ directory if they are imported directly.

Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:4321
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI

To generate a new Sitemap, update your domain URL in astro.config.mjs and run npm run build.

Lighthouse Score

Lighthouse Score