How was this blog built

基于hexo framework, windows

npm源在国外,懂得都懂

配置代理或用cnpm/淘宝源

1
2
3
4
5
npm config set proxy=
npm config set https-proxy=

npm config set registry http://registry.npm.taobao.org/
npm config set registry https://registry.npmjs.org/

然而hexo发展很快,cnpm可能跟不上,有条件最好用npm

Install hexo

1
cnpm install -g hexo-cli

Init blog

在要创建博客的文件夹下

1
hexo init

这里会先clone仓库再安装依赖

如果卡git clone,检查下代理设置(npm,git)

如果卡install dependencies或者直接失败,一般还是代理问题。可以Ctrl+C先杀死进程,再:

1
cnpm install

所以在赤旗插遍全球之前有些技能还是得掌握的(

Start blog

1
hexo s

比如:

1
2
3
4
$ hexo s
INFO Validating config
INFO Start processing
INFO Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.

此时访问本地4000端口,可以看到hello world博客文章的界面:

image-20250715093844826

可用于预览博客在浏览器上的效果。

Create a new article

1
hexo n "title"

比如:

1
2
3
$ hexo n "My test article"
INFO Validating config
INFO Created: D:\Blog\source\_posts\My-test-article.md

此时可看到\source\_posts\My-test-article.md文件已创建

现在对其进行编辑:

image-20250715095230842

现在先回退到blog下,然后:

1
2
hexo clean
hexo g

启动看下效果:

image-20250715095555855

好吧貌似LaTeX没法渲染,研究下怎么弄。

draft

有时候不希望直接发布写了一半的草稿,这时可以使用命令:

1
hexo new draft <title>

来创建新草稿,内容在source/_draft文件夹。

正式推送:

1
hexo publish <title>

预览时渲染草稿:

1
hexo s --draft

deploy the blog

没有服务器那只好部署到github了

创建一个New repository, 名称为nickname.github.io

下载git部署插件:

1
cnpm install --save hexo-deployer-git

配置_config.yml,底部deploy:如下配置:

1
2
3
4
deploy:
type: 'git'
repo: 'https://github.com/murasame-mio-misaki/murasame-mio-misaki.github.io.git' #link of repo
branch: 'master'

然后

1
hexo d

部署,就会自动将渲染好的博客前端push向仓库

通过nickname.github.io 这个域名来访问即可

custom theme

先套github主题后面慢慢玩吧。

用了一下fluid主题,挺喜欢的,那就你了。

按照主题官方文档配置可以支持LaTeX,mermaid等。

update pictures

关于Hexo+Typora工作流中上传图片的问题:

hexo与typora结合 | 九日的个人博客


How was this blog built
https://murasame-mio-misaki.github.io/2025/07/15/Blog/
Author
Miss.M
Posted on
July 15, 2025
Licensed under