Skip to content

Commit 054df11

Browse files
authored
feat: add search and version upgrades (#100)
* feat: add search and version upgrades * chore: update node version in workflows
1 parent 1ece73b commit 054df11

File tree

6 files changed

+4767
-2424
lines changed

6 files changed

+4767
-2424
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Node
1616
uses: actions/setup-node@v2
1717
with:
18-
node-version: "16"
18+
node-version: "18"
1919

2020
- name: Get yarn cache
2121
id: yarn-cache
@@ -37,4 +37,4 @@ jobs:
3737
if: ${{ github.ref == 'refs/heads/main' }}
3838
with:
3939
github_token: ${{ secrets.GITHUB_TOKEN }}
40-
publish_dir: ./build
40+
publish_dir: ./build

.github/workflows/test-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v2
1313
- uses: actions/setup-node@v2
1414
with:
15-
node-version: "16"
15+
node-version: "18"
1616
cache: yarn
1717
- name: Test build
1818
run: |

docs/graphcast/radios/listener-radio.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ You will need to prepare the following environment variables:
3939

4040
#### Example message table
4141

42-
| id | message |
43-
| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44-
| 1 | {"nonce": 1686182179, "network": "mainnet", "payload": {"content": "0x3f...", "identifier": "QmVhiE4nax9i86UBnBmQCYDzvjWuwHShYh7aspGPQhU5Sj"}, "signature": "dff1...", "block_hash": "276e...", "identifier": "QmVhiE4nax9i86UBnBmQCYDzvjWuwHShYh7aspGPQhU5Sj", "block_number": 17431860} |
45-
| 2 | {"nonce": 1686182183, "network": "goerli", "payload": {"content": "0xc0...", "identifier": "QmacQnSgia4iDPWHpeY6aWxesRFdb8o5DKZUx96zZqEWrB"}, "signature": "dbd2...", "block_hash": "0198...", "identifier": "QmacQnSgia4iDPWHpeY6aWxesRFdb8o5DKZUx96zZqEWrB", "block_number": 9140860} |
46-
| ... | ... |
42+
| id | message |
43+
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44+
| 1 | `{"nonce": 1686182179, "network": "mainnet", "payload": {"content": "0x3f...", "identifier": "QmVhiE4nax9i86UBnBmQCYDzvjWuwHShYh7aspGPQhU5Sj"}, "signature": "dff1...", "block_hash": "276e...", "identifier": "QmVhiE4nax9i86UBnBmQCYDzvjWuwHShYh7aspGPQhU5Sj", "block_number": 17431860}` |
45+
| 2 | `{"nonce": 1686182183, "network": "goerli", "payload": {"content": "0xc0...", "identifier": "QmacQnSgia4iDPWHpeY6aWxesRFdb8o5DKZUx96zZqEWrB"}, "signature": "dbd2...", "block_hash": "0198...", "identifier": "QmacQnSgia4iDPWHpeY6aWxesRFdb8o5DKZUx96zZqEWrB", "block_number": 9140860}` |
46+
| ... | ... |
4747

4848
## Advanced Configuration
4949

docusaurus.config.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
3-
const lightCodeTheme = require("prism-react-renderer/themes/github");
4-
const darkCodeTheme = require("prism-react-renderer/themes/palenight");
3+
const lightCodeTheme = require("prism-react-renderer").themes.github;
4+
const darkCodeTheme = require("prism-react-renderer").themes.palenight;
55
// Override code block theme
66
const customDarkTheme = {
77
...darkCodeTheme,
@@ -21,7 +21,22 @@ const config = {
2121
projectName: "docs", // Usually your repo name.
2222
trailingSlash: false,
2323
// Waiting for docusauras canary to be released for mermaid support: https://docusaurus.io/docs/next/markdown-features/diagrams
24-
themes: ['@docusaurus/theme-mermaid'],
24+
themes: ["@docusaurus/theme-mermaid",
25+
[
26+
"@easyops-cn/docusaurus-search-local",
27+
/** @type {import("@easyops-cn/docusaurus-search-local")} */
28+
({
29+
hashed: true,
30+
language: ['en'],
31+
indexDocs: true,
32+
indexBlog: false,
33+
docsRouteBasePath: '/',
34+
blogRouteBasePath: '/blog',
35+
highlightSearchTermsOnTargetPage: true,
36+
explicitSearchResultPath: true,
37+
}),
38+
],
39+
],
2540
markdown: {
2641
mermaid: true,
2742
},
@@ -152,7 +167,7 @@ const config = {
152167
prism: {
153168
theme: lightCodeTheme,
154169
darkTheme: customDarkTheme,
155-
additionalLanguages: ["solidity", "json5", "toml"],
170+
additionalLanguages: ["solidity", "json5", "toml", "bash"],
156171
},
157172
// metadata: [ // TODO: Take screenshot for rendering previews
158173
// {property: "og:image", content: "/img/image.png"},

package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,23 @@
1616
"version": "docusaurus docs:version"
1717
},
1818
"dependencies": {
19-
"@docusaurus/core": "^2.4.1",
20-
"@docusaurus/preset-classic": "^2.4.1",
21-
"@docusaurus/theme-mermaid": "^2.4.1",
22-
"@mdx-js/react": "^1",
19+
"@docusaurus/core": "3.5.2",
20+
"@docusaurus/preset-classic": "3.5.2",
21+
"@docusaurus/theme-mermaid": "3.5.2",
22+
"@easyops-cn/docusaurus-search-local": "^0.45.0",
23+
"@mdx-js/react": "^3.0.0",
2324
"@svgr/webpack": "^5.5.0",
2425
"clsx": "^1.1.1",
2526
"file-loader": "^6.2.0",
26-
"prism-react-renderer": "^1.2.1",
27-
"react": "^17.0.1",
28-
"react-dom": "^17.0.1",
27+
"prism-react-renderer": "^2.1.0",
28+
"react": "^18.2.0",
29+
"react-dom": "^18.2.0",
2930
"url-loader": "^4.1.1"
3031
},
3132
"devDependencies": {
32-
"@docusaurus/module-type-aliases": "^2.4.1",
33-
"@tsconfig/docusaurus": "^1.0.4",
34-
"typescript": "^4.3.5"
33+
"@docusaurus/module-type-aliases": "3.5.2",
34+
"@docusaurus/tsconfig": "3.5.2",
35+
"typescript": "~5.2.2"
3536
},
3637
"browserslist": {
3738
"production": [

0 commit comments

Comments
 (0)