Skip to content

Commit

Permalink
add workflow and fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvsadana committed Oct 10, 2024
1 parent b29d6e0 commit 1a56140
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 58 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
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
4 changes: 4 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ jobs:
spellcheck:
name: Run spellcheck
uses: ./.github/workflows/spellcheck.yml

build:
name: Build
uses: ./.github/workflows/build.yml
4 changes: 3 additions & 1 deletion pages/interacting/methods.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Each method has its own specific features and schema. Detailed information on ea
- **Result**: The resulting block information with transaction hashes
- **Errors**:
- `BLOCK_NOT_FOUND`: If the specified block does not exist

</details>

### `starknet_getBlockWithReceipts`
Expand All @@ -136,6 +137,7 @@ Each method has its own specific features and schema. Detailed information on ea
- **Result**: The resulting block information with transaction hashes
- **Errors**:
- `BLOCK_NOT_FOUND`: If the specified block does not exist

</details>

### `starknet_getBlockWithTxs`
Expand Down Expand Up @@ -554,4 +556,4 @@ Each method has its own specific features and schema. Detailed information on ea
- `UNSUPPORTED_TX_VERSION`: If the transaction version is unsupported
- `UNEXPECTED_ERROR`: In case of an unexpected error

</details>
</details>
114 changes: 57 additions & 57 deletions theme.config.tsx
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;

0 comments on commit 1a56140

Please sign in to comment.