Astro Advanced Blog Template
# Using NPM
npm init astro -- --template redwerkz/astro-advanced-blog-template
# Using Yarn
yarn create astro -- --template redwerkz/astro-advanced-blog-template
# Using PNPM
pnpm create astro -- --template redwerkz/astro-advanced-blog-template
- 🚀 Astro 1.0 Static Site Generation (SSG)
- 💯 Full Score on performance + all Web Core Vitals
- 👌 Zero JS runtime
- 🌑 Dark Mode
- ⭐ Next-Gen favicons (SVG+PNG)
- 📈 SEO-friendly setup with canonical URLs and OpenGraph data
- 📝 Full Markdown support (MDX)
- 🗺 Sitemap generation
- 🗜️ Site compression
- ⬆️ Deploy to Netlify, Vercel or FTP
- 🤖 robots.txt
- 🌐 RSS 2.0 generation
Inside of your Astro project, you'll see the following folders and files:
/
├── public/
│ ├── assets/
│ │ └── icons/
│ │ ├── favicon_dark-16.png
│ │ ├── favicon_dark-16.png
│ │ ├── favicon_light-16.png
│ │ ├── favicon_light-16.png
│ │ └── favicon.svg
│ └── robots.txt
├── src/
│ ├── components/
│ │ ├── BaseHead.astro
│ │ ├── Bio.astro
│ │ ├── Footer.astro
│ │ ├── Header.astro
│ │ ├── Logo.astro
│ │ └── Nav.astro
│ ├── data/
│ │ └── blog-posts/
│ | ├── hello-world.md
│ | └── markdown-test.md
│ ├── layouts/
│ | └── BaseLayout.astro
│ ├── pages/
│ | ├── blog/
│ | | ├── [slug].astro
│ | | └── index.astro
│ | ├── about.astro
│ | └── index.astro
│ ├── styles/
│ | ├── fonts.css
│ | └── global.css
│ └── utils/
│ └── getPostData.ts
├── .gitignore
├── .npmrc
├── astro.config.mjs
├── deploy.js
├── LICENSE
├── pnpm-lock.yaml
├── README.md
├── package.json
└── 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.
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
pnpm install |
Installs dependencies |
pnpm run dev |
Starts local dev server at localhost:3030 |
pnpm run build |
Build your production site to ./dist/ |
pnpm run preview |
Preview your build locally, before deploying |
pnpm deploy |
Deploy your build via FTP |
Feel free to check Astro's documentation or jump into Astro's Discord server.