0.13.4 • Published 8 months ago

create-astro-starter v0.13.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Astro Starter Kit

Open in StackBlitz Open with CodeSandbox Open in GitHub Codespaces

Features:

  • ✅ Tailwind CSS
  • ✅ Alpine js
  • ✅ Typescript
  • ✅ Localization (with astro-i18n-aut)
  • ✅ Dark/light mode
  • ✅ Blog
  • ✅ Discussions (thanks to giscus)
  • ✅ CMS for editing blog post (thanks to decap CMS)
  • ✅ Sitemap (localized)
  • ✅ RSS (localized)
  • ❌ PWA (Follow tutorial below to add it)

🧞 Commands

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

CommandAction
pnpm installInstalls dependencies
pnpm devStarts local dev server at localhost:4321
pnpm buildBuild your production site to ./dist/
pnpm previewPreview your build locally, before deploying
pnpm astro ...Run CLI commands like astro add, astro check
pnpm astro -- --helpGet help using the Astro CLI

If you want to switch to npm make sure to remove pnpm-lock.yaml and node_modules folder and then run npm install

How to add PWA

TBD

🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

├── public/
├── src/
│   ├── components/
│   ├── content/
│   ├── layouts/
│   ├── locales/
│   ├── middleware/
│   ├── pages/
│   ├── styles/
│   ├── utils/
│   └── consts.ts/
├── astro.config.mjs
├── README.md
├── package.json
├── .prettierrc
├── tailwind.config.cjs
└── 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.

The src/content/ directory contains "collections" of related Markdown and MDX documents. Use getCollection() to retrieve posts from src/content/blog/, and type-check your frontmatter using an optional schema. See Astro's Content Collections docs to learn more.

Any static assets, like images, can be placed in the public/ directory.

✍️ Admin dashboard

You can access the admin dashboard for editing blog post at /admin (https://example.com/admin)

For more information follow Decap CMS documentation at https://decapcms.org/docs/

In order to access the admin dashboard to change blog articles content you need to have access to the github repo, a quick way to test it test would be fork the repo and than configure decap cms accordingly to your cloud provider (netlify, cloudflare, vercel, etc...).

If you use cloudflare pages you can follow this guide https://github.com/i40west/netlify-cms-cloudflare-pages.

In this case your environment variable should look like this

Cloudflare environment variable image

If you use netlify it's actually easier, you will need to change in the file astro.config.mjs NetlifyCMS config config.backend.name to git-gateway. (See https://decapcms.org/docs/git-gateway-backend/#git-gateway-with-netlify for more info)

👀 Want to learn more?

Check out Astro documentation or jump into Astro Discord server.

0.13.4

8 months ago

0.13.3

8 months ago

0.13.2

8 months ago

0.13.1

8 months ago

0.13.0

8 months ago

0.12.1

8 months ago

0.12.0

8 months ago

0.11.2

8 months ago

0.11.1

8 months ago

0.11.0

8 months ago

0.10.0

8 months ago

0.9.2

8 months ago

0.9.1

8 months ago

0.9.0

8 months ago

0.8.2

8 months ago

0.8.1

8 months ago

0.8.0

8 months ago

0.7.0

8 months ago

0.6.0

8 months ago

0.5.0

8 months ago

0.4.0

8 months ago

0.3.0

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago

0.0.20

8 months ago

0.0.19

8 months ago

0.0.18

8 months ago

0.0.17

8 months ago

0.0.16

8 months ago

0.0.15

8 months ago

0.0.8

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago