Add just-the-docs based user-facing documentation

This commit is contained in:
Luke Parker 2024-03-11 17:55:27 -04:00
parent a3a009a7e9
commit c32d3413ba
No known key found for this signature in database
20 changed files with 270 additions and 1 deletions

90
.github/workflows/pages.yml vendored Normal file
View file

@ -0,0 +1,90 @@
# MIT License
#
# Copyright (c) 2022 just-the-docs
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages
on:
push:
branches:
- "develop"
paths:
- "docs/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
cache-version: 0
working-directory: "${{ github.workspace }}/docs"
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "docs/_site/"
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

View file

@ -11,7 +11,10 @@ wallet.
- `audits`: Audits for various parts of Serai. - `audits`: Audits for various parts of Serai.
- `docs`: Documentation on the Serai protocol. - `spec`: The specification of the Serai protocol, both internally and as
networked.
- `docs`: User-facing documentation on the Serai protocol.
- `common`: Crates containing utilities common to a variety of areas under - `common`: Crates containing utilities common to a variety of areas under
Serai, none neatly fitting under another category. Serai, none neatly fitting under another category.

7
docs/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
.bundle/
vendor/

1
docs/.ruby-version Normal file
View file

@ -0,0 +1 @@
3.1

5
docs/2_amm.md Normal file
View file

@ -0,0 +1,5 @@
---
title: Automatic Market Makers
layout: default
nav_order: 2
---

5
docs/3_cross_chain.md Normal file
View file

@ -0,0 +1,5 @@
---
title: Cross-Chain Architecture
layout: default
nav_order: 3
---

6
docs/4_0_economics.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Economics
layout: default
nav_order: 4
has_children: true
---

6
docs/4_1_genesis.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Genesis
layout: default
nav_order: 1
parent: Economics
---

6
docs/4_2_pre.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Pre-Economic Security
layout: default
nav_order: 2
parent: Economics
---

6
docs/4_3_post.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Post-Economic Security
layout: default
nav_order: 3
parent: Economics
---

View file

@ -0,0 +1,6 @@
---
title: Infrastructure
layout: default
nav_order: 5
has_children: true
---

View file

@ -0,0 +1,6 @@
---
title: Message Queue
layout: default
nav_order: 1
parent: Infrastructure
---

6
docs/5_2_processor.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Processor
layout: default
nav_order: 2
parent: Infrastructure
---

6
docs/5_3_coordinator.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Coordinator
layout: default
nav_order: 3
parent: Infrastructure
---

6
docs/5_4_serai.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Serai
layout: default
nav_order: 4
parent: Infrastructure
---

6
docs/6_0_validator.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Running a Validator
layout: default
nav_order: 6
has_children: true
---

4
docs/Gemfile Normal file
View file

@ -0,0 +1,4 @@
source 'https://rubygems.org'
gem "jekyll", "~> 4.3.3"
gem "just-the-docs", "0.8.1"

82
docs/Gemfile.lock Normal file
View file

@ -0,0 +1,82 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.2.3)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.16.3)
forwardable-extended (2.6.0)
google-protobuf (3.25.3-x86_64-linux)
http_parser.rb (0.8.0)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
jekyll (4.3.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
just-the-docs (0.8.1)
jekyll (>= 3.8.5)
jekyll-include-cache
jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.4)
rake (13.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
rouge (4.2.0)
safe_yaml (1.0.5)
sass-embedded (1.63.6)
google-protobuf (~> 3.23)
rake (>= 13.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.5.0)
webrick (1.8.1)
PLATFORMS
x86_64-linux
DEPENDENCIES
jekyll (~> 4.3.3)
just-the-docs (= 0.8.1)
BUNDLED WITH
2.2.5

5
docs/_config.yml Normal file
View file

@ -0,0 +1,5 @@
title: Serai Documentation
description: Documentation for the Serai protocol.
theme: just-the-docs
url: https://serai-dex.github.io/serai

7
docs/index.md Normal file
View file

@ -0,0 +1,7 @@
---
title: Home
layout: home
nav_order: 1
---
Documentation for Serai.