diff options
| author | eltrac <hi@eltr.ac> | 2026-02-11 21:22:24 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-02-11 21:22:24 +0800 |
| commit | 4a46ec29f7622f512078694330087ee3b795d3a7 (patch) | |
| tree | 972eee3928a7d9953d92191d81c581e9fdfc679e | |
| parent | 1d69e2d8665c5e4d433351c34cc331134dc53eee (diff) | |
chore: migrate from YAML to TOML
| -rw-r--r-- | config/_default/config.toml | 13 | ||||
| -rw-r--r-- | config/_default/config.yaml | 14 | ||||
| -rw-r--r-- | config/_default/languages.toml | 14 | ||||
| -rw-r--r-- | config/_default/languages.yaml | 13 | ||||
| -rw-r--r-- | config/_default/markup.toml | 22 | ||||
| -rw-r--r-- | config/_default/markup.yaml | 20 | ||||
| -rw-r--r-- | config/_default/params.en.toml | 15 | ||||
| -rw-r--r-- | config/_default/params.en.yaml | 11 | ||||
| -rw-r--r-- | config/_default/params.toml | 30 | ||||
| -rw-r--r-- | config/_default/params.yaml | 28 | ||||
| -rw-r--r-- | config/_default/params.zh.toml | 53 | ||||
| -rw-r--r-- | config/_default/params.zh.yaml | 30 | ||||
| -rw-r--r-- | config/_default/services.toml | 2 | ||||
| -rw-r--r-- | config/_default/services.yaml | 2 | ||||
| -rw-r--r-- | i18n/en.toml | 87 | ||||
| -rw-r--r-- | i18n/en.yml | 73 | ||||
| -rw-r--r-- | i18n/zh.toml | 92 | ||||
| -rw-r--r-- | i18n/zh.yml | 77 |
18 files changed, 328 insertions, 268 deletions
diff --git a/config/_default/config.toml b/config/_default/config.toml new file mode 100644 index 00000000..3ba80275 --- /dev/null +++ b/config/_default/config.toml @@ -0,0 +1,13 @@ +baseURL = "https://www.geedea.pro/" +timeZone = "Asia/Shanghai" +hasCJKLanguage = true +defaultContentLanguage = "zh" +defaultContentLanguageInSubdir = false + +[outputs] +home = ["HTML", "RSS", "Sitemap"] + +[taxonomies] +author = "authors" +category = "categories" +tag = "tags" diff --git a/config/_default/config.yaml b/config/_default/config.yaml deleted file mode 100644 index bec6ef33..00000000 --- a/config/_default/config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -baseURL: https://www.geedea.pro/ -timeZone: Asia/Shanghai -hasCJKLanguage: true -defaultContentLanguage: zh -defaultContentLanguageInSubdir: false -outputs: - home: - - HTML - - RSS - - Sitemap -taxonomies: - author: authors - category: categories - tag: tags diff --git a/config/_default/languages.toml b/config/_default/languages.toml new file mode 100644 index 00000000..094865e4 --- /dev/null +++ b/config/_default/languages.toml @@ -0,0 +1,14 @@ +[zh] +contentDir = "content" +languageCode = "zh-CN" +languageName = "简体中文" +title = "極客死亡計劃" +weight = 1 +defaultContentLanguageInSubdir = false + +[en] +contentDir = "content/en" +languageCode = "en-US" +languageName = "English" +title = "Geek Death Project" +weight = 2 diff --git a/config/_default/languages.yaml b/config/_default/languages.yaml deleted file mode 100644 index cdd6af57..00000000 --- a/config/_default/languages.yaml +++ /dev/null @@ -1,13 +0,0 @@ -zh: - contentDir: content - languageCode: zh-CN - languageName: 简体中文 - title: 極客死亡計劃 - weight: 1 - defaultContentLanguageInSubdir: false -en: - contentDir: content/en - languageCode: en-US - languageName: English - title: Geek Death Project - weight: 2 diff --git a/config/_default/markup.toml b/config/_default/markup.toml new file mode 100644 index 00000000..2e62475e --- /dev/null +++ b/config/_default/markup.toml @@ -0,0 +1,22 @@ +[goldmark] +[goldmark.renderer] +unsafe = true +[goldmark.parser] +wrapStandAloneImageWithinParagraph = false +[goldmark.parser.attribute] +block = true +title = true +[goldmark.extensions] +[goldmark.extensions.extras] +[goldmark.extensions.extras.mark] +enable = true + +[highlight] +guessSyntax = true +noClasses = true +style = "evergarden" +tabWidth = 2 + +[tableOfContents] +startLevel = 2 +endLevel = 3 diff --git a/config/_default/markup.yaml b/config/_default/markup.yaml deleted file mode 100644 index 05a43b15..00000000 --- a/config/_default/markup.yaml +++ /dev/null @@ -1,20 +0,0 @@ -goldmark: - renderer: - unsafe: true - parser: - attribute: - block: true - title: true - wrapStandAloneImageWithinParagraph: false - extensions: - extras: - mark: - enable: true -highlight: - guessSyntax: true - noClasses: true - style: evergarden - tabWidth: 2 -tableOfContents: - startLevel: 2 - endLevel: 3 diff --git a/config/_default/params.en.toml b/config/_default/params.en.toml new file mode 100644 index 00000000..9e36c4d4 --- /dev/null +++ b/config/_default/params.en.toml @@ -0,0 +1,15 @@ +description = "Eltrac's Blog" + +[[nav]] +name = "/about" +link = "/en/about/" +target = "_self" + +[[nav]] +name = "/linkroll" +link = "/en/linkroll/" +target = "_self" + +[[footerInternalLinks]] +name = "linkroll" +link = "/en/linkroll/" diff --git a/config/_default/params.en.yaml b/config/_default/params.en.yaml deleted file mode 100644 index cff83dba..00000000 --- a/config/_default/params.en.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Eltrac's Blog -nav: - - name: /about - link: /en/about/ - target: _self - - name: /linkroll - link: /en/linkroll/ - target: _self -footerInternalLinks: - - name: linkroll - link: /en/linkroll/ diff --git a/config/_default/params.toml b/config/_default/params.toml new file mode 100644 index 00000000..fd8b57e0 --- /dev/null +++ b/config/_default/params.toml @@ -0,0 +1,30 @@ +assetBaseUrl = "https://r2.eltr.ac/geedeapro" +logo = "/header.avif" +email = "hi@eltr.ac" +mainSections = ["essays", "posts", "fictions", "library"] +favicon = "/favicon.png" + +[author] +email = "hi@eltr.ac" +name = "Eltrac" +avatar = "/profile.jpg" + +[[footerExternalLinks]] +name = "RSS Feed" +link = "/index.xml" +icon = "/img/rss.svg" + +[[footerExternalLinks]] +name = "Fediverse" +link = "https://akk.eltr.ac/eltrac" +icon = "/img/fediverse.png" + +[[footerExternalLinks]] +name = "GitHub" +link = "https://github.com/BigCoke233/geek-death-project" +icon = "https://r2.eltr.ac/uPic/2025/01/NqL5b5.png" + +[[footerExternalLinks]] +name = "Forgejo" +link = "https://src.eltr.ac/eltrac" +icon = "/icons/forgejo.svg" diff --git a/config/_default/params.yaml b/config/_default/params.yaml deleted file mode 100644 index 1d7d299a..00000000 --- a/config/_default/params.yaml +++ /dev/null @@ -1,28 +0,0 @@ -assetBaseUrl: "https://r2.eltr.ac/geedeapro" -logo: "/header.avif" - -author: - email: hi@eltr.ac - name: Eltrac - avatar: /profile.jpg -email: hi@eltr.ac - -mainSections: - - essays - - posts - - fictions - - library -favicon: /favicon.png -footerExternalLinks: - - name: RSS Feed - link: /index.xml - icon: /img/rss.svg - - name: Fediverse - link: https://akk.eltr.ac/eltrac - icon: /img/fediverse.png - - name: GitHub - link: https://github.com/BigCoke233/geek-death-project - icon: https://r2.eltr.ac/uPic/2025/01/NqL5b5.png - - name: Forgejo - link: https://src.eltr.ac/eltrac - icon: /icons/forgejo.svg diff --git a/config/_default/params.zh.toml b/config/_default/params.zh.toml new file mode 100644 index 00000000..a1973a05 --- /dev/null +++ b/config/_default/params.zh.toml @@ -0,0 +1,53 @@ +description = "欢迎来访,这里只有真情流露和赤裸的思考。" + +[[nav]] +name = "精选" +link = "/featured/" + +[[nav]] +name = "搜寻" +link = "/categories/" + +[[nav]] +name = "林卷" +link = "/linkroll/" + +[[nav]] +name = "自述" +link = "/about/" + +[[homenav]] +name = "所有" +link = "/" + +[[homenav]] +name = "结构" +link = "/essays/" + +[[homenav]] +name = "倾泻" +link = "/posts/" + +[[homenav]] +name = "书目" +link = "/library/" + +[[homenav]] +name = "假想" +link = "/fictions/" + +[[footerInternalLinks]] +name = "罐子" +link = "https://jar.geedea.pro/" + +[[footerInternalLinks]] +name = "洞察" +link = "/stats/" + +[[footerInternalLinks]] +name = "标记" +link = "/highlights/" + +[[footerInternalLinks]] +name = "赞助" +link = "/sponsor/" diff --git a/config/_default/params.zh.yaml b/config/_default/params.zh.yaml deleted file mode 100644 index ef28309e..00000000 --- a/config/_default/params.zh.yaml +++ /dev/null @@ -1,30 +0,0 @@ -description: 欢迎来访,这里只有真情流露和赤裸的思考。 -nav: - - name: 精选 - link: /featured/ - - name: 搜寻 - link: /categories/ - - name: 林卷 - link: /linkroll/ - - name: 自述 - link: /about/ -homenav: - - name: 所有 - link: / - - name: 结构 - link: /essays/ - - name: 倾泻 - link: /posts/ - - name: 书目 - link: /library/ - - name: 假想 - link: /fictions/ -footerInternalLinks: - - name: 罐子 - link: https://jar.geedea.pro/ - - name: 洞察 - link: /stats/ - - name: 标记 - link: /highlights/ - - name: 赞助 - link: /sponsor/ diff --git a/config/_default/services.toml b/config/_default/services.toml new file mode 100644 index 00000000..39ff035c --- /dev/null +++ b/config/_default/services.toml @@ -0,0 +1,2 @@ +[rss] +limit = 10 diff --git a/config/_default/services.yaml b/config/_default/services.yaml deleted file mode 100644 index 2d877e8c..00000000 --- a/config/_default/services.yaml +++ /dev/null @@ -1,2 +0,0 @@ -rss: - limit: 10 diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 00000000..13b286f2 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,87 @@ +lang = "en" +seeArchive = "See all pages" +searchInstruction = "⌘+K to search" +backToHome = "Back To Home" +RSS = "RSS" +statsTooltip = "Insights" +back2top = "I'll take you up!" +emailMe = "If you prefer one-on-one communication, or just want to say hello, feel free to email me at" +rss_comment_link = "Come and leave a comment" + +[archivePage] +postCountMonthly = "{{ . }} POSTS" +postCountAnnual = "{{ . }} TOTAL POSTS" + +[postPage] +commentNotLoaded = "if comment is not loaded, please try refreshing" +staticCommentsSectionHeader = "These are static comments that are stored in frontmatter of this page. They used to be in different comment platforms, but now they are integrated into the page's content." +originallyPostedOn = "originally posted on {{ . }}" + +[footer] +wordCount = "🪦 {{ . }} words are buried here" +licenseStatement = "Licensed under {{ . }}" + +[postNav] +latest = "Latest" +categories = "Categories" +featured = "Featured" +settings = "Settings" + +[moreLinks] +posts = "All Posts" +cards = "All Cards" + +[termPage] +cards = "Cards about this topic" +books = "Books I've read about this topic" + +[library] +viewAllThisYear = "All Books This Year" + +[termFilterButton] +hideWeekly = "I'll deal with scarecrows." +reverseOrder = "Push to reverse time." + +[homePageQuote] +content = "To labor in the arts for any reason other than **love** is prostitution." +source = "——《The War of Art》" + +[settings] +title = "Settings" +fontSize = "Font Size" +loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." +sampleText = "Aa" +otherOptions = "Other Options" + +[fuzzyTimes] +afterMidnight = "After Midnight" +earlyMorning = "Early Morning" +morning = "Morning" +noon = "Noon" +afternoon = "Afternoon" +evening = "Evening" +night = "Night" +midnight = "Midnight" + +[actionMenu] +email = "or send me an email!" +interact = "Interact" +fediverse = "Fediverse" +openToot = "Open T{oot" +fediversePlaceholder = "your instance, optional" +webmention = "Webmention" +webmentionPlaceholder = "Your post URL" +send = "Send" + +[webmention] +fetching = "Fetching Webmention..." +formDesc = "You can write an article to respond to this post, or post something on social media, then submit the link of the related page here to send me Webmention." +formPlaceholder = "URL of your post" +submit = "Ping me!" +likedBy = "%d people liked this page" +mentionsHeading = "Mentions" +interactOnFediverse = "Interact on Fediverse" + +[music] +netease = "Netease" +openIn = "Open in {{ . }}" diff --git a/i18n/en.yml b/i18n/en.yml deleted file mode 100644 index 54a558ae..00000000 --- a/i18n/en.yml +++ /dev/null @@ -1,73 +0,0 @@ -lang: en -seeArchive: See all pages -archivePage: - postCountMonthly: '{{ . }} POSTS' - postCountAnnual: '{{ . }} TOTAL POSTS' -postPage: - commentNotLoaded: if comment is not loaded, please try refreshing - staticCommentsSectionHeader: These are static comments that are stored in frontmatter of this page. They used to be in different comment platforms, but now they are integrated into the page's content. - originallyPostedOn: 'originally posted on {{ . }}' -footer: - wordCount: '🪦 {{ . }} words are buried here' - licenseStatement: 'Licensed under {{ . }}' -searchInstruction: '⌘+K to search' -postNav: - latest: 'Latest' - categories: 'Categories' - featured: 'Featured' - settings: 'Settings' -moreLinks: - posts: 'All Posts' - cards: 'All Cards' -backToHome: 'Back To Home' -termPage: - cards: 'Cards about this topic' - books: "Books I've read about this topic" -RSS: RSS -statsTooltip: Insights -library: - viewAllThisYear: All Books This Year -back2top: I'll take you up! -emailMe: If you prefer one-on-one communication, or just want to say hello, feel free to email me at -termFilterButton: - hideWeekly: I'll deal with scarecrows. - reverseOrder: Push to reverse time. -homePageQuote: - content: 'To labor in the arts for any reason other than **love** is prostitution.' - source: '——《The War of Art》' -settings: - title: Settings - fontSize: Font Size - loremIpsum: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - sampleText: Aa - otherOptions: Other Options -fuzzyTimes: - afterMidnight: After Midnight - earlyMorning: Early Morning - morning: Morning - noon: Noon - afternoon: Afternoon - evening: Evening - night: Night - midnight: Midnight -actionMenu: - email: "or send me an email!" - interact: Interact - fediverse: Fediverse - openToot: Open T{oot - fediversePlaceholder: your instance, optional - webmention: Webmention - webmentionPlaceholder: Your post URL - send: Send -rss_comment_link: "Come and leave a comment" -webmention: - fetching: Fetching Webmention... - formDesc: You can write an article to respond to this post, or post something on social media, then submit the link of the related page here to send me Webmention. - formPlaceholder: URL of your post - submit: Ping me! - likedBy: %d people liked this page - mentionsHeading: Mentions - interactOnFediverse: Interact on Fediverse -music: - netease: Netease - openIn: 'Open in {{ . }}' diff --git a/i18n/zh.toml b/i18n/zh.toml new file mode 100644 index 00000000..6235b973 --- /dev/null +++ b/i18n/zh.toml @@ -0,0 +1,92 @@ +lang = "zh-CN" +seeArchive = "查看全部页面" +searchInstruction = "⌘+K 搜索" +cards = "最近在学" +backToHome = "返回首页" +RSS = "订阅" +statsTooltip = "洞察" +back2top = "我带你上去!" +emailMe = "如果你偏好一对一的沟通,或者只是想打个招呼,欢迎发邮件到" +rss_comment_link = "读完啦?来坐坐吧" + +[theme] +auto = "自动" +light = "亮色" +dark = "暗色" + +[archivePage] +postCountMonthly = "{{ . }} 篇文章" +postCountAnnual = "共计 {{ . }} 篇文章" + +[postPage] +commentNotLoaded = "如果评论未加载,请尝试刷新页面" +staticCommentsSectionHeader = "这些是曾经发布在不同评论平台上的评论,现在它们已经作为静态内容集成到页面中。" +originallyPostedOn = "原本发表于 {{ . }}" + +[footer] +wordCount = "🪦 {{ . }} 字在这里死去" +licenseStatement = "以 {{ . }} 协议授权" + +[postNav] +latest = "最新" +categories = "搜寻" +featured = "精选" + +[moreLinks] +posts = "所有文章" +cards = "所有卡片" + +[termPage] +cards = "相关卡片" +books = "我读过的相关书籍" + +[library] +viewAllThisYear = "查看今年完整书单" + +[termFilterButton] +hideWeekly = "我帮你解决稻草人" +reverseOrder = "按下以逆转时间" + +[homePageQuote] +content = "除了**爱**,出于任何其他原因而从事艺术创作,都是**卖淫**。" +source = "——《[一生之敌](/library/2025/一生之敌/)》" + +[settings] +fontSize = "字体大小" +loremIpsum = "对我个人而言,科学和人文谁更有意义不仅仅是一个重大的事件,还可能会改变我的人生。 我们都知道,只要有意义,那么就必须慎重考虑。问题的关键究竟为何? 在这种不可避免的冲突下,我们必须解决这个问题。 这样看来,我们一般认为,抓住了问题的关键,其他一切则会迎刃而解。从这个角度来看,生活中,若科学和人文谁更有意义出现了,我们就不得不考虑它出现了的事实。 塞内加曾经提到过,勇气通往天堂,怯懦通往地狱。这句话看似简单,但其中的阴郁不禁让人深思。所谓科学和人文谁更有意义,关键是科学和人文谁更有意义需要如何写。 那么,我们一般认为,抓住了问题的关键,其他一切则会迎刃而解。" +sampleText = "字。" +otherOptions = "其他选项" + +[fuzzyTimes] +afterMidnight = "凌晨" +earlyMorning = "清晨" +morning = "早上" +noon = "中午" +afternoon = "下午" +evening = "傍晚" +night = "晚上" +midnight = "深夜" + +[actionMenu] +email = "也欢迎邮件交流!" +interact = "互动" +fediverse = "联邦宇宙" +openToot = "打开帖子" +fediversePlaceholder = "实例域名,可留空" +webmention = "Webmention" +webmentionPlaceholder = "你的文章 URL" +send = "发送" + +[webmention] +fetching = "正在获取 Webmention..." +formDesc = "你可以撰写一篇文章回应此文,然后在这里提交相关页面的链接,只要提交的页面中包含这个页面的链接,即可向我发送 Webmention。" +formPlaceholder = "你的文章的 URL" +submit = "提交" +likedBy = "%d 人喜欢了这篇文章" +repliedAndMentionedBy = ",还有 %d 条回应和提及" +mentionsHeading = "提及这篇文章的" +interactOnFediverse = "在 Fediverse 上互动" + +[music] +netease = "网易云音乐" +openIn = "在 {{ . }} 中打开" diff --git a/i18n/zh.yml b/i18n/zh.yml deleted file mode 100644 index ea2c2906..00000000 --- a/i18n/zh.yml +++ /dev/null @@ -1,77 +0,0 @@ -lang: zh-CN -seeArchive: 查看全部页面 -theme: - auto: 自动 - light: 亮色 - dark: 暗色 -archivePage: - postCountMonthly: '{{ . }} 篇文章' - postCountAnnual: '共计 {{ . }} 篇文章' -postPage: - commentNotLoaded: 如果评论未加载,请尝试刷新页面 - staticCommentsSectionHeader: 这些是曾经发布在不同评论平台上的评论,现在它们已经作为静态内容集成到页面中。 - originallyPostedOn: '原本发表于 {{ . }}' -footer: - wordCount: '🪦 {{ . }} 字在这里死去' - licenseStatement: '以 {{ . }} 协议授权' -searchInstruction: '⌘+K 搜索' -postNav: - latest: '最新' - categories: '搜寻' - featured: '精选' -cards: 最近在学 -moreLinks: - posts: '所有文章' - cards: '所有卡片' -backToHome: '返回首页' -termPage: - cards: '相关卡片' - books: '我读过的相关书籍' -RSS: 订阅 -statsTooltip: 洞察 -library: - viewAllThisYear: 查看今年完整书单 -back2top: 我带你上去! -emailMe: 如果你偏好一对一的沟通,或者只是想打个招呼,欢迎发邮件到 -termFilterButton: - hideWeekly: 我帮你解决稻草人 - reverseOrder: 按下以逆转时间 -homePageQuote: - content: '除了**爱**,出于任何其他原因而从事艺术创作,都是**卖淫**。' - source: '——《[一生之敌](/library/2025/一生之敌/)》' -settings: - fontSize: 字体大小 - loremIpsum: 对我个人而言,科学和人文谁更有意义不仅仅是一个重大的事件,还可能会改变我的人生。 我们都知道,只要有意义,那么就必须慎重考虑。问题的关键究竟为何? 在这种不可避免的冲突下,我们必须解决这个问题。 这样看来,我们一般认为,抓住了问题的关键,其他一切则会迎刃而解。从这个角度来看,生活中,若科学和人文谁更有意义出现了,我们就不得不考虑它出现了的事实。 塞内加曾经提到过,勇气通往天堂,怯懦通往地狱。这句话看似简单,但其中的阴郁不禁让人深思。所谓科学和人文谁更有意义,关键是科学和人文谁更有意义需要如何写。 那么,我们一般认为,抓住了问题的关键,其他一切则会迎刃而解。 - sampleText: "字。" - otherOptions: 其他选项 -fuzzyTimes: - afterMidnight: '凌晨' - earlyMorning: '清晨' - morning: '早上' - noon: '中午' - afternoon: '下午' - evening: '傍晚' - night: '晚上' - midnight: '深夜' -actionMenu: - email: "也欢迎邮件交流!" - interact: 互动 - fediverse: 联邦宇宙 - openToot: 打开帖子 - fediversePlaceholder: 实例域名,可留空 - webmention: Webmention - webmentionPlaceholder: 你的文章 URL - send: 发送 -rss_comment_link: "读完啦?来坐坐吧" -webmention: - fetching: 正在获取 Webmention... - formDesc: 你可以撰写一篇文章回应此文,然后在这里提交相关页面的链接,只要提交的页面中包含这个页面的链接,即可向我发送 Webmention。 - formPlaceholder: 你的文章的 URL - submit: 提交 - likedBy: %d 人喜欢了这篇文章 - repliedAndMentionedBy: ,还有 %d 条回应和提及 - mentionsHeading: 提及这篇文章的 - interactOnFediverse: 在 Fediverse 上互动 -music: - netease: 网易云音乐 - openIn: '在 {{ . }} 中打开' |
