A small program to generate static assets (html, CSS, js) for an FAA charts quick reference page. Inspired by https://charts.bvartcc.com/, using data and charts from https://www.aviationapi.com/.
The ZOA version is hosted via Cloudflare Pages at https://charts.oakartcc.org/
- F#
- Giraffe.ViewEngine for the HTML templates and rendering directly in F#
- Tailwind for CSS
If you are on Windows, use build-local.ps1
which will build and place the output files in a _public
folder. You will need to already have the .NET SDK installed on your machine.
- Fork the repo to your own account/organization
- Edit the airports in
site_config.yaml
, split intoBravo
,Charlie
andDelta
categories - Set up a Cloudflare Pages app that is connected to your forked repo. Use
chmod +x ./build-cloudflare.sh; ./build-cloudflare.sh
as the build command and/output/wwwroot
as the output directory - If you'd like, follow https://www.codemzy.com/blog/scheduling-builds-cloudflare to set up a daily cron so that your site we re-build with the latest charts daily, except replace the Cloudflare Worker code with the following for Cloudflare's newer ES format (and don't forget to insert your own Cloudflare Pages deploy hook)
export default {
async scheduled(event, env, ctx) {
let deployHook = "YOUR DEPLOY HOOK URL HERE";
await fetch(deployHook, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
});
return "Called deploy hook!"
},
};
The project uses Tailwind CSS. You can edit the styling via the classes in style.css
using Tailwind's @apply
directive. The included build scripts will build the final output css from this input file.