- blog writeup https://jldec.me/blog/astro-v5-blog-starter
- preview https://astro-v5-blog-starter.jldec.me/
- screenshot
- Image optimization with
<Image>
- Tailwind CSS
- Blog authoring with Markdown
├── LICENSE
├── README.md
├── astro.config.mjs
├── package.json
├── public
│ ├── _headers
│ └── favicon.svg
├── src
│ ├── assets
│ │ └── astro.svg
│ ├── components
│ │ └── AstroLogo.astro
│ ├── content
│ │ ├── blog
│ │ │ ├── 2nd-post.md
│ │ │ └── first-post.md
│ │ └── images
│ │ ├── birch-trees.webp
│ │ └── sunset-cambridge.jpg
│ ├── content.config.ts
│ ├── layouts
│ │ └── Layout.astro
│ ├── pages
│ │ ├── 404.astro
│ │ ├── blog
│ │ │ └── [id].astro
│ │ └── index.astro
│ └── styles
│ └── global.css
├── tailwind.config.mjs
├── tsconfig.json
└── wrangler.toml
Command | Action |
---|---|
pnpm install |
Installs dependencies |
pnpm dev |
Starts local dev server at localhost:4321 |
pnpm build |
Build your production site to ./dist/ |
pnpm preview |
Preview your build locally, before deploying |
Cloudflare Pages will auto-build and republish on every commit if you link to your git repo.
Alternatively, you can push builds directly from your local machine using Wrangler.
- Modify the name in
wrangler.toml
to suit your project pnpm wrangler login
- authenticates with Cloudflare (one time)pnpm ship
- runs astro build && wrangler pages deploy
Tip
Set the site name in astro.config
to generate canonical URLs.
Copyright (c) 2024-present, Jürgen Leschner (@jldec) MIT License