From 09858d0783ac175032c206737d5df95321bc9468 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Wed, 10 Sep 2025 16:14:33 +0200 Subject: [PATCH] Change md path --- web/components/markdown.tsx | 21 +++++++++++++++++++++ web/pages/constitution.tsx | 19 +++++++++++++++++++ web/pages/faq.tsx | 19 +++++++++++++++++++ web/pages/financials.tsx | 19 +++++++++++++++++++ web/pages/md/[filename].tsx | 24 +++++++----------------- web/pages/members.tsx | 19 +++++++++++++++++++ web/public/md/constitution.md | 2 +- web/public/md/faq.md | 4 ++-- web/public/md/members.md | 2 +- 9 files changed, 108 insertions(+), 21 deletions(-) create mode 100644 web/components/markdown.tsx create mode 100644 web/pages/constitution.tsx create mode 100644 web/pages/faq.tsx create mode 100644 web/pages/financials.tsx create mode 100644 web/pages/members.tsx diff --git a/web/components/markdown.tsx b/web/components/markdown.tsx new file mode 100644 index 00000000..19286cbb --- /dev/null +++ b/web/components/markdown.tsx @@ -0,0 +1,21 @@ +import {LovePage} from "web/components/love-page"; +import {Col} from "web/components/layout/col"; +import ReactMarkdown from "react-markdown"; +import React from "react"; + +type Props = { + content: string; + filename: string; +}; + +export default function MarkdownPage({ content, filename }: Props) { + return ( + + + + {content} + + + + ); +} \ No newline at end of file diff --git a/web/pages/constitution.tsx b/web/pages/constitution.tsx new file mode 100644 index 00000000..094f437c --- /dev/null +++ b/web/pages/constitution.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + +import fs from 'fs'; +import path from 'path'; +import MarkdownPage from "web/components/markdown"; + +const FILENAME = 'constitution'; + +export async function getStaticProps() { + const filePath = path.join(process.cwd(), 'public', 'md', FILENAME + '.md'); + const content = fs.readFileSync(filePath, 'utf8'); + return {props: {content}}; +} + +type Props = { content: string }; + +export default function Faq({content}: Props) { + return +} diff --git a/web/pages/faq.tsx b/web/pages/faq.tsx new file mode 100644 index 00000000..e16482eb --- /dev/null +++ b/web/pages/faq.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + +import fs from 'fs'; +import path from 'path'; +import MarkdownPage from "web/components/markdown"; + +const FILENAME = 'faq'; + +export async function getStaticProps() { + const filePath = path.join(process.cwd(), 'public', 'md', FILENAME + '.md'); + const content = fs.readFileSync(filePath, 'utf8'); + return {props: {content}}; +} + +type Props = { content: string }; + +export default function Faq({content}: Props) { + return +} diff --git a/web/pages/financials.tsx b/web/pages/financials.tsx new file mode 100644 index 00000000..0cd4f412 --- /dev/null +++ b/web/pages/financials.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + +import fs from 'fs'; +import path from 'path'; +import MarkdownPage from "web/components/markdown"; + +const FILENAME = 'financials'; + +export async function getStaticProps() { + const filePath = path.join(process.cwd(), 'public', 'md', FILENAME + '.md'); + const content = fs.readFileSync(filePath, 'utf8'); + return {props: {content}}; +} + +type Props = { content: string }; + +export default function Faq({content}: Props) { + return +} diff --git a/web/pages/md/[filename].tsx b/web/pages/md/[filename].tsx index c50fa6df..2adb4cf9 100644 --- a/web/pages/md/[filename].tsx +++ b/web/pages/md/[filename].tsx @@ -1,39 +1,29 @@ import React from 'react'; -import ReactMarkdown from 'react-markdown'; import fs from 'fs'; import path from 'path'; -import {LovePage} from "web/components/love-page"; -import {Col} from "web/components/layout/col"; +import MarkdownPage from "web/components/markdown"; type Props = { content: string; filename: string; }; -export default function MarkdownPage({ content, filename }: Props) { - return ( - - - - {content} - - - - ); +export default function Markdown({content, filename}: Props) { + return } export async function getStaticPaths() { const mdDir = path.join(process.cwd(), 'public', 'md'); const files = fs.readdirSync(mdDir); const paths = files.map((file) => ({ - params: { filename: file.replace(/\.md$/, '') }, + params: {filename: file.replace(/\.md$/, '')}, })); - return { paths, fallback: false }; + return {paths, fallback: false}; } -export async function getStaticProps({ params }: { params: { filename: string } }) { +export async function getStaticProps({params}: { params: { filename: string } }) { const filePath = path.join(process.cwd(), 'public', 'md', `${params.filename}.md`); const content = fs.readFileSync(filePath, 'utf8'); - return { props: { content, filename: params.filename } }; + return {props: {content, filename: params.filename}}; } diff --git a/web/pages/members.tsx b/web/pages/members.tsx new file mode 100644 index 00000000..a21ef753 --- /dev/null +++ b/web/pages/members.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + +import fs from 'fs'; +import path from 'path'; +import MarkdownPage from "web/components/markdown"; + +const FILENAME = 'members'; + +export async function getStaticProps() { + const filePath = path.join(process.cwd(), 'public', 'md', FILENAME + '.md'); + const content = fs.readFileSync(filePath, 'utf8'); + return {props: {content}}; +} + +type Props = { content: string }; + +export default function Faq({content}: Props) { + return +} diff --git a/web/public/md/constitution.md b/web/public/md/constitution.md index 6481b447..48c0761f 100644 --- a/web/public/md/constitution.md +++ b/web/public/md/constitution.md @@ -27,7 +27,7 @@ We, the community of Compass, commit to building and maintaining this project in - Sustained inactivity (e.g., less than 10 hours of contribution for 12 months). - Proven bad-faith conduct (vote manipulation, harassment, sabotage). Removal requires a **2/3 vote** of Members. -[Current members and administrators](/md/members) +[Current members and administrators](/members) ## Article III: Governance Structure diff --git a/web/public/md/faq.md b/web/public/md/faq.md index 1a25c099..068d0e51 100644 --- a/web/public/md/faq.md +++ b/web/public/md/faq.md @@ -33,7 +33,7 @@ Martin continues to serve as an initiator and steward of Compass, but its direct ### How does governance work? -Compass is run democratically under a [constitution](/md/constitution) that prevents central control and ensures long-term alignment with its mission. +Compass is run democratically under a [constitution](/constitution) that prevents central control and ensures long-term alignment with its mission. * Major decisions (scope, funding, rules) are voted on by **active contributors**. * The full constitution is **public and transparent**. @@ -57,7 +57,7 @@ Through **donations from the community**. Options include: * PayPal * GitHub Sponsors -All funding and expenses are **publicly documented** [here](/md/financials). +All funding and expenses are **publicly documented** [here](/financials). ### Is my data safe? diff --git a/web/public/md/members.md b/web/public/md/members.md index 43aced5e..c440a82b 100644 --- a/web/public/md/members.md +++ b/web/public/md/members.md @@ -1,6 +1,6 @@ # Current Members and Administrators -See the [full constitution](/md/constitution) for details on membership criteria and governance structure. +See the [full constitution](/constitution) for details on membership criteria and governance structure. ### Members