使用Hexo生成博客

使用Hexo生成博客

  1. 安装node.js和git
    node --version
    npm --version
    sudo npm install -g npm
  2. 安装hexo-cli工具
    npm config set registry http://registry.npm.taobao.org/
    npm install -g hexo-cli
  3. 使用hexo创建博客项目
    hexo init 文件夹
    cd 文件夹
    npm install —> 安装博客项目所需的依赖项
  4. 把写好的markdown文件放置到source/_posts目录
    hexo g —> 把Markdown变成HTML页面
  5. 运行博客项目
    hexo s —> localhost:4000
  6. 部署到GitHub的Pages服务
    在GitHub上创建一个名为"用户名.github.io"的仓库
    修改博客项目的_config.yml —> deploy
    deploy:
    type: git
    repo: https://github.com/jackfrued/jackfrued.github.io.git
    branch: master
    安装部署到github的插件
    npm install hexo-deployer-git --save
    完成部署(把生成的HTML页面push到仓库中)
    hexo g -d
    hexo d -g
    打开浏览器,访问https://jackfrued.github.io
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
使用Hexo生成静态网页,你可以使用以下命令:hexo generate或hexo g。这个命令会根据当前目录下的文件生成静态网页。同时,你可以使用命令的缩写hexo g来代替hexo generate。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [【GitHub搭建个人博客】二、Windows下用HEXO生成博客页面(静态)](https://blog.csdn.net/qq_39642978/article/details/115517996)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Hexo搭建Github静态博客](https://blog.csdn.net/weixin_34249678/article/details/85671954)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [基于Hexo+Gitee的个人静态博客网页搭建](https://blog.csdn.net/weixin_40519529/article/details/113005200)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值