Skip to content

Commit

Permalink
Nextra V3 (#88)
Browse files Browse the repository at this point in the history
* chore: upgrade to nextra v3

* use npm2yarn

* code example filename

* ignore .next

* update pnpm

* remove changelog page

* update seo

* upgrade
  • Loading branch information
saihaj authored Jan 15, 2024
1 parent 98cd63e commit a102114
Show file tree
Hide file tree
Showing 26 changed files with 1,946 additions and 974 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
coverage/
.pnp.*
pnpm-lock.yaml
.next/
7 changes: 4 additions & 3 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// @ts-check
import nextra from 'nextra'

const withNextra = nextra({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.js',
unstable_staticImage: true,
unstable_flexsearch: {
codeblock: false,
staticImage: true,
search: {
codeblocks: false,
},
defaultShowCopyCode: true,
})
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
},
"homepage": "https://github.com/soundxyz/docs#readme",
"engines": {
"pnpm": ">=7.9.1"
"pnpm": ">=8.10.5"
},
"packageManager": "pnpm@7.18.2",
"packageManager": "pnpm@8.10.5",
"devDependencies": {
"@geist-ui/react-icons": "^1.0.1",
"@types/node": "18.16.1",
"autoprefixer": "^10.4.14",
"husky": "^8.0.3",
"next": "^13.2.4",
"nextra": "2.3.0",
"nextra-theme-docs": "2.3.0",
"next": "^13.5.6",
"nextra": "3.0.0-alpha.12",
"nextra-theme-docs": "3.0.0-alpha.12",
"postcss": "^8.4.21",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
Expand Down
28 changes: 0 additions & 28 deletions pages/_meta.json

This file was deleted.

28 changes: 28 additions & 0 deletions pages/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export default {
index: {
display: 'hidden',
hidden: true,
theme: {
sidebar: false,
layout: 'raw',
},
},
intro: {
title: 'Sound Docs',
},
protocol: {
title: 'Sound Protocol',
},
sdk: {
title: 'Sound SDK',
},
'sound-api': {
title: 'Sound API',
},
'api-explorer': {
title: 'API Explorer',
theme: {
layout: 'raw',
},
},
}
6 changes: 0 additions & 6 deletions pages/protocol/_meta.json

This file was deleted.

6 changes: 6 additions & 0 deletions pages/protocol/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
overview: 'Overview',
core: 'Core Contracts',
modules: 'Module Contracts',
libraries: 'Libraries',
}
6 changes: 0 additions & 6 deletions pages/protocol/core/_meta.json

This file was deleted.

6 changes: 6 additions & 0 deletions pages/protocol/core/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
'sound-creator-v1': 'SoundCreatorV1',
'sound-edition': 'SoundEdition',
'i-minter-module': 'IMinterModule',
'i-metadata-module': 'IMetadataModule',
}
4 changes: 0 additions & 4 deletions pages/protocol/modules/_meta.json

This file was deleted.

4 changes: 4 additions & 0 deletions pages/protocol/modules/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
metadata: 'Metadata',
minters: 'Minters',
}
3 changes: 0 additions & 3 deletions pages/protocol/modules/metadata/_meta.json

This file was deleted.

3 changes: 3 additions & 0 deletions pages/protocol/modules/metadata/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
'golden-egg-metadata': 'GoldenEgg Metadata',
}
6 changes: 0 additions & 6 deletions pages/protocol/modules/minters/_meta.json

This file was deleted.

6 changes: 6 additions & 0 deletions pages/protocol/modules/minters/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
'edition-max-minter': 'EditionMaxMinter',
'range-edition-minter': 'RangeEditionMinter',
'fixed-price-signature-minter': 'FixedPriceSignatureMinter',
'merkle-drop-minter': 'MerkleDropMinter',
}
7 changes: 0 additions & 7 deletions pages/protocol/overview/_meta.json

This file was deleted.

7 changes: 7 additions & 0 deletions pages/protocol/overview/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
index: 'Features',
design: 'Design',
deployments: 'Deployments',
gas: 'Gas benchmarks',
'erc721a-info': 'ERC721a Info',
}
4 changes: 0 additions & 4 deletions pages/sdk/_meta.json

This file was deleted.

4 changes: 4 additions & 0 deletions pages/sdk/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
index: 'Getting Started',
edition: 'Interacting with editions',
}
6 changes: 3 additions & 3 deletions pages/sdk/edition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Due to breaking changes between editions, it is important to check the edition v

As a rule of thumb, if your contract was deployed **October 10th 2023 or later**, you should use the V2 edition version of the SDK and you can skip all the `v1` functions, and also lower your bundle size (with automatic tree shaking if available or manually importing only used functions).

```ts
```ts filename="edition.ts"
import { soundEditionVersionPublicActions } from '@soundxyz/sdk'
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
Expand Down Expand Up @@ -33,7 +33,7 @@ After extending the viem instance, you will have full type-safety and autocomple

You can also check [github.com/soundxyz/sdk/examples/nextjs/src/app/v2/page.tsx](https://github.com/soundxyz/sdk/blob/main/examples/nextjs/src/app/v2/page.tsx) as a real world example

```ts
```ts filename="edition.ts"
import {
editionV2PublicActionsCreate,
editionV2PublicActionsInfo,
Expand Down Expand Up @@ -87,7 +87,7 @@ After extending the viem instance, you will have full type-safety and autocomple

You can also check [github.com/soundxyz/sdk/examples/nextjs/src/app/v1](https://github.com/soundxyz/sdk/blob/main/examples/nextjs/src/app/v1) as a real world example

```ts
```ts filename="edition.ts"
import { editionV1PublicActions, withMerkleProvider, editionV1WalletActions } from '@soundxyz/sdk'
import { createPublicClient, createWalletClient, http } from 'viem'
import { mainnet } from 'viem/chains'
Expand Down
35 changes: 5 additions & 30 deletions pages/sdk/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,15 @@ Official Sound on-chain development tools for the JavaScript ecosystem leveragin

`@soundxyz/sdk` [![@soundxyz/sdk](https://badge.fury.io/js/@soundxyz%2Fsdk.svg)](https://badge.fury.io/js/@soundxyz%2Fsdk)

```sh
pnpm add @soundxyz/sdk
```

```sh
bun add @soundxyz/sdk
```

```sh
yarn add @soundxyz/sdk
```

```sh
```sh npm2yarn
npm install @soundxyz/sdk
```

### Peer Dependencies

Sound.xyz SDK requires the following peer dependencies to be installed:

```sh
pnpm add viem zod
```

```sh
bun add viem zod
```

```sh
yarn add viem zod
```

```sh
```sh npm2yarn
npm install viem zod
```

Expand All @@ -68,7 +44,7 @@ The SDK provides direct connection with [www.sound.xyz](https://www.sound.xyz) A

To get an `API Key` contact us on our discord server [`discord.gg/soundxyz`](https://discord.gg/soundxyz)

```ts
```ts filename="api.ts"
import { SoundAPI } from '@soundxyz/sdk/api/sound'

// ...
Expand All @@ -90,7 +66,7 @@ Currently the SDK provides integrations with [**Lanyard**](https://lanyard.org)

- Lanyard

```ts
```ts filename="lanyard.ts" {2, 9}
import { withMerkleProvider } from '@soundxyz/sdk'
import { LanyardMerkleProvider } from '@soundxyz/sdk/api/lanyard'
import { createPublicClient, http } from 'viem'
Expand All @@ -100,12 +76,11 @@ export const publicClient = createPublicClient({
chain: mainnet,
transport: http('...'),
}).extend(withMerkleProvider(LanyardMerkleProvider))
// ...
```

- Sound.xyz API

```ts
```ts filename="api.ts"
import { withMerkleProvider } from '@soundxyz/sdk'
import { SoundAPI } from '@soundxyz/sdk/api/sound'

Expand Down
5 changes: 0 additions & 5 deletions pages/sound-api/_meta.json

This file was deleted.

5 changes: 5 additions & 0 deletions pages/sound-api/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
index: 'Getting Started',
'making-requests': 'Making Requests',
changelog: 'Changelog',
}
39 changes: 0 additions & 39 deletions pages/sound-api/changelog.mdx

This file was deleted.

Loading

1 comment on commit a102114

@vercel
Copy link

@vercel vercel bot commented on a102114 Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./

docs.sound.xyz
docs-sound.vercel.app
sound-docs.vercel.app
docs-git-main-sound.vercel.app

Please sign in to comment.