This website is built using Docusaurus, a modern static website generator, and deployed using Cloudflare Pages with Wrangler.
pnpm installpnpm startThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
pnpm buildThis command generates static content into the build directory optimized for production deployment.
pnpm previewThis builds the site with local-friendly settings (baseUrl: "/") and serves it using Wrangler for local testing.
pnpm run preview:prodThis builds the site with production settings (baseUrl: "/resources") and serves it locally using Wrangler to test the exact production build.
Deploy to Cloudflare Pages:
pnpm deployThis command builds the website for production and deploys it to Cloudflare Pages using Wrangler.
# Clear Docusaurus cache
pnpm clear
# Type checking
pnpm typecheck
# Serve built files locally
pnpm serve# Generate translation files
pnpm run write-translations
# Generate heading IDs for markdown files
pnpm run write-heading-ids# Swizzle Docusaurus components for customization
pnpm swizzle/docs- Documentation content/blog- Blog posts/src- Custom React components and pages/static- Static assets (images, files)docusaurus.config.ts- Site configurationsidebars.ts- Documentation sidebar configuration
The site uses different base URLs for different environments:
- Development (
pnpm start):baseUrl: "/" - Local Preview (
pnpm preview):baseUrl: "/" - Production (
pnpm deploy):baseUrl: "/resources"
This ensures the site works correctly both locally and when deployed to https://uncap.finance/resources/.