Overview
This is my personal sites repository. I do Thinker, Hacking, Experiment, and anything what I need to know. Because of curiousity.
graph LR
A[Content] -- export --> B[Static Sites]
B -- convert --> C[OCaml Module]
C -- compile --> D[1 Static Binary]
D --> E(Ready to Run)
Tech Stack
Frontend
-
NextJs The React Framework for the Web by Vercel.
-
Chakra-UI a simple, modular and accessible component library that gives you the building blocks you need to build your React applications..
Backend
-
Dream Tidy Web framework for OCaml and ReasonML by @aantron.
-
ocaml-crunch Convert a filesystem into a static OCaml module by @mirage.
Tools
-
Yarn@v3 Yarn is a package manager that doubles down as project manager. Whether you work on one-shot projects or large monorepos, as a hobbyist or an enterprise user, we've got you covered.
-
Nodejs Node.js® is an open-source, cross-platform JavaScript runtime environment.
-
OCaml General-Purpose, Industrial-Strength, Expressive, and Safe.
Development
Prerequisites
You don't technically need to run or setup anything on your end (except Nix). But if you want to setup for your own needs, you can take a look into flake.nix and .envrc.example.
Commands
Most of the commands run in the root project directory.
run Frontend
nix develop . -c yarn install && yarn dev
OR
nix develop
yarn install && yarn dev
run Backend
nix run .#backend
run nix-shell
Available shell options:
- default with all tools from frontend and backend.
nix develop
- frontend with yarn, node, and related nodejs ecosystem tools.
nix develop .#frontend
- backend with fswatch and ocaml ecosystem tools.
nix develop .#backend
See Detail Here.
Deployment
Acknowledgement
- @Xe - https://xeiaso.net for talk about "My Blog is Hilariously Overengineered to the Point People Think it's a Static Site" at GambiConf.