This is the source code for my personal blog built with Hexo and using a customized version of the Cactus theme, added as a Git submodule.
Since this project uses a submodule for the theme, make sure to clone it recursively:
git clone --recurse-submodules https://github.com/your-username/your-blog-repo.git
cd your-blog-repoIf you already cloned it without --recurse-submodules, run:
git submodule update --init --recursiveTo create a new blog post, run:
npx hexo new "your-post-title"For example:
npx hexo new "Getting Started with Hexo"This will create a new Markdown file under the source/_posts/ directory. You can then edit the file and write your content in Markdown.
If you want to apply updates from your customized theme repo, run:
cd themes/cactus
git pull origin main
cd ../..Then commit the updated submodule reference:
git add themes/cactus
git commit -m "Update cactus theme submodule"
git pushTo preview your blog locally:
npm install
npx hexo serveThen open http://localhost:4000 in your browser.