This is a Hexo-based blog using the Cactus theme with a custom paper-dark color scheme.
- Node.js (v22.11 as specified in netlify.toml)
- npm
# Install dependencies
npm install
# Start local server with live reload
hexo server
# Create new draft post
hexo new draft "My Post Title"
# Create new page
hexo new page "page-name"
# Generate static files
hexo generate
# Clean generated files
hexo clean
# Start local server with drafts enabled
hexo server --draft
# Watch for changes
hexo server --watch
The site will be available at http://localhost:4000
# Create a draft post (goes to source/_drafts)
hexo new draft "My New Post"
# Create a page (goes to source/page-name/index.md)
hexo new page "page-name"
# Publish a draft
mv source/_drafts/post-name.md source/_posts/
---
title: Your Title
date: YYYY-MM-DD HH:mm:ss
tags:
- tag1
- tag2
categories:
- category
description: Brief description of your post
preview: /path/to/preview/image (optional)
---
Edit source/_data/projects.json
to update the projects list. Format:
[
{
"name": "Project Name",
"url": "project-url",
"desc": "Project description"
}
]
# Clean and generate
hexo clean && hexo generate
# Deploy to Netlify
git add .
git commit -m "Your commit message"
git push
Netlify will automatically deploy when changes are pushed to the main branch.
- Main theme config:
themes/cactus/_config.yml
- Color scheme:
themes/cactus/source/css/_colors/paperdark.styl
- Site config:
_config.yml
source/
├── _posts/ # Published posts
├── _drafts/ # Draft posts
├── about/ # About page
├── images/ # Image assets
└── _data/ # Data files (projects.json)
- Use
<!--more-->
in posts to set excerpt break points - Images should be placed in
source/images/
- Draft posts won't show up in production but will show locally with
--draft
flag - YouTube videos can be embedded using:
{% youtube video-id %}
- The theme supports Font Awesome icons
- Tags and categories are case-sensitive
If things aren't working:
- Delete
db.json
- Run
hexo clean
- Delete
node_modules
and runnpm install
- Start fresh with
hexo server
Remember to check Node.js version if there are unexpected errors.