Skip to content

Commit 57c8fdf

Browse files
Vonngclaude
andcommitted
Initial commit - Pigsty Chinese documentation site
Co-Authored-By: Claude Opus 4.5 <[email protected]>
0 parents  commit 57c8fdf

File tree

1,108 files changed

+103163
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,108 files changed

+103163
-0
lines changed

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# ==============================================================================
2+
# Hugo 构建产物
3+
# ==============================================================================
4+
# 网站构建输出目录(hugo 命令生成)
5+
public/
6+
7+
# Hugo 资源缓存(图片处理、SCSS 编译等中间产物)
8+
resources/
9+
10+
# Hugo 构建锁文件
11+
.hugo_build.lock
12+
13+
# Hugo 模块 vendor 目录(使用 hugo mod vendor 生成)
14+
_vendor/
15+
16+
# ==============================================================================
17+
# Node.js 依赖
18+
# ==============================================================================
19+
# npm 依赖目录
20+
node_modules/
21+
22+
# 锁文件(本项目不跟踪,依赖声明以 package.json 为准)
23+
package-lock.json
24+
25+
# ==============================================================================
26+
# IDE 与编辑器
27+
# ==============================================================================
28+
# JetBrains IDE(GoLand, WebStorm 等)
29+
.idea/
30+
31+
# Visual Studio Code
32+
.vscode/
33+
34+
# Vim 交换文件
35+
*.swp
36+
*.swo
37+
38+
# ==============================================================================
39+
# 操作系统
40+
# ==============================================================================
41+
# macOS
42+
.DS_Store
43+
44+
# Windows
45+
Thumbs.db
46+
47+
# ==============================================================================
48+
# 项目特定
49+
# ==============================================================================
50+
# 临时文件与实验目录
51+
temp/
52+
play/
53+
bin/
54+
55+
# 工具脚本(通过其他方式管理)
56+
bin/*.py
57+
58+
# ==============================================================================
59+
# AI 助手配置
60+
# ==============================================================================
61+
# Claude Code 配置与上下文
62+
.claude/
63+
CLAUDE.md
64+
AGENTS.md
65+
prompt.md

LICENSE

Lines changed: 395 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
default: dev
2+
3+
d:dev
4+
dev:
5+
hugo serve
6+
7+
b:build
8+
build:
9+
hugo build --minify
10+
11+
s: sync
12+
sync:
13+
rsync -avz public/ jp:/www/site.cc/
14+
15+
.PHONY: default d dev b build s sync

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# pigsty.cc website
2+
3+
[![网站: pigsty.cc](https://img.shields.io/badge/网站-pigsty.cc-slategray?style=flat&logo=cilium&logoColor=white)](https://pigsty.cc)
4+
[![Website: pigsty.io](https://img.shields.io/badge/website-pigsty.io-slategray?style=flat&logo=cilium&logoColor=white)](https://pigsty.io)
5+
6+
This is the website repo for http://pigsty.cc
7+
8+
- https://github.com/pgsty/pigsty.cc (Chinese)
9+
- https://github.com/pgsty/pigsty.io (English)
10+
11+
Powered by [**Hugo**](https://gohugo.io/) and [**Docsy**](https://docsy.dev)
12+
13+
14+
---------------
15+
16+
## Build
17+
18+
Install hugo extended version
19+
20+
```bash
21+
brew install hugo node go
22+
```
23+
24+
Install node dependencies
25+
26+
```bash
27+
npm install -D autoprefixer
28+
npm install -D postcss-cli
29+
npm install -D postcss
30+
```
31+
32+
Run hugo build
33+
34+
```bash
35+
hugo
36+
```
37+
38+
39+
## License
40+
41+
[CC-BY 4.0](LICENSE)
42+
43+

assets/icons/logo.svg

Lines changed: 42 additions & 0 deletions
Loading

assets/scss/_styles_project.scss

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
// Custom styles for Pigsty.cc
2+
3+
// 覆盖 Docsy 默认的内容最大宽度(从 80% 改为 90%)
4+
// 影响:段落、代码块、blockquote、表格、asciinema 播放器等
5+
.td-max-width-on-larger-screens {
6+
@include media-breakpoint-up(lg) {
7+
max-width: 90%;
8+
}
9+
}
10+
11+
// Force blog sidebar to expand all menu items
12+
// body.td-blog nav.foldable-nav ul.foldable {
13+
// display: block !important;
14+
// }
15+
16+
// Add spacing and separator before feedback section
17+
.feedback--title {
18+
margin-top: 3rem;
19+
padding-top: 2rem;
20+
border-top: 1px solid #dee2e6;
21+
}
22+
23+
// 加宽左侧导航栏(仅桌面端)
24+
@include media-breakpoint-up(xl) {
25+
.td-sidebar__inner {
26+
flex: 0 1 400px !important; // 从默认 320px 增加到 400px
27+
}
28+
}
29+
30+
// 侧边栏分割线样式
31+
.td-sidebar-nav__section.sidebar-divider {
32+
margin-top: 2rem;
33+
margin-bottom: 0.5rem;
34+
padding-top: 0;
35+
padding-bottom: 0;
36+
border: none;
37+
}
38+
39+
// 分割线链接样式(不可点击)
40+
.td-sidebar-link__divider {
41+
cursor: default !important;
42+
pointer-events: none;
43+
display: block !important;
44+
font-weight: 600 !important;
45+
font-size: 0.75rem !important;
46+
color: #6c757d !important;
47+
text-transform: uppercase;
48+
letter-spacing: 1.5px;
49+
padding: 0.75rem 0 0.5rem 0 !important;
50+
margin: 0 !important;
51+
position: relative;
52+
background: transparent !important;
53+
54+
// 深色模式下的文字颜色
55+
@media (prefers-color-scheme: dark) {
56+
color: #adb5bd !important;
57+
}
58+
59+
// 文字上方的分割线
60+
&::before {
61+
content: '';
62+
display: block;
63+
width: 100%;
64+
height: 1px;
65+
background: linear-gradient(
66+
to right,
67+
rgba(108, 117, 125, 0.4) 0%,
68+
rgba(108, 117, 125, 0.2) 70%,
69+
rgba(108, 117, 125, 0) 100%
70+
);
71+
margin-bottom: 0.75rem;
72+
73+
@media (prefers-color-scheme: dark) {
74+
background: linear-gradient(
75+
to right,
76+
rgba(173, 181, 189, 0.3) 0%,
77+
rgba(173, 181, 189, 0.15) 70%,
78+
rgba(173, 181, 189, 0) 100%
79+
);
80+
}
81+
}
82+
83+
// 移除 hover 效果
84+
&:hover {
85+
background: transparent !important;
86+
color: #6c757d !important;
87+
88+
@media (prefers-color-scheme: dark) {
89+
color: #adb5bd !important;
90+
}
91+
}
92+
93+
// 移除图标(如果有)
94+
i {
95+
display: none;
96+
}
97+
98+
// 文字容器
99+
span {
100+
display: block;
101+
white-space: nowrap;
102+
}
103+
}
104+
105+
// 全宽表格样式(与正文宽度对齐,大屏幕上 90%)
106+
// 使用方法:在 Markdown 表格后添加 {.full-width}
107+
.td-content table.full-width {
108+
width: 100% !important;
109+
display: table;
110+
111+
@include media-breakpoint-up(lg) {
112+
max-width: 90%;
113+
}
114+
}
115+
116+
// 全宽表格样式(拉满整个容器宽度)
117+
// 使用方法:在 Markdown 表格后添加 {.full-width-full}
118+
.td-content table.full-width-full {
119+
width: 100% !important;
120+
max-width: 100%;
121+
display: table;
122+
}
123+
124+
// 紧凑型全宽表格(无斑马纹,与正文宽度对齐)
125+
// 使用方法:在 Markdown 表格后添加 {.td-initial .full-width}
126+
.td-content table.td-initial.full-width {
127+
width: 100% !important;
128+
display: table;
129+
130+
@include media-breakpoint-up(lg) {
131+
max-width: 90%;
132+
}
133+
}
134+
135+
// 紧凑型全宽表格(无斑马纹,拉满整个容器宽度)
136+
// 使用方法:在 Markdown 表格后添加 {.td-initial .full-width-full}
137+
.td-content table.td-initial.full-width-full {
138+
width: 100% !important;
139+
max-width: 100%;
140+
display: table;
141+
}
142+
143+
// 最后一列延伸表格(与正文宽度对齐,大屏幕上 90%)
144+
// 前面几列宽度刚好够用,最后一列延伸到末尾
145+
// 使用方法:在 Markdown 表格后添加 {.full-width .stretch-last}
146+
.td-content table.stretch-last {
147+
width: 100% !important;
148+
display: table;
149+
table-layout: auto;
150+
151+
@include media-breakpoint-up(lg) {
152+
max-width: 90%;
153+
}
154+
155+
// 除最后一列外,所有列收缩到内容宽度
156+
th:not(:last-child),
157+
td:not(:last-child) {
158+
width: 1%;
159+
white-space: nowrap;
160+
}
161+
162+
// 最后一列自动填充剩余空间
163+
th:last-child,
164+
td:last-child {
165+
width: auto;
166+
}
167+
}
168+
169+
// 最后一列延伸表格(拉满整个容器宽度)
170+
// 使用方法:在 Markdown 表格后添加 {.full-width-full .stretch-last-full}
171+
.td-content table.stretch-last-full {
172+
width: 100% !important;
173+
max-width: 100%;
174+
display: table;
175+
table-layout: auto;
176+
177+
// 除最后一列外,所有列收缩到内容宽度
178+
th:not(:last-child),
179+
td:not(:last-child) {
180+
width: 1%;
181+
white-space: nowrap;
182+
}
183+
184+
// 最后一列自动填充剩余空间
185+
th:last-child,
186+
td:last-child {
187+
width: auto;
188+
}
189+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$primary: #3E668F;
2+
$secondary: #F0AD4E;
3+
//$td-enable-google-fonts: false;
4+
//$td-enable-google-fonts: false;

content/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "Pigsty - 开箱即用的 PostgreSQL 发行版"
3+
description: "Pigsty 是开源免费的 PostgreSQL 发行版,提供本地优先的 RDS 替代方案。10分钟部署企业级数据库,成本仅 RDS 的 1/10。440+ 扩展开箱即用,高可用自愈架构,SOTA 可观测性。"
4+
---

content/blog/_index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Pigsty 博客文章
3+
linkTitle: 博客
4+
description: 收录了与 Pigsty ,云计算,数据库领域有关的文章,以及关于PostgreSQL 开发,管理,内核原理的笔记
5+
weight: 20
6+
menu:
7+
main:
8+
weight: 20
9+
pre: <i class="fas fa-blog"></i>
10+
11+
cascade:
12+
params:
13+
ui:
14+
sidebar_menu_foldable: false
15+
sidebar_menu_compact: false
16+
ul_show: 3
17+
---
18+

0 commit comments

Comments
 (0)