搜索框

This commit is contained in:
caishi 2023-06-28 18:19:43 +08:00
parent 4bcb1109a2
commit 85ec8ae4e4
6 changed files with 44407 additions and 4941 deletions

View File

@ -53,7 +53,7 @@ GitLink确实开源是CCF官方指定的开源创新服务平台旨在
<p>DevOps引擎(Engine)使用及设置[6个文档]</p> <p>DevOps引擎(Engine)使用及设置[6个文档]</p>
</a></article> </a></article>
<article class="col col--6 margin-bottom--lg"> <article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/docs/维基/维基也面管理"> <a class="card padding--lg cardContainer" href="/docs/维基/模板导入及导出">
<h2 class="text--truncate cardTitle" title="维基">维基</h2> <h2 class="text--truncate cardTitle" title="维基">维基</h2>
<p>维基(Wiki)使用及设置[2个文档]</p> <p>维基(Wiki)使用及设置[2个文档]</p>
</a></article> </a></article>
@ -63,7 +63,7 @@ GitLink确实开源是CCF官方指定的开源创新服务平台旨在
<p>Bot市场使用及设置[4个文档]</p> <p>Bot市场使用及设置[4个文档]</p>
</a></article> </a></article>
<article class="col col--6 margin-bottom--lg"> <article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/docs/第三方服务/服务简介"> <a class="card padding--lg cardContainer" href="/docs/第三方服务/跨平台代码同步">
<h2 class="text--truncate cardTitle" title="第三方服务">第三方服务</h2> <h2 class="text--truncate cardTitle" title="第三方服务">第三方服务</h2>
<p>第三方服务使用及设置[3个文档]</p> <p>第三方服务使用及设置[3个文档]</p>
</a></article> </a></article>

View File

@ -13,11 +13,10 @@ module.exports = {
organizationName: 'luffyZh', // Usually your GitHub org/user name. organizationName: 'luffyZh', // Usually your GitHub org/user name.
projectName: 'docusaurus-luffyzh-website', // Usually your repo name. projectName: 'docusaurus-luffyzh-website', // Usually your repo name.
themeConfig: { themeConfig: {
algolia: { aloglia:{
contextualSearch:true,
apiKey: '0f9f28b9ab9efae89810921a351753b5', apiKey: '0f9f28b9ab9efae89810921a351753b5',
indexName: 'github', search:true,
contextualSearch: true,
facetFilters: ['language:zh-CH'],
}, },
navbar: { navbar: {
title: '', title: '',
@ -32,44 +31,67 @@ module.exports = {
position: 'left', position: 'left',
label: '帮助中心', label: '帮助中心',
} }
], ]
}, },
footer: { footer: {
style: 'dark', style: 'dark',
logo:{
src:"/static/img/gitlink.png"
},
links: [ links: [
{ {
title: 'Docs', title: '社区',
items: [ items: [
{ {
label: '文档', label: '网站首页',
to: '/docs/intro',
},
{
label: '关于我们',
to: '/docs/intro',
},
{
label: '教学实践',
to: '/docs/intro',
},
{
label: '合作伙伴',
to: '/docs/intro', to: '/docs/intro',
}, },
], ],
}, },
{ {
title: 'Blog', title: '支持与服务',
items: [ items: [
{ {
label: '博客', label: 'API文档',
to: '/blog',
},
{
label: 'Git常用命令',
to: '/blog',
},
{
label: '引擎使用手册',
to: '/blog',
},
{
label: '服务协议',
to: '/blog', to: '/blog',
}, },
], ],
}, },
{ {
title: '更多', title: '加入我们',
items: [ items: [
{ {
label: '掘金', label: '官网邮箱gitlink@ccf.org.cn',
href: 'https://juejin.cn/user/96412752681079' to:"https://www.gitlink.org.cn"
},
{
label: 'GitHub',
href: 'https://github.com/luffzh/docusaurus-luffyzh-website',
}, },
], ],
}, },
], ],
copyright: `<p>©Copyright 2023 CCF 开源发展委员会</p><p>Powered by Trustie& IntelliDE 京ICP备13000930号</p>`, copyright: `<p>©Copyright ${new Date().getFullYear()} CCF 开源发展委员会</p><p>Powered by Trustie& IntelliDE 京ICP备13000930号</p>`,
}, },
prism: { prism: {
theme: lightCodeTheme, theme: lightCodeTheme,
@ -94,6 +116,13 @@ module.exports = {
}, },
], ],
], ],
plugins: [
[require.resolve("@cmfcmf/docusaurus-search-local"),{
indexDocs: true,
indexBlog: true,
language: ['zh'],
}],
],
i18n: { i18n: {
defaultLocale: 'zh-cn', defaultLocale: 'zh-cn',
locales: ['zh-cn'], locales: ['zh-cn'],

38914
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,18 +15,34 @@
"write-heading-ids": "docusaurus write-heading-ids" "write-heading-ids": "docusaurus write-heading-ids"
}, },
"dependencies": { "dependencies": {
"@cmfcmf/docusaurus-search-local": "^1.1.0",
"@docusaurus/core": "2.0.0-beta.3", "@docusaurus/core": "2.0.0-beta.3",
"@docusaurus/preset-classic": "2.0.0-beta.3", "@docusaurus/preset-classic": "2.0.0-beta.3",
"@docusaurus/theme-search-algolia": "^2.0.0-beta.5", "@docusaurus/theme-search-algolia": "^2.4.1",
"@mdx-js/react": "^1.6.21", "@mdx-js/react": "^1.6.21",
"@node-rs/jieba": "^1.7.0",
"@svgr/webpack": "^5.5.0", "@svgr/webpack": "^5.5.0",
"@types/lunr": "^2.3.3",
"algoliasearch": "^4.12.0",
"clsx": "^1.1.1", "clsx": "^1.1.1",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"nodejieba": "^2.6.0",
"prism-react-renderer": "^1.2.1", "prism-react-renderer": "^1.2.1",
"react": "^17.0.1", "react": "^17.0.1",
"react-dom": "^17.0.1", "react-dom": "^17.0.1",
"url-loader": "^4.1.1" "url-loader": "^4.1.1"
}, },
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.18",
"@testing-library/react": "^13.1.1",
"@tsconfig/docusaurus": "^1.0.5",
"@types/jest": "^27.4.1",
"css-loader": "^6.8.1",
"jest": "^27.5.1",
"react-scripts": "^5.0.1",
"style-loader": "^3.3.3",
"typescript": "^4.6.3"
},
"browserslist": { "browserslist": {
"production": [ "production": [
">0.5%", ">0.5%",

11
src/theme/SearchBar.js Normal file
View File

@ -0,0 +1,11 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// By default, the classic theme does not provide any SearchBar implementation
// If you swizzled this file, it is your responsibility to provide an implementation
// Tip: swizzle the SearchBar from the Algolia theme for inspiration:
// npm run swizzle @docusaurus/theme-search-algolia SearchBar
export {default} from '@docusaurus/Noop';

10338
yarn.lock

File diff suppressed because it is too large Load Diff