diff --git a/.gitignore b/.gitignore index 9b754ca..335d872 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ __pycache__/ .DS_Store tmp/ -output/ \ No newline at end of file +output/ +public/ +.hugo_build.lock \ No newline at end of file diff --git a/giscus.json b/giscus.json new file mode 100644 index 0000000..1defb6b --- /dev/null +++ b/giscus.json @@ -0,0 +1,11 @@ +{ + "origins": [ + "https://vonng.github.com/ddia", + "https://ddia.vonng.com", + "https://ddia.pgsty.com", + "http://localhost:1313" + ], + "originsRegex": [ + "http://localhost:[0-9]+" + ] +} \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ba93b5c --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/Vonng/pg-internal + +go 1.24.5 + +require github.com/imfing/hextra v0.9.7 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..8501da6 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/imfing/hextra v0.9.7 h1:Zg5n24us36Bn/S/5mEUPkRW6uwE6vHHEqWSgN0bPXaM= +github.com/imfing/hextra v0.9.7/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI= diff --git a/hugo.yaml b/hugo.yaml new file mode 100644 index 0000000..010ed28 --- /dev/null +++ b/hugo.yaml @@ -0,0 +1,197 @@ +baseURL: 'https://ddia.vonng.com/' +languageCode: 'zh-CN' +title: '设计数据密集型应用' + +enableRobotsTXT: true +# Parse Git commit +enableGitInfo: true +# enableEmoji: false +hasCJKLanguage: true + + +outputs: + home: [HTML] + page: [HTML] + section: [HTML, RSS] + +module: + imports: + - path: github.com/imfing/hextra + +defaultContentLanguage: zh +languages: + zh: + languageName: 简体中文 + languageCode: zh + contentDir: content/zh + weight: 1 + title: 设计数据密集型应用 + tw: + languageName: 繁体中文 + languageCode: tw + contentDir: content/tw + weight: 2 + title: 設計資料密集型應用 + en: + languageName: English + languageCode: en + contentDir: content/en + weight: 3 + title: Designing Data-Intensive Applications + + +markup: + highlight: + noClasses: false + goldmark: + renderer: + unsafe: true + extensions: + passthrough: + delimiters: + block: [['\[', '\]'], ['$$', '$$']] + inline: [['\(', '\)']] + enable: true + +menu: + main: + - name: Search + weight: 1 + params: + type: search + - name: GitHub + weight: 2 + url: "https://github.com/Vonng/ddia" + params: + icon: github + + sidebar: + + - identifier: ver + name: Version + weight: 1 + params: + type: separator + - identifier: simplified-chinese + name: "简体中文 ↗" + url: "/" + weight: 2 + - identifier: traditional-chinese + name: "繁體中文 ↗" + url: "/tw" + weight: 3 + - identifier: english + name: "English ↗" + url: "/en" + weight: 4 + + - identifier: more + name: 参考链接 + params: + type: separator + weight: 5 + - identifier: pgint + name: "PG Internal 中文版 ↗" + url: "https://pgint.vonng.com/" + weight: 6 + - identifier: pgint14 + name: "PG Internal 14 中文版 ↗" + url: "https://postgres-internals.cn/" + weight: 7 + - identifier: pigsty + name: "Pigsty Docs ↗" + url: "https://pgsty.com" + weight: 8 + - identifier: pgext + name: "PG Extensions ↗" + url: "https://ext.pgsty.com" + weight: 9 + +params: + description: DDIA 中文版翻译,设计数据密集型应用是一本关于数据系统设计的书籍,作者是 Martin Kleppmann。它深入探讨了数据密集型应用的架构和设计原则,涵盖了分布式系统、数据存储、消息传递等主题。 + + navbar: + displayTitle: true + displayLogo: true + logo: + path: /logo.png + dark: /logo.png + # width: 40 + # height: 20 + # link: / + width: wide + + page: + # full (100%), wide (90rem), normal (80rem) + width: full + + theme: + # light | dark | system + default: system + displayToggle: true + + footer: + enable: true + displayCopyright: true + displayPoweredBy: false + width: normal + + # Display the last modification date + displayUpdatedDate: true + dateFormat: "2006-01-02" + + # Search + # flexsearch is enabled by default + search: + enable: true + type: flexsearch + + flexsearch: + # index page by: content | summary | heading | title + index: content + # full | forward | reverse | strict + # https://github.com/nextapps-de/flexsearch/#tokenizer-prefix-search + tokenize: forward + + editURL: + enable: true + base: "https://github.com/Vonng/ddia/edit/main/content" + + toc: + displayTags: true + + highlight: + copy: + enable: true + # hover | always + display: hover + + comments: + enable: true + type: giscus + + # https://giscus.app/ + giscus: + repo: "Vonng/ddia" + repoId: "MDEwOlJlcG9zaXRvcnkxMjA3MTA2NDQ" + category: "Announcements" + categoryId: "DIC_kwDOBzHl9M4CtlWB" + mapping: pathname + strict: 0 + reactionsEnabled: 1 + emitMetadata: 0 + inputPosition: bottom + lang: zh-CN + theme: preferred_color_scheme + + # repo: imfing/hextra + # repoId: R_kgDOJ9fJag + # category: General + # categoryId: DIC_kwDOJ9fJas4CY7gW + # mapping: pathname + # strict: 0 + # reactionsEnabled: 1 + # emitMetadata: 0 + # inputPosition: top + # lang: en + # theme: noborder_dark diff --git a/i18n/tw.yaml b/i18n/tw.yaml new file mode 100644 index 0000000..7750807 --- /dev/null +++ b/i18n/tw.yaml @@ -0,0 +1,14 @@ +backToTop: "返回頂部" +changeLanguage: "切換語言" +changeTheme: "切換主題" +copyright: "© 2025 Hextra Project." +dark: "深色" +editThisPage: "在 GitHub 上編輯此頁 →" +lastUpdated: "最後更新於" +light: "淺色" +noResultsFound: "無結果" +onThisPage: "此頁上" +tags: "標籤" +poweredBy: "由 Hextra 驅動" +readMore: "更多 →" +searchPlaceholder: "搜尋文檔..." \ No newline at end of file diff --git a/i18n/zh.yaml b/i18n/zh.yaml new file mode 100644 index 0000000..18dfa5d --- /dev/null +++ b/i18n/zh.yaml @@ -0,0 +1,16 @@ +backToTop: "返回顶部" +changeLanguage: "切换语言" +changeTheme: "切换主题" +copyright: "© 2025 Hextra Project." +dark: "深色" +editThisPage: "在 GitHub 上编辑此页 →" +lastUpdated: "最后更新于" +light: "浅色" +noResultsFound: "无结果" +onThisPage: "此页上" +tags: "标签" +poweredBy: "由 Hextra 驱动" +readMore: "更多 →" +searchPlaceholder: "搜索文档..." +previous: "上一页" +next: "下一页" \ No newline at end of file diff --git a/static/logo.png b/static/logo.png new file mode 100644 index 0000000..39e761c Binary files /dev/null and b/static/logo.png differ