This is my personal website and blog built with Astro, a modern static site generator that delivers lightning-fast performance by shipping minimal JavaScript.
The site follows a standard Astro structure:
src/pages
- All content pages and blog postssrc/layouts
- The main Layout component used across the sitesrc/components
- Reusable UI components
The theme uses a customized dark/light mode toggle with Tailwind for styling and includes responsive design throughout.
# Install dependencies
npm install
# Start the development server
npm run dev
# Build for production
npm run build
# Preview the production build
npm run preview
To create a new blog post:
-
Create a new Markdown file in the
src/pages/posts/
directory following this naming convention:YYYY-MM-DD-post-title-slug.md
-
Add the required frontmatter at the top of your file:
--- title: Your Post Title date: YYYY-MM-DD description: A brief description of your post --- # Your Post Title Post content goes here...
-
Write your content using standard Markdown syntax.
-
Posts are automatically routed to
/YYYY/MM/DD/post-title-slug
and will appear on the homepage and blog index page when built.
The site uses Tailwind CSS with a custom color scheme:
- Primary: Dark theme background
- Secondary: Dark accents
- Accent/Highlight: Gold accents for buttons and links
The typography is enhanced with the @tailwindcss/typography
plugin for rich text styling in blog posts.
This site is deployed on Netlify, which automatically builds and deploys the site when changes are pushed to the main branch.
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 |