diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..b24b235 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,33 @@ +name: github pages +on: + push: + branches: + - main + pull_request: + +jobs: + deploy: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v2 + + - name: Install cargo-sort from git + uses: baptiste0928/cargo-install@v2 + with: + crate: book-summary + - run: book-summary -n ./src -s cryptkeeper guides references -y + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: 'latest' + - run: mdbook build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./book diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7585238 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +book diff --git a/book.toml b/book.toml new file mode 100644 index 0000000..a040c15 --- /dev/null +++ b/book.toml @@ -0,0 +1,6 @@ +[book] +authors = ["AtHeartEngineer", "0xIsk", "0xmad"] +language = "en" +multilingual = false +src = "src" +title = "CryptKeeper Documentation" diff --git a/guides/integrating-cryptkeeper/README.md b/guides/integrating-cryptkeeper/README.md deleted file mode 100644 index c8a0bdb..0000000 --- a/guides/integrating-cryptkeeper/README.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -description: >- - This section will show you how to integrate your dapp with the CryptKeeper - extension. ---- - -# 🧱 Integrating CryptKeeper - -Before you begin, make sure you reviewed the [quick setup guide](../quick-setup.md) - -{% content-ref url="connect-to-extension.md" %} -[connect-to-extension.md](connect-to-extension.md) -{% endcontent-ref %} - -{% content-ref url="inject-client.md" %} -[inject-client.md](inject-client.md) -{% endcontent-ref %} - -{% content-ref url="create-identity.md" %} -[create-identity.md](create-identity.md) -{% endcontent-ref %} - -{% content-ref url="generate-proof.md" %} -[generate-proof.md](generate-proof.md) -{% endcontent-ref %} - -{% content-ref url="zkitter-examples.md" %} -[zkitter-examples.md](zkitter-examples.md) -{% endcontent-ref %} - -## diff --git a/src/# b/src/# new file mode 100644 index 0000000..b18be66 --- /dev/null +++ b/src/# @@ -0,0 +1 @@ +# References diff --git a/src/SUMMARY.md b/src/SUMMARY.md new file mode 100644 index 0000000..b42d83c --- /dev/null +++ b/src/SUMMARY.md @@ -0,0 +1,16 @@ +# Summary + +- [Cryptkeeper](#) + - [Features](cryptkeeper/features.md) + - [Overview](cryptkeeper/overview.md) +- [Guides](#) + - [Contributing](guides/contributing.md) + - [Integration](#) + - [Connect to Extension](guides/integration/connect-to-extension.md) + - [Create Identity](guides/integration/create-identity.md) + - [Generate Proof](guides/integration/generate-proof.md) + - [Inject Client](guides/integration/inject-client.md) + - [Zkitter Examples](guides/integration/zkitter-examples.md) +- [References](#) + - [Faq](references/faq.md) + - [Terms](references/terms.md) diff --git a/what-is-cryptkeeper/features.md b/src/cryptkeeper/features.md similarity index 100% rename from what-is-cryptkeeper/features.md rename to src/cryptkeeper/features.md diff --git a/what-is-cryptkeeper/overview.md b/src/cryptkeeper/overview.md similarity index 100% rename from what-is-cryptkeeper/overview.md rename to src/cryptkeeper/overview.md diff --git a/guides/quick-setup.md b/src/guides/contributing.md similarity index 100% rename from guides/quick-setup.md rename to src/guides/contributing.md diff --git a/guides/integrating-cryptkeeper/connect-to-extension.md b/src/guides/integration/connect-to-extension.md similarity index 100% rename from guides/integrating-cryptkeeper/connect-to-extension.md rename to src/guides/integration/connect-to-extension.md diff --git a/guides/integrating-cryptkeeper/create-identity.md b/src/guides/integration/create-identity.md similarity index 100% rename from guides/integrating-cryptkeeper/create-identity.md rename to src/guides/integration/create-identity.md diff --git a/guides/integrating-cryptkeeper/generate-proof.md b/src/guides/integration/generate-proof.md similarity index 100% rename from guides/integrating-cryptkeeper/generate-proof.md rename to src/guides/integration/generate-proof.md diff --git a/guides/integrating-cryptkeeper/inject-client.md b/src/guides/integration/inject-client.md similarity index 100% rename from guides/integrating-cryptkeeper/inject-client.md rename to src/guides/integration/inject-client.md diff --git a/guides/integrating-cryptkeeper/zkitter-examples.md b/src/guides/integration/zkitter-examples.md similarity index 100% rename from guides/integrating-cryptkeeper/zkitter-examples.md rename to src/guides/integration/zkitter-examples.md diff --git a/references/faq.md b/src/references/faq.md similarity index 100% rename from references/faq.md rename to src/references/faq.md diff --git a/references/terms.md b/src/references/terms.md similarity index 100% rename from references/terms.md rename to src/references/terms.md