胎教级搭建Hexo静态博客安装Fluid主题

胎教级搭建Hexo静态博客安装Fluid主题

韩小韩
2022-03-30 / 0 评论 / 316 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2022年03月30日,已超过764天没有更新,若内容或图片失效,请留言反馈。

什么是 Hexo?

Hexo 是一个快速、简洁且高效的博客框架。Hexo 使用 Markdown(或其他渲染引擎)解析文章,在几秒内,即可利用靓丽的主题生成静态网页。

准备

安装

yarn global add hexo-cli
# npm install -g hexo-cli

搭建Hexo静态博客Fluid主题

建站

安装好 Hexo 后,直接进入主题。

新建一个项目

hexo init han-hexo
# han-hexo 是我的项目名称

搭建Hexo静态博客Fluid主题

搭建Hexo静态博客Fluid主题

搭建Hexo静态博客Fluid主题

安装依赖

cd han-hexo
yarn
# npm install

搭建Hexo静态博客Fluid主题

主题安装

安装

yarn add hexo-theme-fluid
# npm install --save hexo-theme-fluid

搭建Hexo静态博客Fluid主题

设置主题为 Fluid

将项目根目录的 _config.yml 中的 theme 的值设置为 fluid
顺便把语言设置成中文 languagezh-CN

搭建Hexo静态博客Fluid主题

顺带提一下SEO优化URL地址

搭建Hexo静态博客Fluid主题

配置主题文件

搭建Hexo静态博客Fluid主题

创建主题自带的「关于页面」

hexo new page about

搭建Hexo静态博客Fluid主题

---
title: 标题
layout: about
---

这里写关于页的正文,支持 Markdown, HTML

搭建Hexo静态博客Fluid主题

写文章

万事俱备,只差文章

hexo new hexo-in-cloudflare-workers
# hexo-in-cloudflare-workers 为文件名,随意取

搭建Hexo静态博客Fluid主题

编译静态文件

直接终端输入

hexo generate 

搭建Hexo静态博客Fluid主题

本地测试

hexo server

搭建Hexo静态博客Fluid主题

0

评论 (0)

取消