mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-05-24 08:49:39 -04:00
Change md path
This commit is contained in:
21
web/components/markdown.tsx
Normal file
21
web/components/markdown.tsx
Normal file
@@ -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 (
|
||||
<LovePage trackPageView={filename} className={'col-span-8'}>
|
||||
<Col className="items-center">
|
||||
<Col className='bg-canvas-0 w-full rounded px-3 py-4 sm:px-6 space-y-4 customlink'>
|
||||
<ReactMarkdown>{content}</ReactMarkdown>
|
||||
</Col>
|
||||
</Col>
|
||||
</LovePage>
|
||||
);
|
||||
}
|
||||
19
web/pages/constitution.tsx
Normal file
19
web/pages/constitution.tsx
Normal file
@@ -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 <MarkdownPage content={content} filename={FILENAME}></MarkdownPage>
|
||||
}
|
||||
19
web/pages/faq.tsx
Normal file
19
web/pages/faq.tsx
Normal file
@@ -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 <MarkdownPage content={content} filename={FILENAME}></MarkdownPage>
|
||||
}
|
||||
19
web/pages/financials.tsx
Normal file
19
web/pages/financials.tsx
Normal file
@@ -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 <MarkdownPage content={content} filename={FILENAME}></MarkdownPage>
|
||||
}
|
||||
@@ -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 (
|
||||
<LovePage trackPageView={filename}>
|
||||
<Col className="items-center">
|
||||
<Col className='bg-canvas-0 w-full rounded px-3 py-4 sm:px-6 space-y-4 customlink'>
|
||||
<ReactMarkdown>{content}</ReactMarkdown>
|
||||
</Col>
|
||||
</Col>
|
||||
</LovePage>
|
||||
);
|
||||
export default function Markdown({content, filename}: Props) {
|
||||
return <MarkdownPage content={content} filename={filename}></MarkdownPage>
|
||||
}
|
||||
|
||||
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}};
|
||||
}
|
||||
|
||||
19
web/pages/members.tsx
Normal file
19
web/pages/members.tsx
Normal file
@@ -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 <MarkdownPage content={content} filename={FILENAME}></MarkdownPage>
|
||||
}
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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?
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user