+
{leftLinks.map((link, i) => {
return
})}
diff --git a/src/lib/i18n/locales/zh-TW/index.json b/src/lib/i18n/locales/zh-TW/index.json
index 5e904393..65bca727 100644
--- a/src/lib/i18n/locales/zh-TW/index.json
+++ b/src/lib/i18n/locales/zh-TW/index.json
@@ -62,11 +62,10 @@
"Topic Keywords" : "關鍵字",
"Topic Tags": "標籤",
"Let's talk about xLog, whether to praise or criticize it." : "讚美與批評,推進著 xLog 的成長。",
- "Artificial Intelligence": "人工智慧",
"The world is undergoing changes, and we are at the center of it.": "世界正在變革,我們站在時代的風頭浪尖。",
- "Life Journal": "生活隨筆",
+ "Life Journal": "日誌",
"Discover new perspectives and insights in others' weekly, monthly, or yearly journal.": "分享你剛編的故事。",
- "Fiction": "虛構小說",
+ "Fiction": "小說",
"Experience a world of imagination through these fiction stories." : "年輕人的第一個虛擬世界。",
"Coding": "Coding",
"Participate in Topic": "加入話題"
diff --git a/src/lib/i18n/locales/zh/index.json b/src/lib/i18n/locales/zh/index.json
index 96fdb9fe..bc2dcb94 100644
--- a/src/lib/i18n/locales/zh/index.json
+++ b/src/lib/i18n/locales/zh/index.json
@@ -62,11 +62,10 @@
"Topic Keywords": "话题关键词",
"Topic Tags": "话题标签",
"Let's talk about xLog, whether to praise or criticize it.": "让我们来谈谈 xLog,无论赞美和批评。",
- "Artificial Intelligence": "人工智能",
"The world is undergoing changes, and we are at the center of it.": "世界正在发生变革,而我们正处其中心。",
- "Life Journal": "生活日记",
+ "Journal": "日记",
"Discover new perspectives and insights in others' weekly, monthly, or yearly journal.": "在别人的周月年记中发现新观点和见解。",
- "Fiction": "虚构小说",
+ "Fiction": "小说",
"Experience a world of imagination through these fiction stories.": "体验一个充满想象力的虚构世界。",
"Coding": "编程",
"Podcast": "播客",
diff --git a/src/models/home.model.ts b/src/models/home.model.ts
index 9c9a28fc..6804e251 100644
--- a/src/models/home.model.ts
+++ b/src/models/home.model.ts
@@ -308,17 +308,20 @@ export async function getFeed({
equals: false,
},
metadata: {
- AND: [{
- content: {
- path: "sources",
- array_contains: "xlog"
+ AND: [
+ {
+ content: {
+ path: "sources",
+ array_contains: "xlog"
+ },
},
- }, {
- content: {
- path: "tags",
- array_contains: "post"
+ {
+ content: {
+ path: "tags",
+ array_contains: "post"
+ }
}
- }]
+ ]
},
OR: [
{
@@ -370,6 +373,12 @@ export async function getFeed({
count: list?.length || 0,
}
} else {
+ const excludeString = [
+ ...(info.excludeKeywords?.map(
+ (topicExcludeKeyword) =>
+ `{ NOT: { content: { path: "content", string_contains: "${topicExcludeKeyword}" } } },`,
+ ) || []),
+ ].join("\n")
const result = await client
.query(
gql`
@@ -383,21 +392,26 @@ export async function getFeed({
equals: false,
},
metadata: {
- AND: [{
- content: {
- path: "sources",
- array_contains: "xlog"
+ AND: [
+ {
+ content: {
+ path: "sources",
+ array_contains: "xlog"
+ },
},
- }, {
- content: {
- path: "tags",
- array_contains: "post"
+ {
+ content: {
+ path: "tags",
+ array_contains: "post"
+ }
+ },
+ ${excludeString},
+ {
+ OR: [
+ ${includeString}
+ ]
}
- }, {
- OR: [
- ${includeString}
- ]
- }]
+ ]
},
},
orderBy: [{ createdAt: desc }],