Skip to content

Commit

Permalink
solve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
kzdydx committed Jun 18, 2024
2 parents be3cf58 + 48b9561 commit bd55d3c
Show file tree
Hide file tree
Showing 84 changed files with 2,728 additions and 1,254 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/build-slate.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/deploy-slate.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check Markdown links

on: push

jobs:
markdown-link-check-md:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
file-extension: '.md'
folder-path: 'pages'
base-branch: 'main'
use-quiet-mode: 'yes'

markdown-link-check-mdx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
file-extension: '.mdx'
folder-path: 'pages'
base-branch: 'main'
use-quiet-mode: 'yes'
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h1 align="center">dYdX Chain Documentation</h1>

<div align="center">
<a href='https://github.com/dydxprotocol/v4-documentation/blob/main/LICENSE'>
<a href='https://github.com/dydxprotocol/v4-documentation/blob/024e1b35537ba619b79576d07464a8cb4eb2de66/LICENSE'>
<img src='https://img.shields.io/badge/License-AGPL_v3-blue.svg' alt='License' />
</a>
</div>
Expand All @@ -21,3 +21,11 @@ Start development server on localhost:3000:
```bash
pnpm dev
```

## Formatting
To format .mdx files, you can use the [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extension in VSCode.

## Github Actions
Upon push of a commit, the following checks are made:
* [markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) checks that all links work.
* If you are configuring a link that is erroring out, considering adding something to the [mlc_config.json](./mlc_config.json) using [these options](https://github.com/tcort/markdown-link-check#config-file-format).
19 changes: 19 additions & 0 deletions mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"aliveStatusCodes": [0, 200, 403, 429],
"httpHeaders": [
{
"urls": ["https://github.com/", "https://guides.github.com/", "https://help.github.com/", "https://docs.github.com/"],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
}
],
"ignorePatterns": [
{
"pattern": "^https://indexer.dydx.trade"
},
{
"pattern": "^https://github.com/dydxprotocol/v4-chain/releases/"
}
]
}
60 changes: 59 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,64 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
mdxOptions: {
remarkPlugins: [],
rehypePlugins: [],
},
})

module.exports = withNextra()
module.exports = withNextra({
async redirects() {
return [
// Original top-level
{ source: '/security', destination: '/other-security', permanent: true },
{ source: '/terms_of_use_and_privacy_policy.md', destination: '/other-terms_of_use_and_privacy_policy.md', permanent: true },
{ source: '/FAQ', destination: '/user-faqs', permanent: true },

// Architecture
{ source: '/architecture/architectural_overview', destination: '/concepts-architecture/architectural_overview', permanent: true },
{ source: '/architecture/indexer', destination: '/concepts-architecture/indexer', permanent: true },

// Deposits and Withdrawals
{ source: '/deposits_and_withdrawals/:slug*', destination: '/api_integration-deposits_and_withdrawals/:slug*', permanent: true },

// Developers
{ source: '/developers/constants', destination: '/api_integration-constants', permanent: true },
{ source: '/developers/open_source_repositories', destination: '/api_integration-repositories.md', permanent: true },

// Developers - Clients
{ source: '/developers/clients/:slug*', destination: '/api_integration-clients/:slug*', permanent: true },

// Developers - Indexer
{ source: '/developers/indexer/:slug*', destination: '/api_integration-indexer/:slug*', permanent: true },

// Getting started
{ source: '/getting_started/depositing_and_user_journeys', destination: 'introduction-getting_started', permanent: true },
{ source: '/getting_started/margin_calculations', destination: 'concepts-trading/margin', permanent: true },
{ source: '/getting_started/onboarding_faqs', destination: 'introduction-onboarding_faqs', permanent: true },
{ source: '/getting_started/rewards_fees_and_parameters', destination: 'concepts-trading/rewards_fees_and_parameters', permanent: true },

// Governance
{ source: '/governance/:slug*', destination: '/users-governance/:slug*', permanent: true },

// Guides
{ source: '/guides/:slug*', destination: '/api_integration-guides/:slug*', permanent: true },

// Network
{ source: '/network/:slug*', destination: '/infrastructure_providers-network/:slug*', permanent: true },

// Operators
{ source: '/operators/:slug*', destination: '/infrastructure_providers-operators/:slug*', permanent: true },

// Rewards
{ source: '/rewards/:slug*', destination: '/users-rewards/:slug*', permanent: true },

// Trading
{ source: '/trading:slug*', destination: '/api_integration-trading/:slug*', permanent: true },

// Validators
{ source: '/validators/:slug*', destination: '/infrastructure_providers-validators/:slug*', permanent: true },
{ source: '/validators/upgrades/:slug*', destination: '/infrastructure_providers-validators/upgrades/:slug*', permanent: true },
]
},
})
60 changes: 0 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions pages/_error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';

const CustomError: React.FC = () => {
return (
<div style={{
textAlign: 'center',
marginTop: '10%', // top margin as a percentage of the viewport height
marginBottom: '10%', // bottom margin as a percentage of the viewport height
color: 'white', // sets text color to white
fontFamily: 'Satoshi, sans-serif', // ensures the Satoshi font is applied
width: '80%', // sets width to 80% of the viewport width
marginLeft: 'auto', // centers the div horizontally
marginRight: 'auto'
}}>
<h1 style={{
fontWeight: 700,
fontSize: '3rem' // larger font size for the heading
}}>Page Not Found</h1>
<p style={{
fontSize: '1.5rem' // larger font size for the paragraph
}}>The page you are looking for does not exist. Head back to the <a href="https://docs.dydx.exchange" style={{color: 'lightblue'}}>homepage here</a>.</p>
</div>
);
};

export default CustomError;
Loading

0 comments on commit bd55d3c

Please sign in to comment.