Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ const config = {
position: "right",
className: "header-slack-link header-icon",
},
{
type: "search",
position: "right",
},
{
type: "localeDropdown",
position: "right",
Expand Down Expand Up @@ -213,13 +217,16 @@ const config = {
"docusaurus-plugin-sass",
"plugin-image-zoom",
[
"docusaurus-lunr-search",
require.resolve("@easyops-cn/docusaurus-search-local"),
{
languages: ["en",'zh'],
indexDocs: true,
indexBlog: true,
indexPages: false,
}
docsRouteBasePath: "/docs",
blogRouteBasePath: "/blog",
Comment on lines +222 to +223

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In Docusaurus, route base paths are resolved relative to the baseUrl and should not contain leading slashes. Specifying "/docs" and "/blog" with leading slashes can lead to path resolution issues (such as double slashes like //docs or route mismatch) during the build or search indexing process.\n\nPlease remove the leading slashes so they match the default Docusaurus route base paths ("docs" and "blog").

Suggested change
docsRouteBasePath: "/docs",
blogRouteBasePath: "/blog",
docsRouteBasePath: "docs",
blogRouteBasePath: "blog",

language: ["en", "zh"],
hashed: true,
highlightSearchTermsOnTargetPage: true,
explicitSearchResultPath: true,
indexPages: true,
},
Comment on lines +220 to +229
],
],
};
Expand Down
35 changes: 35 additions & 0 deletions i18n/zh/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,5 +393,40 @@
"theme.tags.tagsPageTitle": {
"message": "标签",
"description": "The title of the tag list page"
},
"theme.SearchPage.existingResultsTitle": {
"message": "“{query}”的搜索结果",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
"message": "搜索文档",
"description": "The search page title for empty query"
},
"theme.SearchPage.searchContext.everywhere": {
"message": "所有"
},
Comment on lines +405 to +407
"theme.SearchPage.documentsFound.plurals": {
"message": "共找到 {count} 篇文档",
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.noResultsText": {
"message": "没有找到任何文档",
"description": "The paragraph for empty search result"
},
"theme.SearchBar.noResultsText": {
"message": "没有找到任何文档"
},
"theme.SearchBar.seeAllOutsideContext": {
"message": "查看“{context}”以外的全部结果"
},
Comment on lines +416 to +421
"theme.SearchBar.searchInContext": {
"message": "查看“{context}”以内的全部结果"
},
"theme.SearchBar.seeAll": {
"message": "查看全部结果"
},
"theme.SearchBar.label": {
"message": "搜索",
"description": "The ARIA label and placeholder for search button"
}
}
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ command = "yarn build"
functions = "functions/"

[build.environment]
NODE_VERSION = "20.14.0"
NODE_VERSION = "20.18.1"
NPM_VERSION = "10.8.1"

# Redirects for routing
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"@docusaurus/plugin-content-blog": "^3.7.0",
"@docusaurus/plugin-google-gtag": "^3.7.0",
"@docusaurus/preset-classic": "3.7.0",
"@easyops-cn/docusaurus-search-local": "^0.55.2",
"@mdx-js/react": "^3.0.0",
"@node-rs/jieba": "^2.0.1",
"clsx": "^2.0.0",
Comment on lines +22 to 25
"docusaurus-lunr-search": "^3.6.0",
"docusaurus-plugin-sass": "^0.2.6",
"plugin-image-zoom": "flexanalytics/plugin-image-zoom",
"prism-react-renderer": "^2.3.0",
Expand Down
Loading
Loading