Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/OpProposerDescriptionShort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`op-proposer` is the service that submits the output roots to the L1. This is to enable trustless execution of L2-to-L1 messaging and creates the view into the L2 state from the L1's perspective.
1 change: 1 addition & 0 deletions content/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as OpProposerDescriptionShort } from './OpProposerDescriptionShort.md'
45 changes: 45 additions & 0 deletions notes/content-reuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Content Reuse

Content reuse is when you reuse the same piece of content in various places. It means that technical writers don't have to re-write text many times, and it means that the original piece of copy should be easy to locate so that it can be used as often as needed. When changes are made to that original piece of text, it will then be automatically changed wherever else that piece of text is used, which saves a lot of time.

## Content Directory

The content directory contains markdown files that can be imported across the nextra website.

## How to Write Reusable Content

Create a `.md` file in the `/content` directory.

### How to Use a Single Reusable Content Components

1. Import it at the top of `.mdx` file:

```
import DescriptionShort from '@/content/DescriptionShort.md'
```

1. Use it within the file

```
Text before

<OpProposerDescriptionShort />

Text after
```

### How to Use a Multiple Reusable Content Components

1. You can create a `index.js` file in the `content` directories and export
the components like this:

```
export { default as ComponentA } from './ComponentA.md'
export { default as ComponentB } from './ComponentB.md'
```

1. Import it at the top of `.mdx` file:

```
import {ComponentA, ComponentB} from '@/content/index.js'
```
6 changes: 3 additions & 3 deletions pages/builders/chain-operators/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ description: Learn about the OP chain architecture.

import Image from 'next/image'

import {OpProposerDescriptionShort} from '@/content/index.js'

# Chain Architecture

This page contains information about the components of the rollup protocol and
Expand Down Expand Up @@ -45,9 +47,7 @@ amount of data required to reproduce L2 blocks.

### op-proposer

`op-proposer` is the service that submits the output roots to the L1. This is to enable
trustless execution of L2-to-L1 messaging and creates the view into the L2 state from
the L1's perspective.
<OpProposerDescriptionShort />

## Ingress Traffic

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"baseUrl": "./",
"paths": {
"@/components/*": ["components/*"],
"@/content/*": ["content/*"],
"@/utils/*": ["utils/*"],
"@/pages/*": ["pages/*"],
}
Expand Down