Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ updates:
labels:
- "dependencies"

# GitHub Actions
# GitHub Actions — pin to commit hash, version in comment
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Build
uses: ConsenSys/github-actions/docs-build@60d442d6d385b414c8e00eb049a85f56f9fd7be7 # main
uses: ConsenSys/github-actions/docs-build@fc0af6d42d0f61684302d0638e92f35f923f5fbd # main
2 changes: 1 addition & 1 deletion .github/workflows/case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Case check action
uses: ConsenSys/github-actions/docs-case-check@60d442d6d385b414c8e00eb049a85f56f9fd7be7 # main
uses: ConsenSys/github-actions/docs-case-check@fc0af6d42d0f61684302d0638e92f35f923f5fbd # main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOC_DIR: ${{ matrix.folder }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: LinkCheck
uses: ConsenSys/github-actions/docs-link-check@60d442d6d385b414c8e00eb049a85f56f9fd7be7 # main
uses: ConsenSys/github-actions/docs-link-check@fc0af6d42d0f61684302d0638e92f35f923f5fbd # main
with:
CONFIG_FILE: .linkspector.yml
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Lint code
uses: ConsenSys/github-actions/docs-lint-all@60d442d6d385b414c8e00eb049a85f56f9fd7be7 # main
uses: ConsenSys/github-actions/docs-lint-all@fc0af6d42d0f61684302d0638e92f35f923f5fbd # main

- name: Lint markdown
uses: ConsenSys/github-actions/docs-lint-markdown@60d442d6d385b414c8e00eb049a85f56f9fd7be7 # main
uses: ConsenSys/github-actions/docs-lint-markdown@fc0af6d42d0f61684302d0638e92f35f923f5fbd # main

2 changes: 1 addition & 1 deletion .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Vale
uses: Consensys/github-actions/docs-spelling-check@60d442d6d385b414c8e00eb049a85f56f9fd7be7 # main
uses: Consensys/github-actions/docs-spelling-check@fc0af6d42d0f61684302d0638e92f35f923f5fbd # main
2 changes: 1 addition & 1 deletion .github/workflows/trivy-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Trivy Cache
uses: ConsenSys/github-actions/trivy-update-cache@60d442d6d385b414c8e00eb049a85f56f9fd7be7 # main
uses: ConsenSys/github-actions/trivy-update-cache@fc0af6d42d0f61684302d0638e92f35f923f5fbd # main
5 changes: 3 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
name: Run trivy scanner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Trivy
uses: ConsenSys/github-actions/trivy@main
uses: ConsenSys/github-actions/trivy@fc0af6d42d0f61684302d0638e92f35f923f5fbd # main

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.14.0
v22
22 changes: 10 additions & 12 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ const fs = require("fs");
const lightCodeTheme = require("prism-react-renderer").themes.github;
const darkCodeTheme = require("prism-react-renderer").themes.dracula;

const math = require("remark-math");
const katex = require("rehype-katex");

const isDev = process.env.NODE_ENV === "development";
const baseUrl = isDev ? "/" : "/";

/** @type {import('@docusaurus/types').Config} */
const config = {
title: "gnark",
tagline:
"A fast zk-SNARK library that offers a high-level API to design circuits",
url: "https://docs.gnark.consensys.io",
baseUrl,
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/favicon.ico",
Expand Down Expand Up @@ -44,10 +38,6 @@ const config = {
editUrl: "https://github.com/ConsenSys/doc.gnark/tree/main/",
routeBasePath: "/",
path: "docs",
// @ts-ignore
// eslint-disable-next-line global-require
remarkPlugins: [math],
rehypePlugins: [katex],
include: ["**/*.md", "**/*.mdx"],
exclude: [
"**/_*.{js,jsx,ts,tsx,md,mdx}",
Expand Down Expand Up @@ -246,4 +236,12 @@ const config = {
themes: [],
};

module.exports = config;
module.exports = async function createConfig() {
const remarkMath = (await import("remark-math")).default;
const rehypeKatex = (await import("rehype-katex")).default;

config.presets[0][1].docs.remarkPlugins = [remarkMath];
config.presets[0][1].docs.rehypePlugins = [rehypeKatex];

return config;
};
Loading
Loading