# Static Site ![build status](https://git.pfy.ch/pfych/static/badges/workflows/deploy.yml/badge.svg?label=deploy) ![build status](https://git.pfy.ch/pfych/static/badges/issues/open.svg) ![Built with love](https://pride-badges.pony.workers.dev/static/v1?label=built%20with%20love&stripeWidth=6&stripeColors=5BCEFA,F5A9B8,FFFFFF,F5A9B8,5BCEFA) This repo contains the code to build & deploy my static site hosted at [https://pfy.ch](https://pfy.ch), as well as all the content/scripts/styles to go along with it. ## Project Layout This project is a monorepo consisting of the following sub packages: - `infrastructure` - All CDK definitions - `pacakges/api` - Lambda API - `packages/site` - Static Site generator & content - `packages/shared` - Type definitions ```bash ├── infrastructure │ ├── api │ └── site ├── packages │ ├── api │ │ ├── lib # Utilities │ │ └── src # Root handlers │ │ └── services # Feature based endpoints │ ├── shared # Type definitions used by site & api │ └── site │ ├── assets │ │ ├── custom # Images, userscripts, icons, etc │ │ ├── scripts # Typescript (ts,tsx) compiled at build time │ │ └── styles # SCSS compiled at build time │ ├── build │ │ ├── steps # Individual build steps │ │ ├── templates # Handlebars templates │ │ └── utils # Utility functions used by steps │ ├── pages # Custom html pages that are not generated │ └── posts # Markdown content └── scripts # Helper scripts for deploying ``` ## Using this package If you want to fork this package for your own site, it's safe to empty the directories listed in `packages/site/build/config.ts`. This file outlines where the build scripts should look for content. ```bash pnpm run site:dev # Run a copy of the site with hot-reloading on :8080 pnpm run site:build # Compile the site to .dist/ pnpm run site:deploy # Deploy the site using the aws profile "dev" (Must build beforehand) pnpm run api:dev # Run a copy of the api locally with hot-reloading on :3000 pnpm run api:deploy # Deploy the api using the aws profile "dev" ``` Water caustics texture by [leeor_net](https://opengameart.org/content/water-caustics-effect-small)