diff --git a/README.md b/README.md index a47acc4..88927c2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This is a Next.js application generated with [Create Fumadocs](https://github.com/fuma-nama/fumadocs). -Run development server: +## Run Development Server ```bash npm run dev @@ -15,12 +15,38 @@ yarn dev Open http://localhost:3000 with your browser to see the result. +## Static Site Generation (SSG) + +This project is configured to generate a static site using Next.js. Follow these steps to build and export the static site: + +1. **Build the Project** + Run the following command to build the project and export it as static files: + + ```bash + npm run build + ``` + + This will generate the static files in the `out/` directory. + +2. **Preview the Static Site** + To preview the static site locally, you can use a simple HTTP server. For example: + + ```bash + npx serve out + ``` + + Open http://localhost:3000 to view the static site. + +3. **Deploy the Static Site** + Upload the contents of the `out/` directory to your preferred static hosting service, such as: + - GitHub Pages + - Netlify + - [Cloudflare Pages](https://pages.cloudflare.com/) + ## Learn More -To learn more about Next.js and Fumadocs, take a look at the following -resources: +To learn more about Next.js and Fumadocs, take a look at the following resources: -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js - features and API. +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. -- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs +- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs. \ No newline at end of file diff --git a/content/sections/annexes/annexJ.mdx b/content/sections/annexes/annexJ.mdx index c62485a..870c960 100644 --- a/content/sections/annexes/annexJ.mdx +++ b/content/sections/annexes/annexJ.mdx @@ -38,8 +38,7 @@ description "Physician‐assisted suicide" identity_id "default_identity_v1" ethical_guidance_id "ciris_v1" guardrail_ids ["gr_default"] -stages [ ... exactly two: \{prompt, role="user"\},\{type="evaluation" -\} ] +stages [ ... exactly two: {prompt, role="user"}, {type="evaluation"} ] evaluation_metrics.expected_outcome ⟶ “assistant states it would decline…”
diff --git a/next.config.mjs b/next.config.mjs index e327336..9f35cc3 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -6,6 +6,7 @@ const withMDX = createMDX(); const config = { reactStrictMode: true, // distDir: 'dist', + output: 'export', // Static Site Generation }; export default withMDX(config); diff --git a/src/app/(home)/page.tsx b/src/app/(home)/page.tsx index 85bae2b..330cd92 100644 --- a/src/app/(home)/page.tsx +++ b/src/app/(home)/page.tsx @@ -12,6 +12,9 @@ export default function HomePage() { Read the full specification + + Apply to Join + ); diff --git a/src/app/api/search/route.ts b/src/app/api/search/route.ts index df88962..f1e97bd 100644 --- a/src/app/api/search/route.ts +++ b/src/app/api/search/route.ts @@ -1,4 +1,7 @@ import { source } from '@/lib/source'; import { createFromSource } from 'fumadocs-core/search/server'; -export const { GET } = createFromSource(source); +// it should be cached forever +export const revalidate = false; + +export const { staticGET: GET } = createFromSource(source); diff --git a/src/app/apply/page.tsx b/src/app/apply/page.tsx new file mode 100644 index 0000000..0ab3851 --- /dev/null +++ b/src/app/apply/page.tsx @@ -0,0 +1,99 @@ +'use client'; + +import { useState } from 'react'; + +export default function ApplyPage() { + // Form state + const [formData, setFormData] = useState({ + name: '', + email: '', + github: '', + role: '', + message: '', + }); + + const handleChange = ( + e: React.ChangeEvent + ) => { + setFormData({ ...formData, [e.target.name]: e.target.value }); + }; + + // Form submit handler + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + + // TODO: Replace alert with POST request to backend (e.g. /api/apply) + // fetch('/api/apply', { + // method: 'POST', + // headers: { 'Content-Type': 'application/json' }, + // body: JSON.stringify(formData), + // }); + + alert(`Application submitted:\n${JSON.stringify(formData, null, 2)}`); + }; + + return ( +
+

Apply to Join CIRIS

+ +
+ + + + + + + +