-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b29d6e0
commit 1a56140
Showing
4 changed files
with
98 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Yarn Install and Build | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" # Specify the Node.js version you want to use | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache yarn dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
import React from 'react' | ||
import { DocsThemeConfig } from 'nextra-theme-docs' | ||
import { useRouter } from 'next/router'; | ||
import Image from 'next/image'; | ||
import React from "react"; | ||
import { DocsThemeConfig } from "nextra-theme-docs"; | ||
import { useRouter } from "next/router"; | ||
import Image from "next/image"; | ||
|
||
const config: DocsThemeConfig = { | ||
// ... existing configurations, | ||
|
||
i18n: [ | ||
{ locale: 'en', text: 'English' }, | ||
{ locale: 'zh-CN', text: '中文' } | ||
{ locale: "en", text: "English" }, | ||
{ locale: "zh-CN", text: "中文" }, | ||
], | ||
|
||
logo: ( | ||
<Image | ||
src="/static/img/madara_logomark_red.png" | ||
style={{ | ||
width: 'auto', | ||
height: 'auto', | ||
}} | ||
width={150} | ||
height={150} | ||
alt={''} | ||
/> | ||
), | ||
project: { | ||
link: "https://github.com/madara-alliance/madara", | ||
}, | ||
chat: { | ||
link: "https://discord.gg/xubb6PNFsb", | ||
}, | ||
docsRepositoryBase: "https://github.com/madara-alliance/madara-docs", | ||
footer: { | ||
text: ( | ||
<span>MIT {new Date().getFullYear()} © Madara - Cairo-Powered Chains</span> | ||
), | ||
}, | ||
editLink: { | ||
text: ( | ||
<span>Contribute to Madara | Edit on GitHub</span> | ||
), | ||
}, | ||
primaryHue: 10, | ||
useNextSeoProps() { | ||
const { asPath } = useRouter(); | ||
if (asPath !== "/") { | ||
return { | ||
titleTemplate: "%s", | ||
}; | ||
} | ||
}, | ||
themeSwitch: { | ||
useOptions() { | ||
return { | ||
light: "Light", | ||
dark: "Dark", | ||
system: "System", | ||
}; | ||
}, | ||
}, | ||
sidebar: { | ||
defaultMenuCollapseLevel: 1 | ||
}, | ||
logo: ( | ||
<Image | ||
src="/static/img/madara_logomark_red.png" | ||
style={{ | ||
width: "auto", | ||
height: "auto", | ||
}} | ||
width={150} | ||
height={150} | ||
alt={""} | ||
/> | ||
), | ||
project: { | ||
link: "https://github.com/madara-alliance/madara", | ||
}, | ||
chat: { | ||
link: "https://discord.gg/xubb6PNFsb", | ||
}, | ||
docsRepositoryBase: "https://github.com/madara-alliance/madara-docs", | ||
footer: { | ||
text: ( | ||
<span> | ||
MIT {new Date().getFullYear()} © Madara - Cairo-Powered Chains | ||
</span> | ||
), | ||
}, | ||
editLink: { | ||
text: <span>Contribute to Madara | Edit on GitHub</span>, | ||
}, | ||
primaryHue: 10, | ||
useNextSeoProps() { | ||
const { asPath } = useRouter(); | ||
if (asPath !== "/") { | ||
return { | ||
titleTemplate: "%s", | ||
}; | ||
} | ||
}, | ||
themeSwitch: { | ||
useOptions() { | ||
return { | ||
light: "Light", | ||
dark: "Dark", | ||
system: "System", | ||
}; | ||
}, | ||
}, | ||
sidebar: { | ||
defaultMenuCollapseLevel: 1, | ||
}, | ||
}; | ||
|
||
export default config | ||
export default config; |