Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Docusaurus to V3 #600

Merged
merged 4 commits into from
Jan 26, 2024
Merged
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
96 changes: 0 additions & 96 deletions apps/docs/docusaurus.config.js

This file was deleted.

91 changes: 91 additions & 0 deletions apps/docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import type * as Preset from "@docusaurus/preset-classic"
import type { Config } from "@docusaurus/types"
import { themes } from "prism-react-renderer"

const lightCodeTheme = themes.github
const darkCodeTheme = themes.dracula

const config: Config = {
title: "Semaphore",
tagline: "Documentation and Guides",
url: "https://docs.semaphore.pse.dev/",
baseUrl: "/",
favicon: "/img/favicon.ico",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
organizationName: "semaphore-protocol",
projectName: "semaphore",
trailingSlash: false,
plugins: ["docusaurus-plugin-sass"],
i18n: {
defaultLocale: "en",
locales: ["en", "es"]
},
presets: [
[
"classic",
{
docs: {
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://github.com/semaphore-protocol/website/edit/main/",
includeCurrentVersion: false
},
theme: {
customCss: [require.resolve("./src/css/custom.scss")]
}
} satisfies Preset.Options
]
],
themeConfig: {
// announcementBar: {
// id: "semaphore-v4-alpha",
// content:
// '<b>We are pleased to announce the release of Semaphore V4-alpha 🎉</b>',
// backgroundColor: "#DAE0FF",
// textColor: "#000000"
// },
navbar: {
logo: {
alt: "Semaphore Logo",
src: "img/semaphore-logo.svg"
},
items: [
{
label: "Whitepaper",
to: "https://docs.semaphore.pse.dev/whitepaper-v1.pdf",
position: "right",
className: "V1"
},
{
label: "Github",
href: "https://github.com/semaphore-protocol",
position: "right"
},
{
type: "localeDropdown",
position: "right"
}
]
},
colorMode: {
defaultMode: "dark",
// Should we use the prefers-color-scheme media-query,
// using user system preferences, instead of the hardcoded defaultMode
respectPrefersColorScheme: true
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["solidity", "bash", "typescript"]
},
algolia: {
appId: "6P229KVKCB",
apiKey: "879bb5b002b6370f181f0f79f5c2afe2",
indexName: "semaphoreliedzkp",
contextualSearch: true
}
} satisfies Preset.ThemeConfig
}

export default config
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For more information, see [Merkle tree in Wikipedia](https://en.wikipedia.org/wi

A value used to prevent double entry or double signalling.

See [Circuit nullifier hash](/technical-reference/circuits/#nullifier-hash).
See [Circuit nullifier hash](/technical-reference/circuits/#hash-anulador-nullifier-hash).

## Relay

Expand All @@ -60,5 +60,5 @@ To generate or verify valid zero-knowledge proofs with Semaphore, applications m
- semaphore.wasm
- semaphore.json

For a complete list of ready-to-use files, see <http://www.trusted-setup-pse.org>.
For a complete list of ready-to-use files, see [trusted-setup-pse.org](https://www.trusted-setup-pse.org).
To learn more, see the [trusted setup ceremony](https://storage.googleapis.com/trustedsetup-a86f4.appspot.com/semaphore/semaphore_top_index.html).
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ title: Groups

Use Semaphore in your application or smart contract to create off-chain and on-chain groups.

A [Semaphore group](/glossary/#semaphore-group) contains [identity commitments](/glossary/#identity-commitment) of group members.
A [Semaphore group](/glossary/#grupo-semaphore) contains [identity commitments](/glossary/#compromiso-de-identidad-identity-commitment) of group members.
Example uses of groups include the following:

- Poll question that attendees join to rate an event.
- Ballot that members join to vote on a proposal.
- Whistleblowers who are verified employees of an organization.

A Semaphore group is an [incremental Merkle tree](/glossary/#incremental-merkle-tree), and group members (i.e., [identity commitments](/glossary/#identity-commitments)) are tree leaves.
A Semaphore group is an [incremental Merkle tree](/glossary/#árbol-de-merkle-merkle-tree), and group members (i.e., identity commitments) are tree leaves.
Semaphore groups set the following two parameters:

- **Tree depth**: the maximum number of members a group can contain (`max size = 2 ^ tree depth`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Para generar o verificar pruebas válidas de conocimiento cero con Semaphore, la
- semaphore.wasm
- semaphore.json

Para ver una lista completa de archivos listos para utilizarse, vea <http://www.trusted-setup-pse.org>.
Para ver una lista completa de archivos listos para utilizarse, vea [trusted-setup-pse.org](https://www.trusted-setup-pse.org).
Para aprender más, vea la [ceremonia de configuración de confianza](https://storage.googleapis.com/trustedsetup-a86f4.appspot.com/semaphore/semaphore_top_index.html) (trusted setup ceremony).

## Señales (Signals)
Expand Down
26 changes: 13 additions & 13 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "semaphore-docs",
"version": "2.0.0",
"private": true,
"scripts": {
"start": "docusaurus start",
Expand All @@ -14,26 +13,24 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.2.0",
"@docusaurus/preset-classic": "2.2.0",
"@mdx-js/react": "^1.6.22",
"@docusaurus/core": "3.1.0",
"@docusaurus/preset-classic": "3.1.0",
"@mdx-js/react": "^3.0.0",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.2.1",
"docusaurus-plugin-sass": "^0.2.2",
"file-loader": "^6.2.0",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.52.3",
"url-loader": "^4.1.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.2.0",
"@tsconfig/docusaurus": "^1.0.6",
"@types/react": "^17.0.14",
"@types/react-helmet": "^6.1.2",
"@types/react-router-dom": "^5.1.8",
"typescript": "^4.3.5"
"@docusaurus/module-type-aliases": "3.1.0",
"@docusaurus/tsconfig": "3.1.0",
"@types/react": "^18.2.29",
"typescript": "~5.2.2"
},
"browserslist": {
"production": [
Expand All @@ -46,5 +43,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion apps/docs/src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/* You can override the default Infima variables here. */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=DMSans:wght@400;500;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap");

:root {
--ifm-color-primary: "linear(to-r, #4771ea, #2735a6)";
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/versioned_docs/version-V2/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ To generate or verify valid zero-knowledge proofs with Semaphore, applications m
- semaphore.wasm
- semaphore.json

For a complete list of ready-to-use files, see <http://www.trusted-setup-pse.org>.
For a complete list of ready-to-use files, see [trusted-setup-pse.org](https://www.trusted-setup-pse.org).
To learn more, see the [trusted setup ceremony](https://storage.googleapis.com/trustedsetup-a86f4.appspot.com/semaphore/semaphore_top_index.html).
2 changes: 1 addition & 1 deletion apps/docs/versioned_docs/version-V3/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ To generate or verify valid zero-knowledge proofs with Semaphore, applications m
- semaphore.wasm
- semaphore.json

For a complete list of ready-to-use files, see <http://www.trusted-setup-pse.org>.
For a complete list of ready-to-use files, see [trusted-setup-pse.org](https://www.trusted-setup-pse.org).
To learn more, see the [trusted setup ceremony](https://storage.googleapis.com/trustedsetup-a86f4.appspot.com/semaphore/semaphore_top_index.html).

## Signals
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/versioned_sidebars/version-V1-sidebars.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version-V1/mySidebar": [
"mySidebar": [
{
"type": "autogenerated",
"dirName": "."
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/versioned_sidebars/version-V2-sidebars.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version-V2/mySidebar": [
"mySidebar": [
{
"type": "autogenerated",
"dirName": "."
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/versioned_sidebars/version-V3-sidebars.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version-V3/mySidebar": [
"mySidebar": [
{
"type": "autogenerated",
"dirName": "."
Expand Down
1 change: 0 additions & 1 deletion apps/website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "semaphore-website",
"version": "2.0.0",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
Loading
Loading