溯源计划:给时光以备份,而非给备份以时光

本文最后更新于:16 天前

显影

2025 年 5 月 28 日

这并不是一件容易的事。

早在去年四月份便开启了第一次时光剪影,我尝试尽可能多的搜集群聊里的家庭照片,连同手机相册一起整理分类归档。

这项工作断断续续做了一年多,直至刚刚过去的三月中旬里,已然完善了本机内存储的照片影集。

不过这些还不够,还有很多记忆没有拾取,还需要抓紧时间搜罗起来。

想用这些泛黄的旧照片,留住那些早已消逝在过去的只言片语。

昨天晚上灵感一现,想到可以打造一个专属于自己的云端相册,美观的界面和便捷的影集管理,目前市面上应该有现成的容器支持。

果不其然,经过简单的搜寻和了解,短时间内总算确定了一项合适的可实操方案。

给时光以备份,而非给备份以时光。

溯源计划,就是用先进的数字技术留住过去的旧时光,让家族的记忆在数字云端生长发芽。

每一张照片都是一段时光的切片,藏匿着未被言说的故事。

当科技与诗意交织,相册便成了溯源的起点——不是追问从何处来,而是标记我们曾如何存在。

有些照片会褪色,但记忆不该模糊。

云端剪影

2025 年 5 月 27 日

快速了解下可以参考哪些方案实现云端存储,要求操作管理方便,技术支持可靠,更重要的是页面一定是美观大气的。

03.用 Immich 打造私有云相册_哔哩哔哩_bilibili

带 AI 场景/人物识别,超好用的 NAS 本地相册应用——immich(附部署和使用教程)_哔哩哔哩_bilibili

Memory’s blog (atomgit.net)

Home | Immich

七牛云 | 一站式中立音视频云 + AI (qiniu.com)

带 AI 场景/人物识别,超好用的 NAS 本地相册应用——immich(附部署和使用教程)_哔哩哔哩_bilibili

域名控制台 (aliyun.com)

NAS-Raid 方案之 unraid-CSDN 博客

低成本搭建一台 Unraid 家庭存储服务器:中篇-腾讯云开发者社区-腾讯云 (tencent.com)

基本了解。

部署至本机当然不合适,将来一定会选择部署在云服务器上,用现有的稳定云环境做支撑是最可靠的选择,只是暂时财力有限。

上传并批量导入图片不仅要考虑效率问题,更重要的是做好空间管理,目前没有更好的办法来容纳接近三十 GB 的本地图片视频资源。

这些都要慢慢考虑。

Memos

2025 年 7 月 6 日

每张照片都是时光的便签,随手一贴就记下了那天。

image-20250706104959894

image-20250706105023346

image-20250706105039891

2025 年 6 月 30 日

Blog - Memos (usememos.com)

在线访问地址:Memos

2025 年 6 月 28 日

自建 Memos 服务:碎片化笔记 + 博客说说栏,一栈双用 Memos 是一款轻量的自托管的备忘录中心。你可以把它当作个 - 掘金 (juejin.cn)

17.8k Star!开源且支持私有化部署的碎片化知识卡片管理工具-Memos 应用简览 主要特性 开源且永久免费:Mem - 掘金 (juejin.cn)

心猿意马 - 雨月空间站 (mintimate.cn)

用一张照片来代表今天。

部署

2025 年 6 月 30 日

1
2
ICP备案(互联网内容提供商备案)详解​​
ICP备案(Internet Content Provider备案)是中国大陆对网站或互联网服务进行合法化管理的重要制度,由​​国家工业和信息化部(MIIT)​​监管,所有在中国大陆境内提供服务的网站或服务器必须完成备案,否则可能被关停或屏蔽访问。

今天上午十点半,购买了新的云服务器,提交域名备案初审。

image-20250630102839185

备案短信核验_备案(Filing Service)-阿里云帮助中心 (aliyun.com)

安装 Docker - 云服务器 ECS - 阿里云 (alibabacloud.com)

按这个方法安装 Docker。

安装 Docker。

安装 Docker,执行以下命令安装 Docker 社区版本,通过查看 Docker 版本命令,验证 Docker 是否安装成功。

1
2
3
4
5
6
7
8
9
10
11
#添加Docker软件包源
sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo
sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo
#Alibaba Cloud Linux3专用的dnf源兼容插件
sudo dnf -y install dnf-plugin-releasever-adapter --repo alinux3-plus
#安装Docker社区版本,容器运行时containerd.io,以及Docker构建和Compose插件
sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
#启动Docker
sudo systemctl start docker
#设置Docker守护进程在系统启动时自动启动
sudo systemctl enable docker
1
sudo docker -v

创建简单 Web 程序镜像,构建 Web 程序镜像,启动 Web 程序镜像的容器,并且命名容器名称为hello-world

1
2
3
4
5
6
7
8
9
#拉取Nginx镜像
sudo docker pull nginx:latest
#创建Dockerfile设置Nginx作为基础镜像,并在Web服务器的根目录创建一个显示Hello World!的index.html文件。
sudo tee Dockerfile <<-'EOF'
FROM nginx:latest
RUN echo 'Hello World!' > /usr/share/nginx/html/index.html
EOF
#构建镜像,镜像名称为hello-world
sudo docker build . -t hello-world:latest

不过这里第一步拉取 Nginx 镜像就失败了,得配置 Docker 镜像加速器。

登录阿里云控制台,进入 容器镜像服务 > 镜像加速器,获取专属加速地址(如 https://<your-id>.mirror.aliyuncs.com)。

容器镜像服务 ACR 控制台 (aliyun.com)

1
https://0i6jgqxx.mirror.aliyuncs.com

修改 Docker 配置。

1
2
3
4
5
6
7
8
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://0i6jgqxx.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

镜像源修改成功,直接拉取 Nginx 镜像,一切顺利。

1
2
3
4
5
6
7
8
9
10
11
[root@iZ2zehqnajgv7sc3i778n0Z ~]# sudo docker pull nginx:latest
latest: Pulling from library/nginx
a2abf6c4d29d: Pull complete
a9edb18cadd1: Pull complete
589b7251471a: Pull complete
186b1aaa4aa6: Pull complete
b4df32aa5a72: Pull complete
a0bcbecc962e: Pull complete
Digest: sha256:0d17b565c37bcbd895e9d92315a05c1c3c9a29f762b011a10c54a66cd53c9b31
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest

我记得今年年初也有过解决 Docker 拉取镜像失败的问题,同样是修改镜像源,操作基本相同,参考以下文章。

Docker 修改国内镜像源_docker 更换国内镜像源-CSDN 博客

这篇写得很详细了:docker 切换国内镜像源_mob64ca12f10f72 的技术博客_51CTO 博客

继续之前的操作,构建 Web 程序镜像。

1
2
3
4
5
6
7
8
9
#拉取Nginx镜像
sudo docker pull nginx:latest
#创建Dockerfile设置Nginx作为基础镜像,并在Web服务器的根目录创建一个显示Hello World!的index.html文件。
sudo tee Dockerfile <<-'EOF'
FROM nginx:latest
RUN echo 'Hello World!' > /usr/share/nginx/html/index.html
EOF
#构建镜像,镜像名称为hello-world
sudo docker build . -t hello-world:latest

启动 Web 程序镜像的容器,并且命名容器名称为hello-world

1
sudo docker run -d -p 80:80 --name hello-world hello-world:latest

执行curl http://localhost命令,验证 Web 程序是否正确显示Hello World!

1
2
[root@iZ2zehqnajgv7sc3i778n0Z ~]# curl http://localhost
Hello World!

安装 Docker Compose

如果您参考以上方式安装 Docker,那么 Compose 插件将默认安装到您的实例中。您可以通过如下命令查看。

1
sudo docker compose version
1
2
[root@iZ2zehqnajgv7sc3i778n0Z ~]# sudo docker compose version
Docker Compose version v2.27.0

预期输出(vN.N.N 代表 Compose 的版本):Docker Compose version vN.N.N

如果您的 Compose 插件未成功安装或您需要使用 Compose 独立版(docker-compose)可参考下面内容。

安装 Docker - 云服务器 ECS - 阿里云 (alibabacloud.com)

这些内容参考官方文档就可以了,最后还是要使用查看 Compose 版本命令,验证 Compose 是否安装成功。

使用 Docker Compose 部署应用

以下是创建基于 WordPress 镜像的 Web 程序。

创建 Compose 编排文件并启动 WordPress 服务。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#创建编排文件,添加Mysql与WordPress
sudo tee docker-compose.yaml <<-'EOF'
version: '3.1'

services:
wordpress:
image: wordpress
restart: always
ports:
- "80:80"
environment:
#数据库地址
WORDPRESS_DB_HOST: db
#数据库用户名
WORDPRESS_DB_USER: wordpress
#数据库密码
WORDPRESS_DB_PASSWORD: 123456
#数据库名称
WORDPRESS_DB_NAME: wordpress
volumes:
- wordpress:/var/www/html

db:
image: mysql:5.7
restart: always
ports:
- "3306:3306"
environment:
#数据库名称
MYSQL_DATABASE: wordpress
#数据库用户名
MYSQL_USER: wordpress
#数据库密码
MYSQL_PASSWORD: 123456
#数据库ROOT用户密码
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql

volumes:
wordpress:
db:
EOF
#启动服务容器。
sudo env "PATH=$PATH" docker compose up -d

这里启动服务器竟然有报错了,估计是服务端口冲突了,刚才在 80 端口启动了 Hello World 测试服务。

1
2
3
4
5
[root@iZ2zehqnajgv7sc3i778n0Z ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e9f71f7b68d5 wordpress "docker-entrypoint.s…" About a minute ago Created root-wordpress-1
8c0aee8f6006 mysql:5.7 "docker-entrypoint.s…" About a minute ago Up About a minute 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp root-db-1
e1b3d3f9f718 hello-world:latest "/docker-entrypoint.…" 11 minutes ago Up 11 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp hello-world
1
[root@iZ2zehqnajgv7sc3i778n0Z ~]# docker stop e1b3d3f9f718
1
[root@iZ2zehqnajgv7sc3i778n0Z ~]# docker rm hello-world

Memory’s Blog – 又一个 WordPress 站点

成功部署了 WordPress 个人博客站点,提供了很多热门的免费主题,直接下载安装完成后即可使用,这个博客确实方便,还配备了专门的后台管理系统。

Memos 镜像

1
2
# 直接拉取镜像
sudo docker pull usememos/memos:latest
1
2
3
4
5
6
7
8
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://0i6jgqxx.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

一直显示拉取失败,阿里云镜像仓库没有同步 Memos 镜像吗。

1
2
[root@iZ2zehqnajgv7sc3i778n0Z docker]# sudo docker pull usememos/memos:latest
Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded

使用终极解决方案: 直接使用 GitHub 源码构建(终极方案),如果镜像源均不可用,可自行构建。

1
2
3
4
5
6
7
8
9
# 克隆源码
git clone https://github.com/usememos/memos.git
cd memos

# 构建镜像
docker build -t memos:latest .

# 运行容器
docker run -d --name memos -p 5230:5230 -v ~/.memos/:/var/opt/memos memos:latest

在这之前,得先安装 git,执行安装,并验证安装。

1
sudo yum install -y git
1
git --version
1
2
3
完毕!
[root@iZ2zehqnajgv7sc3i778n0Z docker]# git --version
git version 2.43.5

。。。

1
2
3
[root@iZ2zehqnajgv7sc3i778n0Z docker]# git clone https://github.com/usememos/memos.git
正克隆到 'memos'...
致命错误:无法访问 'https://github.com/usememos/memos.git/':Failed to connect to github.com port 443: 连接超时

usememos/memos: A modern, open-source, self-hosted knowledge management and note-taking platform designed for privacy-conscious users and organizations. (github.com)

刚刚使用 SSH 协议替代 HTTPS 协议,在云服务器生成了密钥,并将公钥添加到了 GitHub,登录 GitHub → Settings → SSH and GPG keys → 添加公钥。

1
2
ssh-keygen -t ed25519 -C "your_email@example.com"
cat ~/.ssh/id_ed25519.pub # 复制公钥

但最终测试链接还是超时失败了。

1
ssh -T git@github.com
1
2
[root@iZ2zehqnajgv7sc3i778n0Z docker]# ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out

索性在 Github Fork Memos 镜像仓库,再导入 Gitee 仓库,最后在 Gitee 添加服务器公钥实现认证,总该能成功拉取官方镜像源吧。

拉取 Gitee 镜像代码仓库。

1
git clone git@gitee.com:deng-2022/memos.git
1
2
3
4
5
6
7
8
9
10
11
12
13
[root@iZ2zehqnajgv7sc3i778n0Z docker]# git clone git@gitee.com:deng-2022/memos.git
正克隆到 'memos'...
The authenticity of host 'gitee.com (180.76.199.13)' can't be established.
ECDSA key fingerprint is SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbVr17bmjey0Wc.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added 'gitee.com,180.76.199.13' (ECDSA) to the list of known hosts.
remote: Enumerating objects: 42879, done.
remote: Counting objects: 100% (42879/42879), done.
remote: Compressing objects: 100% (9910/9910), done.
remote: Total 42879 (delta 31416), reused 42879 (delta 31416), pack-reused 0 (from 0)
接收对象中: 100% (42879/42879), 35.67 MiB | 9.95 MiB/s, 完成.
处理 delta 中: 100% (31416/31416), 完成.

继续未完成的操作,克隆源码成功后,自行构建镜像。

1
2
3
4
5
6
7
8
9
# 克隆源码
git clone git@gitee.com:deng-2022/memos.git
cd memos/scripts

# 构建镜像
docker build -t memos:latest .

# 运行容器
docker run -d --name memos -p 5230:5230 -v ~/.memos/:/var/opt/memos memos:latest
1
2
sudo systemctl daemon-reload
sudo systemctl restart docker

白忙活一场,到头来还是需要拉取基础镜像,镜像源修改还是没有生效,拉个镜像就连接超时。

1
2
docker pull alpine:latest
docker pull golang:1.24-alpine
1
=> [internal] load metadata for docker.io/library/golang:1.24-alpine

问题还偏偏出现在这个破镜像上,手动下载吧。


第八阶段【DBA 自动化】06:CentOS 安装 go 环境_golang 1.24.2 下载-CSDN 博客

1
wget https://golang.google.cn/dl/go1.24.2.linux-amd64.tar.gz
1
2
3
4
5
6
7
8
9
# 解压 Go 到 /usr/local
sudo tar -C /usr/local -xzf go1.24.2.linux-amd64.tar.gz

# 添加环境变量
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc

# 验证安装
go version
1
2
3
4
5
[root@iZ2zehqnajgv7sc3i778n0Z scripts]# sudo tar -C /usr/local -xzf go1.24.2.linux-amd64.tar.gz
[root@iZ2zehqnajgv7sc3i778n0Z scripts]# echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
[root@iZ2zehqnajgv7sc3i778n0Z scripts]# source ~/.bashrc
[root@iZ2zehqnajgv7sc3i778n0Z scripts]# go version
go version go1.24.2 linux/amd64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM golang:1.24-alpine AS backend
WORKDIR /backend-build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Please build frontend first, so that the static files are available.
# Refer to `pnpm release` in package.json for the build command.
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -ldflags="-s -w" -o memos ./bin/memos/main.go

# Make workspace with above generated files.
FROM alpine:latest AS monolithic
WORKDIR /usr/local/memos

RUN apk add --no-cache tzdata
ENV TZ="UTC"

COPY --from=backend /backend-build/memos /usr/local/memos/
COPY ./scripts/entrypoint.sh /usr/local/memos/

EXPOSE 5230

# Directory to store the data, which can be referenced as the mounting point.
RUN mkdir -p /var/opt/memos
VOLUME /var/opt/memos

ENV MEMOS_MODE="prod"
ENV MEMOS_PORT="5230"

ENTRYPOINT ["./entrypoint.sh", "./memos"]
1
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 5e8c89a3-1927-49ae-bf7e-1543f565993f::reae01uls78mmnhox88ewtmd5: "/scripts/entrypoint.sh": not found

不过是徒劳,擦。

1
2
3
4
5
6
7
8
FROM alpine AS backend
WORKDIR /backend-build
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# 安装 Go(需自行处理版本和依赖)
RUN apk add --no-cache go gcc musl-dev # 安装 Go 和编译工具
COPY ./go.mod ./go.sum ./
RUN go mod download
COPY . .

还是解决镜像源问题吧,一劳永逸,竟然浪费了两小时时间,还没有丝毫进展。


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@iZ2zehqnajgv7sc3i778n0Z docker]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2025-06-30 13:36:11 CST; 36s ago
Docs: https://docs.docker.com
Process: 476829 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 476829 (code=exited, status=1/FAILURE)

6月 30 13:36:09 iZ2zehqnajgv7sc3i778n0Z systemd[1]: Failed to start Docker Application Container Engine.
6月 30 13:36:11 iZ2zehqnajgv7sc3i778n0Z systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
6月 30 13:36:11 iZ2zehqnajgv7sc3i778n0Z systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
6月 30 13:36:11 iZ2zehqnajgv7sc3i778n0Z systemd[1]: Stopped Docker Application Container Engine.
6月 30 13:36:11 iZ2zehqnajgv7sc3i778n0Z systemd[1]: docker.service: Start request repeated too quickly.
6月 30 13:36:11 iZ2zehqnajgv7sc3i778n0Z systemd[1]: docker.service: Failed with result 'exit-code'.
6月 30 13:36:11 iZ2zehqnajgv7sc3i778n0Z systemd[1]: Failed to start Docker Application Container Engine.
6月 30 13:36:39 iZ2zehqnajgv7sc3i778n0Z systemd[1]: docker.service: Start request repeated too quickly.
6月 30 13:36:39 iZ2zehqnajgv7sc3i778n0Z systemd[1]: docker.service: Failed with result 'exit-code'.

docker 服务都垮了。

1
2
3
4
{
"registry-mirrors": ["https://<你的ID>.mirror.aliyuncs.com"],
"registry-mirrors-only": true // 强制只从镜像加速器拉取
}

混账 AI 糊弄我呢,这文件就不能这么写。

Docker 安装及镜像源修改-阿里云开发者社区 (aliyun.com)

1
2
sudo systemctl daemon-reload
sudo systemctl restart docker

docker 换国内镜像源,docker 换源-阿里云开发者社区 (aliyun.com)

折腾了一上午,快到中午两点整总算弄好了。

换镜像源就得按照这篇文章里写的,把以下国内镜像源挨个配置上去,这样直接执行拉取镜像就成功了。

1
2
3
4
5
6
7
8
9
10
11
12
echo >/etc/docker/daemon.json
cat>/etc/docker/daemon.json <<END
{
"registry-mirrors": [
"https://hub-mirror.c.163.com",
"https://ustc-edu-cn.mirror.aliyuncs.com",
"https://ghcr.io",
"https://mirror.baidubce.com"
]
}
END
systemctl restart docker
1
docker pull usememos/memos
1
2
3
4
5
6
7
8
9
10
11
12
[root@iZ2zehqnajgv7sc3i778n0Z ~]# docker pull usememos/memos
Using default tag: latest
latest: Pulling from usememos/memos
1f3e46996e29: Pull complete
3c6dabcaff14: Pull complete
066876855edf: Pull complete
12e6e904a51b: Pull complete
acc8f9c158a7: Pull complete
0ecac9b063ba: Pull complete
Digest: sha256:4723d86e6797fd629f1f2ff7afd4e37e669df7318f00de31c7ff9acf1fe9db7f
Status: Downloaded newer image for usememos/memos:latest
docker.io/usememos/memos:latest

自建 Memos 服务:碎片化笔记 + 博客说说栏,一栈双用 Memos 是一款轻量的自托管的备忘录中心。你可以把它当作个 - 掘金 (juejin.cn)

直接用 docker compose 启动。

1
2
3
4
5
6
# 创建合适的数据持久化目录
mkdir -p /dockerData/memos
# 进入目录
cd /dockerData/memos
# 创建 docker-compose.yml
touch docker-compose.yml

我的 docker-compose.yml 文件如下:

1
2
3
4
5
6
7
8
9
10
11
12
services:
memos:
image: usememos/memos:latest
container_name: memos
restart: unless-stopped
ports:
- "5230:5230"
volumes:
- /dockerData/memos/data:/var/opt/memos
environment:
- MEMOS_MODE=prod
- MEMOS_PORT=5230

最后,启动 memos:

1
2
3
4
# 拉取镜像
docker compose pull
# 启动
docker compose up -d

现在,访问 Memoshttp://47.93.135.62:5230/) 即可,注册登录,就可以发表留言了,这个备忘录很好用。

融入 Hexo

2025 年 6 月 30 日

Mintimate/memos-bb-time: A Hexo plugin that integrates Memos’ API to add a Twitter-like ‘moments’ (shuoshuo) feature to your Hexo blog (github.com)

1
2
3
4
5
6
7
8
<script type="text/javascript">
var bbMemos = {
memos : 'http://47.93.135.62:5230/', //修改为自己部署 Memos 的网址,末尾有 / 斜杠
limit : '10',//默认每次显示 10 条
creatorId:'1' ,//早期默认为 101 用户,新安装是 1; https://demo.usememos.com/u/101
domId: '#bber',//默认为 bber
}
</script>
1
- { key: "说说", link: "/Memos/", icon: "iconfont icon-comment " }

iconfont-阿里巴巴矢量图标库

在 Hexo 博客中创建一个独立页面,通过 Memos API 展示说说内容。

功能说明

  • 创建独立说说页面,不依赖插件
  • 通过 Memos API 获取最新内容
  • 响应式设计,适配各种设备
  1. 创建新页面:

下载 source 目录,将内部的文件全部复制到 Hexo 博客的 source 目录下。

  1. 编辑生成的 source/Memos/index.md 文件:
1
2
3
4
5
6
var bbMemos = {
memos : '',//修改为自己部署 Memos 的网址,末尾有 / 斜杠
limit : '10',//默认每次显示 10 条
creatorId:'1' ,//早期默认为 101 用户,新安装是 1; https://demo.usememos.com/u/101
domId: '#bber',//默认为 bber
}
  1. 编辑主题配置文件:

编辑主题配置文件,添加导航内容。以 fluid 主题为例,编辑_config.fluid.ymlmenu部分:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
menu:
- { key: "home", link: "/", icon: "iconfont icon-home-fill" }
- { key: "archive", link: "/archives/", icon: "iconfont icon-archive-fill" }
- {
key: "category",
link: "/categories/",
icon: "iconfont icon-category-fill",
}
- { key: "tag", link: "/tags/", icon: "iconfont icon-tags-fill" }
- { key: "links", link: "/links/", icon: "iconfont icon-link-fill" }
- { key: "about", link: "/about/", icon: "iconfont icon-user-fill" }
- { key: "意马", link: "/Memos/", icon: "iconfont iconbg-chat" } # 添加说说页面
- {
key: "发现",
icon: "iconfont iconnaicha",
submenu:
[
{
key: "哔哩哔哩",
link: "https://space.bilibili.com/355567627",
icon: "iconfont iconbilibili",
},
{
key: "Youtube",
link: "https://www.youtube.com/@mintimate",
icon: "iconfont iconyoutube",
},
{
key: "Github",
link: "https://github.com/Mintimate",
icon: "iconfont icongit",
},
],
}

重启 Hexo 服务,访问 http://localhost:4000/Memos/ 即可查看效果。

1
2
3
4
5
6
7
8
9
10
11
12
---
#---------------------------
# 音乐餐厅
# playlist Page
#
# 通过 hexo new page 命令创建的页面
# playlist Page through `hexo new page`
#---------------------------
音乐:
banner_img: /img/newBG/girl20250517.jpg
banner_img_height: 100
banner_mask_alpha: 0.3
1
2
3
4
5
6
7
8
9
10
11
12
---
#---------------------------
# 说说
# Custom Page
#
# 通过 hexo new page 命令创建的页面
# Custom Page through `hexo new page`
#---------------------------
说说:
banner_img: /img/newBG/bus20250517.jpg
banner_img_height: 100
banner_mask_alpha: 0.3
1
2
- { key: "音乐", link: "/playlist/", icon: "iconfont icon-music" }
- { key: "说说", link: "/memos/", icon: "iconfont icon-comment " }

这样自定义页面完成以后,个人博客“说说”栏目页新增完毕。

成功将 Memos 备忘录功能融入 Hexo。

在线访问地址:Memos


溯源计划:给时光以备份,而非给备份以时光
https://test.atomgit.net/blog/2025/05/27/溯源计划:给时光以备份,而非给备份以时光/
作者
Memory
发布于
2025年5月27日
更新于
2025年7月6日
许可协议