从0开始搭建基于Hugo的博客(MemE主题)

1. 安装Hugo

sudo apt install hugo

image

安装完如图:

image

2. 创建新项目

hugo new site blog

image

3. 安装 MemE 主题

  1. 进入到项目目录,添加MemE子模块。
cd blog
git init
git submodule add --depth 1 https://github.com/reuixiy/hugo-theme-meme.git themes/meme

image

  1. 拷贝主题配置文件覆盖默认hugo配置文件
rm hugo.toml
cp themes/meme/config-examples/zh-cn/config.toml hugo.toml

image

4. 启动站点并测试

# 默认地址是 localhost:1313
# 如果想用其他电脑访问就把地址绑定在 0.0.0.0
hugo server --bind=0.0.0.0

image

5. 新建博文

hugo new posts/hugo的安装和部署.md
# 然后编辑这个markdown文件,保存即可。

image

博文内容如下:

+++
title = 'hugo的安装和部署'
date = 2025-04-29T21:32:44+08:00
draft = false
+++

1. 安装 Hugo

bash sudo apt install hugo

2. 创建新项目

bash hugo new site blog

3. 安装 MemE 主题

bash cd blog git init git submodule add --depth 1 https://github.com/reuixiy/hugo-theme-meme.git themes/meme

使用 MemE 主题的配置文件

bash rm hugo.toml cp themes/meme/config-examples/zh-cn/config.toml hugo.toml

4. 启动站点并测试

bash hugo server --bind=0.0.0.0

5. 发布新博文

bash hugo new post/hugo安装和部署.md

主页如图:

image

博文界面如图:

image

posted @ 2025-04-29 20:50  那个白熊  阅读(110)  评论(0)    收藏  举报