From 49a8331f8fabf069f193d25f78210dc733faa864 Mon Sep 17 00:00:00 2001 From: "Abdel @ StarkWare" Date: Wed, 18 Sep 2024 10:41:39 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=92=84=20deploy=20docsite=20to=20page?= =?UTF-8?q?s=20using=20mkdocs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pages.yml | 31 ++++++++++++++++++++ .gitignore | 3 ++ 00.md => docs/00.md | 0 01.md => docs/01.md | 0 02.md => docs/02.md | 0 03.md => docs/03.md | 0 04.md => docs/04.md | 0 05.md => docs/05.md | 0 06.md => docs/06.md | 0 07.md => docs/07.md | 0 08.md => docs/08.md | 0 09.md => docs/09.md | 0 10.md => docs/10.md | 0 11.md => docs/11.md | 0 12.md => docs/12.md | 0 13.md => docs/13.md | 0 14.md => docs/14.md | 0 15.md => docs/15.md | 0 16.md => docs/16.md | 0 17.md => docs/17.md | 0 README.md => docs/README.md | 0 error_codes.md => docs/error_codes.md | 0 {tests => docs/tests}/00-tests.md | 0 {tests => docs/tests}/01-tests.md | 0 {tests => docs/tests}/02-tests.md | 0 {tests => docs/tests}/11-test.md | 0 {tests => docs/tests}/12-tests.md | 0 {tests => docs/tests}/13-tests.md | 0 {tests => docs/tests}/README.md | 0 mkdocs.yml | 41 +++++++++++++++++++++++++++ requirements.txt | 4 +++ 31 files changed, 79 insertions(+) create mode 100644 .github/workflows/pages.yml create mode 100644 .gitignore rename 00.md => docs/00.md (100%) rename 01.md => docs/01.md (100%) rename 02.md => docs/02.md (100%) rename 03.md => docs/03.md (100%) rename 04.md => docs/04.md (100%) rename 05.md => docs/05.md (100%) rename 06.md => docs/06.md (100%) rename 07.md => docs/07.md (100%) rename 08.md => docs/08.md (100%) rename 09.md => docs/09.md (100%) rename 10.md => docs/10.md (100%) rename 11.md => docs/11.md (100%) rename 12.md => docs/12.md (100%) rename 13.md => docs/13.md (100%) rename 14.md => docs/14.md (100%) rename 15.md => docs/15.md (100%) rename 16.md => docs/16.md (100%) rename 17.md => docs/17.md (100%) rename README.md => docs/README.md (100%) rename error_codes.md => docs/error_codes.md (100%) rename {tests => docs/tests}/00-tests.md (100%) rename {tests => docs/tests}/01-tests.md (100%) rename {tests => docs/tests}/02-tests.md (100%) rename {tests => docs/tests}/11-test.md (100%) rename {tests => docs/tests}/12-tests.md (100%) rename {tests => docs/tests}/13-tests.md (100%) rename {tests => docs/tests}/README.md (100%) create mode 100644 mkdocs.yml create mode 100644 requirements.txt diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..42fa4b7 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,31 @@ +name: Deploy MkDocs Site to GitHub Pages + +on: + push: + branches: + - main + +permissions: write-all + +jobs: + build-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Install Dependencies + run: pip install -r requirements.txt + + - name: Build the Site + run: mkdocs build --clean + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..63d938a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +**/node_modules +dist/ +site/ \ No newline at end of file diff --git a/00.md b/docs/00.md similarity index 100% rename from 00.md rename to docs/00.md diff --git a/01.md b/docs/01.md similarity index 100% rename from 01.md rename to docs/01.md diff --git a/02.md b/docs/02.md similarity index 100% rename from 02.md rename to docs/02.md diff --git a/03.md b/docs/03.md similarity index 100% rename from 03.md rename to docs/03.md diff --git a/04.md b/docs/04.md similarity index 100% rename from 04.md rename to docs/04.md diff --git a/05.md b/docs/05.md similarity index 100% rename from 05.md rename to docs/05.md diff --git a/06.md b/docs/06.md similarity index 100% rename from 06.md rename to docs/06.md diff --git a/07.md b/docs/07.md similarity index 100% rename from 07.md rename to docs/07.md diff --git a/08.md b/docs/08.md similarity index 100% rename from 08.md rename to docs/08.md diff --git a/09.md b/docs/09.md similarity index 100% rename from 09.md rename to docs/09.md diff --git a/10.md b/docs/10.md similarity index 100% rename from 10.md rename to docs/10.md diff --git a/11.md b/docs/11.md similarity index 100% rename from 11.md rename to docs/11.md diff --git a/12.md b/docs/12.md similarity index 100% rename from 12.md rename to docs/12.md diff --git a/13.md b/docs/13.md similarity index 100% rename from 13.md rename to docs/13.md diff --git a/14.md b/docs/14.md similarity index 100% rename from 14.md rename to docs/14.md diff --git a/15.md b/docs/15.md similarity index 100% rename from 15.md rename to docs/15.md diff --git a/16.md b/docs/16.md similarity index 100% rename from 16.md rename to docs/16.md diff --git a/17.md b/docs/17.md similarity index 100% rename from 17.md rename to docs/17.md diff --git a/README.md b/docs/README.md similarity index 100% rename from README.md rename to docs/README.md diff --git a/error_codes.md b/docs/error_codes.md similarity index 100% rename from error_codes.md rename to docs/error_codes.md diff --git a/tests/00-tests.md b/docs/tests/00-tests.md similarity index 100% rename from tests/00-tests.md rename to docs/tests/00-tests.md diff --git a/tests/01-tests.md b/docs/tests/01-tests.md similarity index 100% rename from tests/01-tests.md rename to docs/tests/01-tests.md diff --git a/tests/02-tests.md b/docs/tests/02-tests.md similarity index 100% rename from tests/02-tests.md rename to docs/tests/02-tests.md diff --git a/tests/11-test.md b/docs/tests/11-test.md similarity index 100% rename from tests/11-test.md rename to docs/tests/11-test.md diff --git a/tests/12-tests.md b/docs/tests/12-tests.md similarity index 100% rename from tests/12-tests.md rename to docs/tests/12-tests.md diff --git a/tests/13-tests.md b/docs/tests/13-tests.md similarity index 100% rename from tests/13-tests.md rename to docs/tests/13-tests.md diff --git a/tests/README.md b/docs/tests/README.md similarity index 100% rename from tests/README.md rename to docs/tests/README.md diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..5fedeff --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,41 @@ +site_name: Cashu NUTs Specifications +site_url: https://cashubtc.github.io/nuts/ +theme: + name: material + features: + - navigation.expand + - navigation.sections + - navigation.top + - search.highlight + - search.share + - toc.integrate + - content.code.copy + - content.tabs.link + - announce.dismiss + palette: + - scheme: default + primary: indigo + accent: indigo + icon: + logo: material/hand-coin +nav: + - Home: README.md + - NUTs: + - Mandatory: + - NUT-00: 00.md + - NUT-01: 01.md + # Add more mandatory NUTs here + - Optional: + - NUT-03: 03.md + # Add more optional NUTs here +plugins: + - search + - macros + - section-index +markdown_extensions: + - admonition + - codehilite + - toc: + permalink: true +extra_javascript: + - javascripts/filter.js diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8a28228 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +mkdocs +mkdocs-material +mkdocs-macros-plugin +mkdocs-section-index From 059b2f778890b0c60ccdb17217429ec4825eed0e Mon Sep 17 00:00:00 2001 From: "Abdel @ StarkWare" Date: Wed, 18 Sep 2024 10:47:38 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20update=20mandatory=20/=20opt?= =?UTF-8?q?ional=20list=20for=20mkdocs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mkdocs.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 5fedeff..b2461a8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -24,9 +24,24 @@ nav: - Mandatory: - NUT-00: 00.md - NUT-01: 01.md + - NUT-02: 02.md + - NUT-03: 03.md + - NUT-04: 04.md + - NUT-05: 05.md + - NUT-06: 06.md # Add more mandatory NUTs here - Optional: - - NUT-03: 03.md + - NUT-07: 07.md + - NUT-08: 08.md + - NUT-09: 09.md + - NUT-10: 10.md + - NUT-11: 11.md + - NUT-12: 12.md + - NUT-13: 13.md + - NUT-14: 14.md + - NUT-15: 15.md + - NUT-16: 16.md + - NUT-17: 17.md # Add more optional NUTs here plugins: - search @@ -37,5 +52,3 @@ markdown_extensions: - codehilite - toc: permalink: true -extra_javascript: - - javascripts/filter.js