OnWritingCode / simple-blog-template

A starting point for a static markdown blog with Astro.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ›Έ Simple Blog Template

Demo πŸ‘€

This is a starter template for starting a blog with Astro.js with a few basic utilities to get you started.

Features

  • Full Markdown support.
  • Separation between Markdown files and Astro pages
  • Drafts directory for posts that aren't published yet
  • Syntax Highlighting with Shiki
  • Global styles directory
  • RSS 2.0 generation

Languages

  • TypeScript
  • Sass (scss)

πŸš€ Quick Start

Setup Astro in a new project using this template:

# Initialize with the template:
npm init astro -- --template OnWritingCode/astro-blog
npm install
npm run dev

That's it! For Astro documentation, visit: https://docs.astro.build

πŸ’‘ Project Structure

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

/
β”œβ”€β”€ public
└── src
    β”œβ”€β”€ components
    β”‚   β”œβ”€β”€ layouts
    β”‚   └── utilities
    β”œβ”€β”€ content
    β”œβ”€β”€ pages
    └── style
  • pages - This directory is significant for Astro. Files here become URLs.
  • components - Template parts, layouts, utilities, all go here.
  • content - Keep the content separate from the system for clearer separation.
  • style - Global SCSS styles.
  • public - A directory where to place any static files that need to be used on the site.

🧞 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:3000
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying

πŸ‘€ Want to learn more?

Feel free to check out Astro documentation or jump into Astro's Discord server.

About

A starting point for a static markdown blog with Astro.js


Languages

Language:Astro 42.1%Language:SCSS 32.0%Language:TypeScript 17.9%Language:JavaScript 8.0%