feat: simpler topic names
This commit is contained in:
+5
-4
@@ -3,7 +3,8 @@
|
||||
"name": "xLog",
|
||||
"description": "Let's talk about xLog, whether to praise or criticize it.",
|
||||
"includeTags": ["xLog"],
|
||||
"includeKeywords": ["xLog"]
|
||||
"includeKeywords": ["xLog"],
|
||||
"excludeKeywords": ["同步更新至 xLog"]
|
||||
},
|
||||
{
|
||||
"name": "Web3",
|
||||
@@ -27,15 +28,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Artificial Intelligence",
|
||||
"name": "AI",
|
||||
"description": "The world is undergoing changes, and we are at the center of it.",
|
||||
"includeTags": ["AI"],
|
||||
"includeKeywords": ["GPT", "Midjourney", "AIGC", " AI ", "OpenAI"]
|
||||
},
|
||||
{
|
||||
"name": "Life Journal",
|
||||
"name": "Journal",
|
||||
"description": "Discover new perspectives and insights in others' weekly, monthly, or yearly journal.",
|
||||
"includeTags": ["Life", "生活"],
|
||||
"includeTags": ["Journal", "日记"],
|
||||
"includeKeywords": [
|
||||
"Review",
|
||||
"Weekly",
|
||||
|
||||
@@ -126,7 +126,7 @@ export const SiteHeader = async ({
|
||||
</div>
|
||||
{!hideNavigation && (
|
||||
<div className="text-gray-500 flex items-center justify-between w-full mt-auto">
|
||||
<div className="xlog-site-navigation flex items-center gap-1 mx-[-.5rem] min-w-0 text-sm sm:text-base overflow-x-auto">
|
||||
<div className="xlog-site-navigation flex items-center sm:gap-2 mx-[-.5rem] min-w-0 text-sm sm:text-base overflow-x-auto">
|
||||
{leftLinks.map((link, i) => {
|
||||
return <HeaderLink link={link} key={`${link.label}${i}`} />
|
||||
})}
|
||||
|
||||
@@ -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": "加入話題"
|
||||
|
||||
@@ -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": "播客",
|
||||
|
||||
+36
-22
@@ -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 }],
|
||||
|
||||
Reference in New Issue
Block a user