This repository contains the Specs Book.
Please chat with us on the discussion board.
We welcome your contributions. Read through CONTRIBUTING.md for a general overview of the contributing process for this repository.
We use mise as a dependency manager for these tools.
Once properly installed, mise will provide the correct versions for each tool. mise does not
replace any other installations of these binaries and will only serve these binaries when you are
working inside of the optimism directory.
Install mise by following the instructions provided on the
Getting Started page.
mise installRust Toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shmdbook + plugins
cargo install mdbook mdbook-katex mdbook-linkcheck mdbook-mermaidjust installation
brew install justjust servePlease see the relevant commands in the justfile for more information.
doctoc is used to automatically add a table of contents.
To check the table of contents:
just lint-specs-toc-checkTo fix the table of contents:
just lint-specs-tocmarkdownlint-cli2 is used to check markdown linting errors.
To check markdown linting errors:
just lint-specs-md-checkTo fix markdown linting errors:
just lint-specs-mdcspell is used to check spelling.
To check spelling:
just lint-specs-spelling-checkTo fix spelling:
just lint-specs-spellinglychee is used to check hyperlinks.
To check all hyperlinks respond with status 200:
just lint-links-checkfind is used to check filenames do not contain underscores.
To check filenames do not contain underscores:
just lint-filenames-checkTo check all linting:
just lint-checkTo fix all linting that can be automatically fixed:
just lintSee the markdownlint rule reference and an example config file.
Justification for linting rules in .markdownlint.json:
- line_length (
!strict && stern): don't trip up on url lines - no-blanks-blockquote: enable multiple consecutive blockquotes separated by white lines
- single-title: enable reusing
<h1>for content - no-emphasis-as-heading: enable emphasized paragraphs
There is a precommit hook in the repo which you can enable (optionally) to fix linting issues and perform a spellcheck on each commit. Enable like so:
git config core.hooksPath .githooks
This makes committing a little slow, but does mean you will know about problems without having to wait for CI. You may disable like so
git config --unset core.hooksPath
or temporarily commit without the hook like so
git commit --no-verify