@cj.lim/astro-fox v0.1.0

Astro Fox š¦
Astro Fox is a fast and lightweight Astro template generator for blogs and portfolios. Easily start your project with CLI tools and quickly build a personal site with blog, log, and project sections.
⨠Features
- š CLI Generator: Create new projects with simple commands
- šÆ Perfect Performance: Lighthouse 100/100 score
- š SEO Optimized: Built-in SEO best practices (meta tags, Open Graph, sitemaps)
- š Dark/Light Mode: Automatic detection of system theme with manual toggle
- š± Responsive Design: Optimized experience on all devices
- š Integrated Search: Fast content search with pagefind
- š Markdown & MDX: Convenient content writing
- š§© Modular Components: Built with SolidJS components
- šØ Smooth Animations: Appropriate transition effects
- š RSS Feed: Automatically generated RSS feed
ā Performance

Perfect Lighthouse scores across all categories: Performance, Accessibility, Best Practices, and SEO.
š Getting Started
Start with CLI
# Install globally with npm
npm install -g @cj.lim/astro-fox
# Create a new project
astro-fox init my-blog
# Navigate to project folder
cd my-blog
# Start development server
pnpm run devStart with Clone
Astro Fox uses pnpm by default, but supports all major package managers (npm, yarn, pnpm). Choose one package manager and use it consistently throughout these commands.
# Clone repository
git clone https://github.com/LimChaeJune/astro-fox
# Navigate to project folder
cd astro-fox
# Install dependencies with your preferred package manager
pnpm install
# Start development server
pnpm run dev
# Build for production
pnpm run buildAvailable Scripts
The following scripts are available regardless of which package manager you choose:
# Start development server
pnpm run dev
# Build for production
pnpm run build
# Preview production build
pnpm run preview
# Run ESLint
pnpm run lint
# Fix ESLint issues
pnpm run lint:fix
# Format code with Prettier
pnpm run format
# Check formatting with Prettier
pnpm run format:checkš Project Structure
/
āāā cli/ # CLI tools
āāā public/
ā āāā fonts/ # Web fonts
ā āāā js/ # Client scripts
āāā src/
ā āāā app/
ā ā āāā components/ # App common components
ā ā āāā layouts/ # Layout components
ā ā āāā styles/ # Global styles
ā āāā components/
ā ā āāā blog/ # Blog-related components
ā ā āāā log/ # Log-related components
ā ā āāā project/ # Project-related components
ā ā āāā common/ # Common UI components
ā ā āāā about/ # About page components
ā āāā content/
ā ā āāā blog/ # Blog posts (Markdown/MDX)
ā ā āāā log/ # Log entries (Markdown/MDX)
ā ā āāā projects/ # Project information (Markdown/MDX)
ā āāā pages/ # Astro pages
ā āāā index.astro # Home page
ā āāā blog/ # Blog pages
ā ā āāā index.astro # Blog list page
ā ā āāā [...slug].astro # Dynamic blog post page
ā āāā log/ # Log pages
ā ā āāā index.astro # Log list page
ā ā āāā [...slug].astro # Dynamic log entry page
ā āāā projects/ # Project pages
ā ā āāā index.astro # Project list page
ā ā āāā [...slug].astro # Dynamic project detail page
ā āāā about/ # About page
ā āāā index.astro # About page
āāā package.jsonDynamic Routes with ...slug
The [...slug].astro files are used for dynamic routing in Astro:
š CLI Usage Guide
Astro Fox CLI is a tool for quickly creating and configuring new projects.
# install @cj.lim/astro-fox
npm install -g @cj.lim/astro-fox
# Create a new project
astro-fox init <project-name>
# Create a new blog post
astro-fox blog "My New Post" -d "A short description" -t "tag1,tag2"
# Create a new log entry
astro-fox log "Daily Log" -d "What I did today" -t "work,learning"
# Create a new project entry
astro-fox projects "Project Alpha" -d "Details about the project" -c "MyCompany" -s "2024-01-01" -e "2024-12-31"
# View help
astro-fox --help
# Check version
astro-fox --versionš§ Customization
Content Writing
All blog posts are stored in src/content/blog as Markdown or MDX files. Each post needs frontmatter with the following fields:
---
title: "Post Title"
summary: "Brief description"
date: 2024-04-07
tags: ["astro", "web development"]
categories: "category"
image: "image-path" # optional
draft: true # optional
---
Content goes here...The frontmatter schema is defined in src/content/config.ts using Astro's Content Collections API. You can check and modify the schema definitions there.
Logs and Projects
- Logs are stored in
src/content/log. - Projects are stored in
src/content/projects.
Styling
This template uses TailwindCSS. You can customize the theme by editing tailwind.config.mjs.
š ļø Key Configuration Files
These files should be modified to personalize your site:
Astro Configuration - astro.config.mjs
export default defineConfig({
site: "https://yourdomain.com", // Replace with your domain
build: {
format: "file", // build format
inlineStylesheets: "auto", // css optimization
},
});Favicon Image - public/favicon.svg
Content Collection Schema - src/content/config.ts
Colors, Fonts and Design Elements - tailwind.config.mjs
š¢ Deployment
Astro Fox is based on static site generation (SSG) and can be easily deployed to various hosting services:
- Vercel: Connect Git repository for automatic deployment
- Netlify: Connect Git repository or deploy with drag-and-drop
- Cloudflare Pages: Connect Git repository for automatic deployment
š Acknowledgement
Theme inspired by Astro Sphere.
š License
MIT
8 months ago