Skip to content

Commit

Permalink
chore: test only one default language
Browse files Browse the repository at this point in the history
  • Loading branch information
la3rence committed Feb 23, 2024
1 parent c4480ef commit cde49d4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/feed.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -17,6 +16,7 @@ const {
siteTitle,
siteDescription,
websubHub,
locales,
} = config;

// https://datatracker.ietf.org/doc/html/rfc4287
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
2 changes: 0 additions & 2 deletions posts/long-live-rss.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<div><douban id="25785114" /></div>

Here are some feed examples I subscribed for reading:

<https://blog.yitianshijie.net/feed/>
Expand Down
2 changes: 0 additions & 2 deletions posts/long-live-rss.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ RSS(简易信息聚合): 一系列网络提要格式,用于以标准化格式

Aaron Swartz 是一位开放互联网原教旨主义的先驱。他的事迹一度影响了我看待世界的方式,他以一种极端的姿态告诉世人如何对抗这个世界。推荐大家看一看十年前上映的《互联网之子》这部纪录片,这是了解 RSS 作者的最佳方式。

<div><douban id="25785114" /></div>

这是我自己订阅的一些 RSS 源。

<https://blog.yitianshijie.net/feed/>
Expand Down

0 comments on commit cde49d4

Please sign in to comment.