md文件中的 Fontsmatter 对应键:

---
title: 文章标题 {}
slug: 文章slug {}
tags: 文章标签 {}
categories: 文章分类 {}
draft: false 是否为草稿 {}
publishDate: 发布时间 {}
updatedDate: 更新时间 {}
---

通过数据库表 typecho_contentstypecho_metastypecho_relationships 获取信息,并生成缓存md文件 (TpSync/categories/xxx.md)

插件的自定义性和操作性:

Fontsmatter 值可自定义 <-> 数据库表的表
生成路径 TpSync/{文章分类}/md文件
插件配置Git、S3等存储方式

参考 typecho_contents

cidtitleslugcreatedmodifiedtextorderauthorIdtemplatetypestatuspasswordcommentsNumallowCommentallowPingallowFeedparentagree
14文章标题14Unix时间戳(精确值到秒)Unix时间戳(精确值到秒)<!--markdown-->文章内容01NULLpostpublishNULL211102

参考 typecho_metas

midnameslugtypedescriptioncountorderparent
2文章postcategory默认文章分类,以技术、推荐为主3610
3部署技术手册devcategoryDevelopment & Operations2512
4深度书影漫游readcategoryLiterary Landscape822
5科研技术笔记scicategoryScientific Tech Notes032
6日记diarycategory日记本1620
7通告noticecategory通知830
9友链友链tagNULL100
10通知通知tagNULL200
11C语言C语言tagNULL100

参考 typecho_relationships

cidmid
147
149
1410
172
1711
1712
1713
246
2414
2419

插件配置:

设置Git方案:

目标配置
1. Authentication Type
ssh/basic
> Use SSH for maximum security.

2. Repository URI
> Git-compliant URI (e.g. git@github.com:org/repo.git for ssh, https://github.com/org/repo.git for basic)

​
3. Branch
> The branch to use during pull / push (e.g. main)
​
4. SSH Private Key Mode
contents/path
> SSH Authentication Only - The mode to use to load the private key. Fill in the corresponding field below.

5. A - SSH Private Key Path
> SSH Authentication Only - Absolute path to the key. The key must NOT be passphrase-protected. Mode must be set to path to use this option.

6. B - SSH Private Key Contents
> SSH Authentication Only - Paste the contents of the private key. The key must NOT be passphrase-protected. Mode must be set to contents to use this option.

7. Verify SSL Certificate
turn/off
> Some hosts requires SSL certificate checking to be disabled. Leave enabled for proper security.

8. Username
> Basic Authentication Only

9. Password / PAT
> Basic Authentication Only

10. Default Author Email
> Used as fallback in case the author of the change is not present.

11. Default Author Name
> Used as fallback in case the author of the change is not present.

12. Local Repository Path
./usr/uploads/TpSync
> Path where the local git repository will be created.Whether to put content from the primary language into a subfolder.

13. Git Binary Path
> Optional - Absolute path to the Git binary, when not available in PATH. Leave empty to use the default PATH location (recommended).

---

文件同步方向

选择如何处理此存储目标的内容同步。

**双向**

在双向模式下,首先从存储目标中提取内容。任何较新的内容都会覆盖本地内容。自上次同步以来的新内容将被推送到存储目标,如果存在,则覆盖目标上的任何内容。

**推送到目标**

内容始终以覆盖任何现有内容的形式被推送到存储目标,这是最安全的备份方案。

**从目标中拉取**

内容总是从存储目标中提取,覆盖已存在的任何本地内容。此选项通常保留用于一次性内容导入。警告使用此选项,因为任何本地内容都将始终被覆盖!

---

同步计划任务

出于性能原因,此存储目标按基于间隔的计划同步更改,而不是在每次更改上同步更改。定义同步发生时的间隔。
每x分钟x小时x日x月x年

目前设置为每
默认值为每 5 minutes

通用设置:

Fontsmatter键自定义 <-> 数据库表
勾选使用 Fontsmatter键

同步信息:

状态
1. S3 Generic
上次同步于 20 hours ago

---
2. Git
上次同步于 a few seconds ago

......