Skip to content

Commit

Permalink
feat: Community Hub refresh
Browse files Browse the repository at this point in the history
Community Hub is getting a big refresh! Community Hub is being
moved over to Nextra in line with the Optimism Docs repo. This
means the two repositories can share a common development flow.
  • Loading branch information
smartcontracts committed Aug 14, 2024
1 parent 9357c2c commit 2fe2256
Show file tree
Hide file tree
Showing 603 changed files with 14,177 additions and 42,429 deletions.
26 changes: 26 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: "en"
early_access: false
reviews:
high_level_summary: false
poem: false
review_status: false
collapse_walkthrough: false
path_instructions:
- path: "**/*.mdx"
instructions: |
"ALWAYS review Markdown content THOROUGHLY with the following criteria:
- Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
- Avoid gender-specific language and use the imperative form.
- Monitor capitalization for emphasis. Use **bold** for prominence instead of all caps or italics.
- Ensure proper nouns are capitalized in sentences.
- Apply the Oxford comma.
- Use proper title case for headers, buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
- Use correct spelling and grammar at all times (IMPORTANT).
"
auto_review:
enabled: true
drafts: false
base_branches:
- "main"
chat:
auto_reply: true
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pages/_app.mdx
public/_redirects
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
parserOptions: {
ecmaVersion: 'latest'
},
extends: [
'plugin:mdx/recommended',
],
rules: {
'semi': ['error', 'never']
},
overrides: [
{
files: ['pages/**/*.mdx'],
extends: [
'plugin:mdx/recommended'
],
settings: {
'mdx/code-blocks': true
},
rules: {
'no-unused-expressions': 'off',
'semi': ['error', 'never']
}
}
]
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Nicca42 @smartcontracts @OPMattie @sbvegan @cpengilly @opmxwell @opjulian
* @Nicca42 @opmxwell @opjulian
45 changes: 0 additions & 45 deletions .github/ISSUE_TEMPLATE/bridge-bug.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/issues.md

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/check-links.yml

This file was deleted.

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

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-and-run-lychee:
runs-on: ubuntu-latest

steps:
- name: Checkout ethereum-optimism/docs
uses: actions/checkout@v2
with:
repository: 'ethereum-optimism/docs'
path: 'docs'

- name: Checkout lycheeverse/lychee
uses: actions/checkout@v2
with:
repository: 'lycheeverse/lychee'
path: 'lychee'

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Build Lychee
run: |
cd lychee
cargo build --release
- name: Add Lychee to PATH
run: echo "$GITHUB_WORKSPACE/lychee/target/release" >> $GITHUB_PATH

- name: Run Lychee
run: |
cd docs
lychee --config ./lychee.toml --quiet "./pages"
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint Markdown

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.x'

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Run lint
run: pnpm lint
29 changes: 29 additions & 0 deletions .github/workflows/lockfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check Lockfile

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
lockfile:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.x'

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Check lockfile
run: git diff --exit-code
25 changes: 12 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
pids
logs
# packages
node_modules
npm-debug.log
coverage/
run
dist
.env

# os specific files
.DS_Store
.nyc_output
.basement
config.local.js
basement_dist
yarn.lock
src/.vuepress/redirects.js

# build artifacts
.next
public/robots.txt
public/sitemap-0.xml
public/sitemap.xml

# log files
*.log
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts=true
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

22 changes: 0 additions & 22 deletions LICENSE.txt

This file was deleted.

35 changes: 14 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
# The Optimism Community Hub
# Optimism Docs

[![Discord](https://img.shields.io/discord/667044843901681675.svg?color=768AD4&label=discord&logo=https%3A%2F%2Fdiscordapp.com%2Fassets%2F8c9701b98ad4372b58f13fd9f65f966e.svg)](https://discord-gateway.optimism.io)
[![Twitter Follow](https://img.shields.io/twitter/follow/OptimismFND.svg?label=OptimismFND&style=social)](https://twitter.com/OptimismFND)
This repo houses the Optimism Docs located at [docs.optimism.io](https://docs.optimism.io/). All documentation-related updates and new content will be tracked and maintained in this repo.

OP Mainnet is a Layer 2 platform for Ethereum.
## Local Development

OP Mainnet is, in a nutshell, an application inside of Ethereum that executes transactions more efficiently than Ethereum itself. It's based on the concept of the [Optimistic Rollup](https://research.paradigm.xyz/rollups), a construction that allows us to "optimistically" publish transaction results without actually executing those transactions on Ethereum (most of the time). OP Mainnet makes transactions cheaper, faster, and smarter.
How to [install pnpm](https://pnpm.io/installation)

Please note that this repository is undergoing rapid development.
First, run `pnpm i` to install the dependencies.

------
Then, run `pnpm dev` to start the development server and visit localhost:3000.

This is the source for the [community hub](https://community.optimism.io/).
## Contributions

# Usage
## Serve Locally
```shell
yarn dev
```
Please see the [CONTRIBUTING.md](CONTRIBUTING.md) page for specifics on how to write PRs, use the linter, run spellcheck, add dictionary terms, etc. You should also review the [Optimism Documentation Style Guide](/pages/connect/contribute/style-guide.mdx) for additional guidelines, especially if you are writing entirely brand new pages to the developer docs, as opposed to smaller edits and/or revisions.

Then navigate to http://localhost:8080.
If that link doesn't work, double check the output of `yarn dev`.
You might already be serving something on port 8080 and the site may be on port 8081.
## Project Board

## Build for Production
```shell
yarn build
```
You can track documentation [issues](https://github.com/ethereum-optimism/docs/issues) or submit documentation [requests](https://github.com/ethereum-optimism/docs/issues/new/choose) directly from this repo.

## License

This project is licensed under the MIT License.

You probably don't need to run this command, but now you know.
28 changes: 28 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-types/cspell.schema.json",
"version": "0.2",
"dictionaryDefinitions": [
{
"name": "words",
"path": "./words.txt",
"addWords": true
}
],
"dictionaries": [
"words"
],
"ignorePaths": [
"node_modules",
"./words.txt"
],
"overrides": [
{
"filename": "**/*.mdx",
"ignoreRegExpList": [
"/`[^`]*`/",
"/```[\\s\\S]*?```/",
"/\\([^)]*\\)/"
]
}
]
}
Loading

0 comments on commit 2fe2256

Please sign in to comment.