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

fix(website): website build #1882

Merged
merged 1 commit into from
Oct 30, 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
2 changes: 2 additions & 0 deletions apps/website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ yarn-error.log*

versioned_docs/version-v2.x/developers-references/typescript-code/typedoc/
versioned_docs/version-v2.x/developers-references/smart-contracts/solidity-docs/
versioned_docs/version-v2.x/technical-references/typescript-code/typedoc/
versioned_docs/version-v2.x/technical-references/smart-contracts/solidity-docs/
10 changes: 5 additions & 5 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
"types": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@docusaurus/core": "^3.5.1",
"@docusaurus/preset-classic": "^3.5.1",
"@docusaurus/theme-classic": "^3.5.1",
"@docusaurus/core": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
"@docusaurus/theme-classic": "^3.5.2",
"@docusaurus/theme-common": "^3.5.2",
"@docusaurus/types": "^3.5.1",
"@easyops-cn/docusaurus-search-local": "^0.44.5",
"@easyops-cn/docusaurus-search-local": "^0.45.0",
"@mdx-js/react": "^3.0.1",
"clsx": "^2.1.1",
"docusaurus-plugin-image-zoom": "^2.0.0",
Expand All @@ -38,6 +37,7 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.5.2",
"@docusaurus/tsconfig": "^3.5.2",
"@docusaurus/types": "^3.5.2",
"@types/node": "^22.8.1",
"@types/react": "^18.3.11",
"ts-node": "^10.9.2",
Expand Down
33 changes: 18 additions & 15 deletions apps/website/src/pages/blogs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import LayoutProvider from "@theme/Layout/Provider";
import React from "react";

import styles from "../css/card.module.css";
Expand Down Expand Up @@ -28,27 +29,29 @@ const BlogPage: React.FC = () => {
}

return (
<Layout title="Blog">
<div className={styles.blogContainer}>
<div className={styles.blogList}>
{blogPosts.map((post: BlogPost) => (
<a key={post.slug} className={styles.blogCard} href={`/blog/${post.slug}`}>
<h2 className={styles.blogTitle}>{post.title}</h2>
<LayoutProvider>
<Layout title="Blog">
<div className={styles.blogContainer}>
<div className={styles.blogList}>
{blogPosts.map((post: BlogPost) => (
<a key={post.slug} className={styles.blogCard} href={`/blog/${post.slug}`}>
<h2 className={styles.blogTitle}>{post.title}</h2>

<p className={styles.blogDescription}>{post.description}</p>
<p className={styles.blogDescription}>{post.description}</p>

<p className={styles.blogDate}>{post.date}</p>
<p className={styles.blogDate}>{post.date}</p>

<p className={styles.blogAuthors}>By {post.authorName}</p>
<p className={styles.blogAuthors}>By {post.authorName}</p>

<p className={styles.blogExcerpt}>{post.excerpt}</p>
<p className={styles.blogExcerpt}>{post.excerpt}</p>

<span className={styles.blogReadMoreButton}>Read More</span>
</a>
))}
<span className={styles.blogReadMoreButton}>Read More</span>
</a>
))}
</div>
</div>
</div>
</Layout>
</Layout>
</LayoutProvider>
);
};

Expand Down
59 changes: 31 additions & 28 deletions apps/website/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import LayoutProvider from "@theme/Layout/Provider";
import clsx from "clsx";

import HomepageFeatures from "../components/HomepageFeatures";
Expand Down Expand Up @@ -27,34 +28,36 @@ const Home = (): JSX.Element => {
const { siteConfig } = useDocusaurusContext();

return (
<Layout
description="Minimal Anti-Collusion Infrastructure (MACI) is an on-chain voting platform which protects privacy and minimizes the risk of collusion and bribery"
title={`Minimal Anti-Collusion Infrastructure (${siteConfig.title})`}
>
<HomepageHeader tagline={siteConfig.tagline} title={siteConfig.title} />

<main>
<section className={styles.introduction}>
<div className="container">
<h2 className={styles.borderBlue}>What is MACI?</h2>

<p>Minimal Anti-Collusion Infrastructure (MACI) is a private, on-chain, voting system.</p>

<p>
MACI is our attempt to build the most secure e-voting solution available. It enables on-chain voting
processes with significantly reduced risk of cheating, like bribery or collusion, through the use of
Ethereum smart contracts, encryption, and zero-knowledge proofs. Together these technologies provide a set
of guarantees including censorship resistance, correct execution, privacy, and a receipt-free voting
scheme, which ensures results are transparent but makes it impossible for outsiders to verify how any
specific user voted. We believe MACI is most beneficial for governance and funding events, when the stakes
are high and anti-collusion mechanisms are critical to help ensure fair and transparent outcomes.
</p>
</div>
</section>

<HomepageFeatures />
</main>
</Layout>
<LayoutProvider>
<Layout
description="Minimal Anti-Collusion Infrastructure (MACI) is an on-chain voting platform which protects privacy and minimizes the risk of collusion and bribery"
title={`Minimal Anti-Collusion Infrastructure (${siteConfig.title})`}
>
<HomepageHeader tagline={siteConfig.tagline} title={siteConfig.title} />

<main>
<section className={styles.introduction}>
<div className="container">
<h2 className={styles.borderBlue}>What is MACI?</h2>

<p>Minimal Anti-Collusion Infrastructure (MACI) is a private, on-chain, voting system.</p>

<p>
MACI is our attempt to build the most secure e-voting solution available. It enables on-chain voting
processes with significantly reduced risk of cheating, like bribery or collusion, through the use of
Ethereum smart contracts, encryption, and zero-knowledge proofs. Together these technologies provide a
set of guarantees including censorship resistance, correct execution, privacy, and a receipt-free voting
scheme, which ensures results are transparent but makes it impossible for outsiders to verify how any
specific user voted. We believe MACI is most beneficial for governance and funding events, when the
stakes are high and anti-collusion mechanisms are critical to help ensure fair and transparent outcomes.
</p>
</div>
</section>

<HomepageFeatures />
</main>
</Layout>
</LayoutProvider>
);
};

Expand Down
29 changes: 16 additions & 13 deletions apps/website/src/pages/projects.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Layout from "@theme/Layout";
import LayoutProvider from "@theme/Layout/Provider";
import clsx from "clsx";

import ProjectsList from "../components/ProjectList";
Expand All @@ -23,19 +24,21 @@ const ProjectspageHeader = ({ tagline, title }: ProjectspageHeaderProps) => (
);

const Projects: React.FC = () => (
<Layout description="A list of projects built with the MACI protocol" title="Projects built with MACI">
<div>
<ProjectspageHeader tagline="Explore the projects built by the MACI community" title="Projects" />
</div>

<main>
<section className={styles.introduction}>
<div className="container">
<ProjectsList />
</div>
</section>
</main>
</Layout>
<LayoutProvider>
<Layout description="A list of projects built with the MACI protocol" title="Projects built with MACI">
<div>
<ProjectspageHeader tagline="Explore the projects built by the MACI community" title="Projects" />
</div>

<main>
<section className={styles.introduction}>
<div className="container">
<ProjectsList />
</div>
</section>
</main>
</Layout>
</LayoutProvider>
);

export default Projects;
3 changes: 2 additions & 1 deletion apps/website/src/plugins/blog-plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Plugin as DocusaurusPlugin } from "@docusaurus/types";
import matter from "gray-matter";

import fs from "fs";
import path from "path";

import type { Plugin as DocusaurusPlugin } from "@docusaurus/types";

interface BlogPost {
title: string;
date: string;
Expand Down
Loading
Loading