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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ALGOLIA_APP_ID=
ALGOLIA_API_KEY=
ALGOLIA_INDEX_NAME=
DOCS_BASE_URL=
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ jobs:
run: npm ci
- name: Build Project
run: npm run build
env:
ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
ALGOLIA_INDEX_NAME: ${{ vars.ALGOLIA_INDEX_NAME }}
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:

- name: Build Project
run: npm run build
env:
ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
ALGOLIA_INDEX_NAME: ${{ vars.ALGOLIA_INDEX_NAME }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
.env.development.local
.env.test.local
.env.production.local
.env.algolia

# Algolia PoC (temporary)
docsearch-config.json
algolia-records.json

npm-debug.log*
yarn-debug.log*
Expand All @@ -24,4 +29,7 @@ yarn-error.log*
.cursor
.vscode
.idea

.env
.env.local
.claude
34 changes: 23 additions & 11 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = async function createConfigAsync() {
},
},
themes: ['@docusaurus/theme-mermaid'],
clientModules: ['./src/clientModules/searchHighlight.js', './src/clientModules/searchQueryPersist.js'],
stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css',
Expand Down Expand Up @@ -64,9 +65,23 @@ module.exports = async function createConfigAsync() {
href: 'https://github.com/lidofinance',
label: 'GitHub',
position: 'right',
}
},
],
},
algolia: {
appId: process.env.ALGOLIA_APP_ID || 'A2HCNXVT4O',
apiKey: process.env.ALGOLIA_API_KEY || '',
indexName: process.env.ALGOLIA_INDEX_NAME || 'dev_LIDO_DOCS',
contextualSearch: false,
searchPagePath: 'search',
searchParameters: {
distinct: 3,
exactOnSingleWordQuery: 'none',
removeWordsIfNoResults: 'lastWords',
ignorePlurals: true,
queryLanguages: ['en'],
},
},
},
presets: [
[
Expand All @@ -86,10 +101,10 @@ module.exports = async function createConfigAsync() {
],
],
plugins: [
[
require.resolve('@easyops-cn/docusaurus-search-local'),
{ indexBlog: false, docsRouteBasePath: '/', indexPages: true },
],
// [
// require.resolve('@easyops-cn/docusaurus-search-local'),
// { indexBlog: false, docsRouteBasePath: '/', indexPages: true },
// ],
[
'@docusaurus/plugin-client-redirects',
{
Expand All @@ -108,10 +123,7 @@ module.exports = async function createConfigAsync() {
},
{
to: '/run-on-lido/stvaults/tech-documentation/pdg',
from: [
'/guides/stvaults/pdg',
'/run-on-lido/stvaults/pdg',
],
from: ['/guides/stvaults/pdg', '/run-on-lido/stvaults/pdg'],
},
{
to: '/run-on-lido/stvaults/operational-and-management-guides/health-monitoring-guide',
Expand Down Expand Up @@ -179,5 +191,5 @@ module.exports = async function createConfigAsync() {
},
],
],
};
};
}
}
Loading
Loading