From c32d3413ba444f040651fc2efb344ec1f074f282 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Mon, 11 Mar 2024 17:55:27 -0400 Subject: [PATCH] Add just-the-docs based user-facing documentation --- .github/workflows/pages.yml | 90 +++++++++++++++++++++++++++++++++++++ README.md | 5 ++- docs/.gitignore | 7 +++ docs/.ruby-version | 1 + docs/2_amm.md | 5 +++ docs/3_cross_chain.md | 5 +++ docs/4_0_economics.md | 6 +++ docs/4_1_genesis.md | 6 +++ docs/4_2_pre.md | 6 +++ docs/4_3_post.md | 6 +++ docs/5_0_infrastructure.md | 6 +++ docs/5_1_message_queue.md | 6 +++ docs/5_2_processor.md | 6 +++ docs/5_3_coordinator.md | 6 +++ docs/5_4_serai.md | 6 +++ docs/6_0_validator.md | 6 +++ docs/Gemfile | 4 ++ docs/Gemfile.lock | 82 +++++++++++++++++++++++++++++++++ docs/_config.yml | 5 +++ docs/index.md | 7 +++ 20 files changed, 270 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pages.yml create mode 100644 docs/.gitignore create mode 100644 docs/.ruby-version create mode 100644 docs/2_amm.md create mode 100644 docs/3_cross_chain.md create mode 100644 docs/4_0_economics.md create mode 100644 docs/4_1_genesis.md create mode 100644 docs/4_2_pre.md create mode 100644 docs/4_3_post.md create mode 100644 docs/5_0_infrastructure.md create mode 100644 docs/5_1_message_queue.md create mode 100644 docs/5_2_processor.md create mode 100644 docs/5_3_coordinator.md create mode 100644 docs/5_4_serai.md create mode 100644 docs/6_0_validator.md create mode 100644 docs/Gemfile create mode 100644 docs/Gemfile.lock create mode 100644 docs/_config.yml create mode 100644 docs/index.md diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 00000000..7c4a1f12 --- /dev/null +++ b/.github/workflows/pages.yml @@ -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 diff --git a/README.md b/README.md index 8f8c1982..900de39d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,10 @@ wallet. - `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 Serai, none neatly fitting under another category. diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..be76315d --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,7 @@ +_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata + +.bundle/ +vendor/ diff --git a/docs/.ruby-version b/docs/.ruby-version new file mode 100644 index 00000000..8c50098d --- /dev/null +++ b/docs/.ruby-version @@ -0,0 +1 @@ +3.1 diff --git a/docs/2_amm.md b/docs/2_amm.md new file mode 100644 index 00000000..e3f14cc2 --- /dev/null +++ b/docs/2_amm.md @@ -0,0 +1,5 @@ +--- +title: Automatic Market Makers +layout: default +nav_order: 2 +--- diff --git a/docs/3_cross_chain.md b/docs/3_cross_chain.md new file mode 100644 index 00000000..212aa5b5 --- /dev/null +++ b/docs/3_cross_chain.md @@ -0,0 +1,5 @@ +--- +title: Cross-Chain Architecture +layout: default +nav_order: 3 +--- diff --git a/docs/4_0_economics.md b/docs/4_0_economics.md new file mode 100644 index 00000000..a77ed2c3 --- /dev/null +++ b/docs/4_0_economics.md @@ -0,0 +1,6 @@ +--- +title: Economics +layout: default +nav_order: 4 +has_children: true +--- diff --git a/docs/4_1_genesis.md b/docs/4_1_genesis.md new file mode 100644 index 00000000..d4dbef04 --- /dev/null +++ b/docs/4_1_genesis.md @@ -0,0 +1,6 @@ +--- +title: Genesis +layout: default +nav_order: 1 +parent: Economics +--- diff --git a/docs/4_2_pre.md b/docs/4_2_pre.md new file mode 100644 index 00000000..d891c51d --- /dev/null +++ b/docs/4_2_pre.md @@ -0,0 +1,6 @@ +--- +title: Pre-Economic Security +layout: default +nav_order: 2 +parent: Economics +--- diff --git a/docs/4_3_post.md b/docs/4_3_post.md new file mode 100644 index 00000000..4a41bd19 --- /dev/null +++ b/docs/4_3_post.md @@ -0,0 +1,6 @@ +--- +title: Post-Economic Security +layout: default +nav_order: 3 +parent: Economics +--- diff --git a/docs/5_0_infrastructure.md b/docs/5_0_infrastructure.md new file mode 100644 index 00000000..acb2be9f --- /dev/null +++ b/docs/5_0_infrastructure.md @@ -0,0 +1,6 @@ +--- +title: Infrastructure +layout: default +nav_order: 5 +has_children: true +--- diff --git a/docs/5_1_message_queue.md b/docs/5_1_message_queue.md new file mode 100644 index 00000000..b4d7b548 --- /dev/null +++ b/docs/5_1_message_queue.md @@ -0,0 +1,6 @@ +--- +title: Message Queue +layout: default +nav_order: 1 +parent: Infrastructure +--- diff --git a/docs/5_2_processor.md b/docs/5_2_processor.md new file mode 100644 index 00000000..3654bd15 --- /dev/null +++ b/docs/5_2_processor.md @@ -0,0 +1,6 @@ +--- +title: Processor +layout: default +nav_order: 2 +parent: Infrastructure +--- diff --git a/docs/5_3_coordinator.md b/docs/5_3_coordinator.md new file mode 100644 index 00000000..854cafc8 --- /dev/null +++ b/docs/5_3_coordinator.md @@ -0,0 +1,6 @@ +--- +title: Coordinator +layout: default +nav_order: 3 +parent: Infrastructure +--- diff --git a/docs/5_4_serai.md b/docs/5_4_serai.md new file mode 100644 index 00000000..bbd04aa0 --- /dev/null +++ b/docs/5_4_serai.md @@ -0,0 +1,6 @@ +--- +title: Serai +layout: default +nav_order: 4 +parent: Infrastructure +--- diff --git a/docs/6_0_validator.md b/docs/6_0_validator.md new file mode 100644 index 00000000..81db7be3 --- /dev/null +++ b/docs/6_0_validator.md @@ -0,0 +1,6 @@ +--- +title: Running a Validator +layout: default +nav_order: 6 +has_children: true +--- diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 00000000..0b800b1f --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem "jekyll", "~> 4.3.3" +gem "just-the-docs", "0.8.1" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 00000000..34e40cd9 --- /dev/null +++ b/docs/Gemfile.lock @@ -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 diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..45909735 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,5 @@ +title: Serai Documentation +description: Documentation for the Serai protocol. +theme: just-the-docs + +url: https://serai-dex.github.io/serai diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..99aa9831 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,7 @@ +--- +title: Home +layout: home +nav_order: 1 +--- + +Documentation for Serai.