From cde49d41e55de9eadd2c624489a8b6badf538c28 Mon Sep 17 00:00:00 2001 From: Lawrence Li Date: Fri, 23 Feb 2024 20:46:56 +0800 Subject: [PATCH] chore: test only one default language --- lib/feed.mjs | 3 +-- next.config.js | 2 +- posts/long-live-rss.en.md | 2 -- posts/long-live-rss.zh.md | 2 -- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/feed.mjs b/lib/feed.mjs index 93a0d4e0..9323fcc0 100644 --- a/lib/feed.mjs +++ b/lib/feed.mjs @@ -4,7 +4,6 @@ import { defaultMarkdownDirectory, } from "./ssg.mjs"; import config from "./config.mjs"; -import nextConfig from "../next.config.js"; import fs from "node:fs"; const { @@ -17,6 +16,7 @@ const { siteTitle, siteDescription, websubHub, + locales, } = config; // https://datatracker.ietf.org/doc/html/rfc4287 @@ -27,7 +27,6 @@ const buildFeed = async () => { return await getMdContentById(item.fileName, defaultMarkdownDirectory); }), ); - const locales = nextConfig.i18n.locales; locales.forEach(locale => { console.log("Building feed for", locale); const feed = createRSS(postContents, locale); diff --git a/next.config.js b/next.config.js index 8b4712ca..62e19cf7 100644 --- a/next.config.js +++ b/next.config.js @@ -5,7 +5,7 @@ module.exports = { // appDir: true, // }, i18n: { - locales: ["zh", "en", "ja"], // post.en.md, post.ja.md + locales: ["zh"], // post.en.md, post.ja.md defaultLocale: "zh", // post.zh.md or post.md localeDetection: false, }, diff --git a/posts/long-live-rss.en.md b/posts/long-live-rss.en.md index de808651..12276322 100644 --- a/posts/long-live-rss.en.md +++ b/posts/long-live-rss.en.md @@ -9,8 +9,6 @@ RSS: A family of Web feed formats used to publish frequently updated works (blog Aaron Swartz is a pioneer of open web fundamentalism. His deeds once affected the way I looked at the world. He used an extreme attitude to tell the world how to fight against the world. I recommend you to watch the documentary "The Internet's Own Boy: The Story of Aaron Swartz". This is the best way to understand the authors of RSS. -
- Here are some feed examples I subscribed for reading: diff --git a/posts/long-live-rss.zh.md b/posts/long-live-rss.zh.md index 4a4b9195..8d14742e 100644 --- a/posts/long-live-rss.zh.md +++ b/posts/long-live-rss.zh.md @@ -9,8 +9,6 @@ RSS(简易信息聚合): 一系列网络提要格式,用于以标准化格式 Aaron Swartz 是一位开放互联网原教旨主义的先驱。他的事迹一度影响了我看待世界的方式,他以一种极端的姿态告诉世人如何对抗这个世界。推荐大家看一看十年前上映的《互联网之子》这部纪录片,这是了解 RSS 作者的最佳方式。 -
- 这是我自己订阅的一些 RSS 源。