@cogita/theme-knowledge 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ function RelationList(param) {
20
20
  children: item.title
21
21
  }),
22
22
  /*#__PURE__*/ jsx("span", {
23
- children: 'document' === item.kind ? t('knowledge.relations.document', "\u6587\u6863") : t('knowledge.relations.post', "\u6587\u7AE0")
23
+ children: 'document' === item.kind ? t('knowledge.relations.document', 'Document') : t('knowledge.relations.post', 'Article')
24
24
  })
25
25
  ]
26
26
  }, `${title}-${item.route}`))
@@ -38,7 +38,7 @@ const Relations_Relations = ()=>{
38
38
  if (0 === relation.outbound.length && 0 === relation.inbound.length) return null;
39
39
  return /*#__PURE__*/ jsxs("aside", {
40
40
  className: "knowledge-relations",
41
- "aria-label": t('knowledge.relations.ariaLabel', "\u5185\u5BB9\u5173\u7CFB"),
41
+ "aria-label": t('knowledge.relations.ariaLabel', 'Content relations'),
42
42
  children: [
43
43
  /*#__PURE__*/ jsxs("div", {
44
44
  className: "knowledge-relations-heading",
@@ -47,7 +47,7 @@ const Relations_Relations = ()=>{
47
47
  children: "Knowledge graph"
48
48
  }),
49
49
  /*#__PURE__*/ jsx("strong", {
50
- children: t('knowledge.relations.continue', "\u7EE7\u7EED\u63A2\u7D22")
50
+ children: t('knowledge.relations.continue', 'Continue exploring')
51
51
  })
52
52
  ]
53
53
  }),
@@ -55,12 +55,12 @@ const Relations_Relations = ()=>{
55
55
  className: "knowledge-relations-groups",
56
56
  children: [
57
57
  /*#__PURE__*/ jsx(RelationList, {
58
- title: t('knowledge.relations.outbound', "\u672C\u6587\u94FE\u63A5\u5230"),
58
+ title: t('knowledge.relations.outbound', 'Links from this page'),
59
59
  items: outbound,
60
60
  base: base
61
61
  }),
62
62
  /*#__PURE__*/ jsx(RelationList, {
63
- title: t('knowledge.relations.inbound', "\u53CD\u5411\u94FE\u63A5"),
63
+ title: t('knowledge.relations.inbound', 'Backlinks'),
64
64
  items: inbound,
65
65
  base: base
66
66
  })
@@ -38,15 +38,15 @@ const HomeLayout = ()=>{
38
38
  }),
39
39
  /*#__PURE__*/ jsxs("nav", {
40
40
  className: "knowledge-actions",
41
- "aria-label": t('knowledge.home.navigation', "\u77E5\u8BC6\u5E93\u5BFC\u822A"),
41
+ "aria-label": t('knowledge.home.navigation', 'Knowledge base navigation'),
42
42
  children: [
43
43
  /*#__PURE__*/ jsx("a", {
44
44
  href: normalizeHrefInRuntime(getHref(base, '/search')),
45
- children: t('knowledge.home.search', "\u641C\u7D22\u77E5\u8BC6")
45
+ children: t('knowledge.home.search', 'Search knowledge')
46
46
  }),
47
47
  /*#__PURE__*/ jsx("a", {
48
48
  href: normalizeHrefInRuntime(getHref(base, `/${tagsConfig.routePrefix}`)),
49
- children: t('knowledge.home.tags', "\u6D4F\u89C8\u6807\u7B7E")
49
+ children: t('knowledge.home.tags', 'Browse tags')
50
50
  })
51
51
  ]
52
52
  })
@@ -54,7 +54,7 @@ const HomeLayout = ()=>{
54
54
  }),
55
55
  /*#__PURE__*/ jsxs("div", {
56
56
  className: "knowledge-stats",
57
- "aria-label": t('knowledge.home.stats', "\u77E5\u8BC6\u5E93\u7EDF\u8BA1"),
57
+ "aria-label": t('knowledge.home.stats', 'Knowledge base statistics'),
58
58
  children: [
59
59
  /*#__PURE__*/ jsxs("div", {
60
60
  children: [
@@ -62,7 +62,7 @@ const HomeLayout = ()=>{
62
62
  children: searchDocuments.length
63
63
  }),
64
64
  /*#__PURE__*/ jsx("span", {
65
- children: t('knowledge.home.contentEntries', "\u5185\u5BB9\u6761\u76EE")
65
+ children: t('knowledge.home.contentEntries', 'Content entries')
66
66
  })
67
67
  ]
68
68
  }),
@@ -72,7 +72,7 @@ const HomeLayout = ()=>{
72
72
  children: allTags.length
73
73
  }),
74
74
  /*#__PURE__*/ jsx("span", {
75
- children: t('knowledge.home.topicTags', "\u4E3B\u9898\u6807\u7B7E")
75
+ children: t('knowledge.home.topicTags', 'Topic tags')
76
76
  })
77
77
  ]
78
78
  }),
@@ -82,7 +82,7 @@ const HomeLayout = ()=>{
82
82
  children: relationCount
83
83
  }),
84
84
  /*#__PURE__*/ jsx("span", {
85
- children: t('knowledge.home.contentLinks', "\u5185\u5BB9\u8FDE\u63A5")
85
+ children: t('knowledge.home.contentLinks', 'Content links')
86
86
  })
87
87
  ]
88
88
  })
@@ -108,13 +108,13 @@ const HomeLayout = ()=>{
108
108
  }),
109
109
  /*#__PURE__*/ jsx("h2", {
110
110
  id: "knowledge-recent-title",
111
- children: t('knowledge.home.recentTitle', "\u6700\u8FD1\u66F4\u65B0")
111
+ children: t('knowledge.home.recentTitle', 'Recently updated')
112
112
  })
113
113
  ]
114
114
  }),
115
115
  /*#__PURE__*/ jsx("a", {
116
116
  href: normalizeHrefInRuntime(getHref(base, '/search')),
117
- children: t('knowledge.home.viewAll', "\u67E5\u770B\u5168\u90E8 \u2192")
117
+ children: t('knowledge.home.viewAll', "View all \u2192")
118
118
  })
119
119
  ]
120
120
  }),
@@ -126,13 +126,13 @@ const HomeLayout = ()=>{
126
126
  children: [
127
127
  /*#__PURE__*/ jsx("span", {
128
128
  className: "knowledge-entry-kind",
129
- children: 'document' === entry.kind ? t('knowledge.home.document', "\u6587\u6863") : t('knowledge.home.post', "\u6587\u7AE0")
129
+ children: 'document' === entry.kind ? t('knowledge.home.document', 'Document') : t('knowledge.home.post', 'Article')
130
130
  }),
131
131
  /*#__PURE__*/ jsx("strong", {
132
132
  children: entry.title
133
133
  }),
134
134
  /*#__PURE__*/ jsx("p", {
135
- children: entry.description || entry.excerpt || t('knowledge.home.openEntry', "\u6253\u5F00\u6761\u76EE\u7EE7\u7EED\u9605\u8BFB\u3002")
135
+ children: entry.description || entry.excerpt || t('knowledge.home.openEntry', 'Open entry to continue reading.')
136
136
  }),
137
137
  /*#__PURE__*/ jsx("small", {
138
138
  children: entry.updateDate.slice(0, 10)
@@ -158,7 +158,7 @@ const HomeLayout = ()=>{
158
158
  children: "Explore"
159
159
  }),
160
160
  /*#__PURE__*/ jsx("h2", {
161
- children: t('knowledge.home.explore', "\u6309\u4E3B\u9898\u63A2\u7D22")
161
+ children: t('knowledge.home.explore', 'Explore by topic')
162
162
  })
163
163
  ]
164
164
  }),
@@ -189,16 +189,16 @@ const HomeLayout = ()=>{
189
189
  children: t('knowledge.home.findAnything', 'Find anything')
190
190
  }),
191
191
  /*#__PURE__*/ jsx("h2", {
192
- children: t('knowledge.home.findStart', "\u4ECE\u4E00\u4E2A\u5173\u952E\u8BCD\u5F00\u59CB\u3002")
192
+ children: t('knowledge.home.findStart', 'Start with one keyword.')
193
193
  }),
194
194
  /*#__PURE__*/ jsx("p", {
195
- children: t('knowledge.home.searchCount', "\u5168\u6587\u7D22\u5F15 {{count}} \u4E2A\u5185\u5BB9\u6761\u76EE\u3002", {
195
+ children: t('knowledge.home.searchCount', '{{count}} content entries indexed.', {
196
196
  count: searchDocuments.length
197
197
  })
198
198
  }),
199
199
  /*#__PURE__*/ jsx("a", {
200
200
  href: normalizeHrefInRuntime(getHref(base, `/${searchConfig.routePrefix}`)),
201
- children: t('knowledge.home.openSearch', "\u6253\u5F00\u641C\u7D22 \u2192")
201
+ children: t('knowledge.home.openSearch', "Open search \u2192")
202
202
  })
203
203
  ]
204
204
  })
@@ -48,19 +48,19 @@ const SearchLayout = ()=>{
48
48
  ]
49
49
  }),
50
50
  /*#__PURE__*/ jsx("h1", {
51
- children: t('knowledge.search.title', "\u627E\u5230\u4E0B\u4E00\u6761\u76F8\u5173\u77E5\u8BC6\u3002")
51
+ children: t('knowledge.search.title', 'Find the next relevant idea.')
52
52
  }),
53
53
  /*#__PURE__*/ jsx("p", {
54
- children: t("knowledge.search.description", "\u641C\u7D22\u6587\u7AE0\u3001\u6587\u6863\u3001\u6807\u7B7E\u548C\u6B63\u6587\u5185\u5BB9\u3002")
54
+ children: t("knowledge.search.description", 'Search articles, documents, tags, and full-text content.')
55
55
  }),
56
56
  /*#__PURE__*/ jsx("input", {
57
57
  type: "search",
58
58
  value: query,
59
59
  onChange: (event)=>setQuery(event.target.value),
60
- placeholder: t('knowledge.search.placeholder', "\u81F3\u5C11\u8F93\u5165 {{count}} \u4E2A\u5B57\u7B26", {
60
+ placeholder: t('knowledge.search.placeholder', 'Enter at least {{count}} characters', {
61
61
  count: searchConfig.minQueryLength
62
62
  }),
63
- "aria-label": t('knowledge.search.ariaLabel', "\u641C\u7D22\u77E5\u8BC6\u5E93")
63
+ "aria-label": t('knowledge.search.ariaLabel', 'Search knowledge base')
64
64
  })
65
65
  ]
66
66
  }),
@@ -70,13 +70,13 @@ const SearchLayout = ()=>{
70
70
  children: [
71
71
  !meetsMinimumLength && /*#__PURE__*/ jsx("p", {
72
72
  className: "knowledge-empty",
73
- children: normalizedQuery ? t('knowledge.search.minLength', "\u8BF7\u8F93\u5165\u81F3\u5C11 {{count}} \u4E2A\u5B57\u7B26\u3002", {
73
+ children: normalizedQuery ? t('knowledge.search.minLength', 'Enter at least {{count}} characters.', {
74
74
  count: searchConfig.minQueryLength
75
- }) : t('knowledge.search.empty', "\u8F93\u5165\u5173\u952E\u8BCD\u5F00\u59CB\u63A2\u7D22\u3002")
75
+ }) : t('knowledge.search.empty', 'Enter a keyword to explore.')
76
76
  }),
77
77
  meetsMinimumLength && 0 === results.length && /*#__PURE__*/ jsx("p", {
78
78
  className: "knowledge-empty",
79
- children: t('knowledge.search.noResults', "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u5185\u5BB9\u3002")
79
+ children: t('knowledge.search.noResults', 'No matching content found.')
80
80
  }),
81
81
  results.map((param)=>{
82
82
  let { entry } = param;
@@ -85,7 +85,7 @@ const SearchLayout = ()=>{
85
85
  className: "knowledge-search-result",
86
86
  children: [
87
87
  /*#__PURE__*/ jsx("span", {
88
- children: 'document' === entry.kind ? t('knowledge.search.document', "\u6587\u6863") : t('knowledge.search.post', "\u6587\u7AE0")
88
+ children: 'document' === entry.kind ? t('knowledge.search.document', 'Document') : t('knowledge.search.post', 'Article')
89
89
  }),
90
90
  /*#__PURE__*/ jsx("h2", {
91
91
  children: /*#__PURE__*/ jsx("a", {
@@ -26,10 +26,10 @@ const TagLayout = ()=>{
26
26
  ]
27
27
  }),
28
28
  /*#__PURE__*/ jsx("h1", {
29
- children: t('knowledge.tag.title', "\u6309\u4E3B\u9898\u63A2\u7D22")
29
+ children: t('knowledge.tag.title', 'Explore by topic')
30
30
  }),
31
31
  /*#__PURE__*/ jsx("p", {
32
- children: t("knowledge.tag.description", "\u6807\u7B7E\u628A\u5206\u6563\u7684\u6587\u7AE0\u548C\u6587\u6863\u805A\u5408\u6210\u53EF\u590D\u7528\u7684\u77E5\u8BC6\u5165\u53E3\u3002")
32
+ children: t("knowledge.tag.description", 'Tags gather scattered articles and documents into reusable knowledge entry points.')
33
33
  })
34
34
  ]
35
35
  }),
@@ -42,7 +42,7 @@ const TagLayout = ()=>{
42
42
  children: item.name
43
43
  }),
44
44
  /*#__PURE__*/ jsx("span", {
45
- children: t('knowledge.tag.contentCount', "{{count}} \u6761\u5185\u5BB9", {
45
+ children: t('knowledge.tag.contentCount', '{{count}} content items', {
46
46
  count: item.count
47
47
  })
48
48
  })
@@ -56,10 +56,10 @@ const TagLayout = ()=>{
56
56
  children: [
57
57
  /*#__PURE__*/ jsx("a", {
58
58
  href: normalizeHrefInRuntime(getHref(base, `/${prefix}`)),
59
- children: t('knowledge.tag.back', "\u2190 \u8FD4\u56DE\u5168\u90E8\u4E3B\u9898")
59
+ children: t('knowledge.tag.back', "\u2190 Back to all topics")
60
60
  }),
61
61
  /*#__PURE__*/ jsx("h1", {
62
- children: t('knowledge.tag.notFound', "\u4E3B\u9898\u4E0D\u5B58\u5728")
62
+ children: t('knowledge.tag.notFound', 'Topic not found')
63
63
  })
64
64
  ]
65
65
  });
@@ -72,7 +72,7 @@ const TagLayout = ()=>{
72
72
  children: [
73
73
  /*#__PURE__*/ jsx("a", {
74
74
  href: normalizeHrefInRuntime(getHref(base, `/${prefix}`)),
75
- children: t('knowledge.tag.back', "\u2190 \u8FD4\u56DE\u5168\u90E8\u4E3B\u9898")
75
+ children: t('knowledge.tag.back', "\u2190 Back to all topics")
76
76
  }),
77
77
  /*#__PURE__*/ jsx("p", {
78
78
  className: "knowledge-eyebrow",
@@ -85,7 +85,7 @@ const TagLayout = ()=>{
85
85
  ]
86
86
  }),
87
87
  /*#__PURE__*/ jsx("p", {
88
- children: t('knowledge.tag.around', "{{count}} \u6761\u5185\u5BB9\u56F4\u7ED5\u8FD9\u4E2A\u4E3B\u9898\u5C55\u5F00\u3002", {
88
+ children: t('knowledge.tag.around', '{{count}} content items revolve around this topic.', {
89
89
  count: tag.count
90
90
  })
91
91
  })
@@ -100,7 +100,7 @@ const TagLayout = ()=>{
100
100
  children: entry.title
101
101
  }),
102
102
  /*#__PURE__*/ jsx("span", {
103
- children: entry.description || t('knowledge.tag.open', "\u6253\u5F00\u6761\u76EE\u7EE7\u7EED\u9605\u8BFB\u3002")
103
+ children: entry.description || t('knowledge.tag.open', 'Open entry to continue reading.')
104
104
  })
105
105
  ]
106
106
  }, entry.route))
@@ -109,7 +109,7 @@ const TagLayout = ()=>{
109
109
  className: "knowledge-related-tags",
110
110
  children: [
111
111
  /*#__PURE__*/ jsx("h2", {
112
- children: t('knowledge.tag.related', "\u76F8\u5173\u4E3B\u9898")
112
+ children: t('knowledge.tag.related', 'Related topics')
113
113
  }),
114
114
  /*#__PURE__*/ jsx("div", {
115
115
  children: relatedTags.map((item)=>/*#__PURE__*/ jsxs("a", {
package/dist/utils.js CHANGED
@@ -14,8 +14,8 @@ function getKnowledgeCopy(pageData) {
14
14
  var _pageData_siteData, _pageData_siteData1;
15
15
  return {
16
16
  title: (null == pageData ? void 0 : null == (_pageData_siteData = pageData.siteData) ? void 0 : _pageData_siteData.title) || 'Cogita Knowledge Base',
17
- description: (null == pageData ? void 0 : null == (_pageData_siteData1 = pageData.siteData) ? void 0 : _pageData_siteData1.description) || "\u628A\u6587\u7AE0\u3001\u6587\u6863\u548C\u5B83\u4EEC\u4E4B\u95F4\u7684\u8FDE\u63A5\u7EC4\u7EC7\u6210\u53EF\u63A2\u7D22\u7684\u77E5\u8BC6\u7A7A\u95F4\u3002",
18
- lead: t('knowledge.home.lead', "\u7528\u7EDF\u4E00\u5185\u5BB9\u7D22\u5F15\u8FDE\u63A5\u6587\u7AE0\u4E0E\u6587\u6863\uFF0C\u8BA9\u6BCF\u4E00\u6B21\u9605\u8BFB\u90FD\u80FD\u81EA\u7136\u62B5\u8FBE\u4E0B\u4E00\u6761\u76F8\u5173\u77E5\u8BC6\u3002")
17
+ description: (null == pageData ? void 0 : null == (_pageData_siteData1 = pageData.siteData) ? void 0 : _pageData_siteData1.description) || 'Organize articles, documents, and their connections into an explorable knowledge space.',
18
+ lead: t('knowledge.home.lead', 'Use one content index to connect articles and documents, so every reading can lead to the next relevant idea.')
19
19
  };
20
20
  }
21
21
  export { getBase, getHref, getKnowledgeCopy, getPageRoute };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cogita/theme-knowledge",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Cogita 的知识库主题,组合统一内容索引、搜索、标签和内容关系。",
5
5
  "keywords": [
6
6
  "cogita",
@@ -57,16 +57,16 @@
57
57
  "react-dom": "^19.1.1",
58
58
  "rsbuild-plugin-publint": "^0.3.3",
59
59
  "typescript": "^5.0.4",
60
- "@cogita/config": "0.0.0",
61
- "@cogita/shared": "0.13.0"
60
+ "@cogita/shared": "0.13.0",
61
+ "@cogita/config": "0.0.0"
62
62
  },
63
63
  "dependencies": {
64
64
  "@cogita/plugin-content-check": "0.2.5",
65
65
  "@cogita/plugin-content-relations": "0.2.1",
66
- "@cogita/plugin-i18n": "0.2.0",
67
- "@cogita/plugin-posts-frontmatter": "0.1.6",
66
+ "@cogita/plugin-i18n": "0.3.0",
68
67
  "@cogita/plugin-search": "0.2.7",
69
68
  "@cogita/plugin-tags": "1.0.7",
69
+ "@cogita/plugin-posts-frontmatter": "0.1.6",
70
70
  "@cogita/shared": "0.13.0"
71
71
  },
72
72
  "scripts": {