This is the source code of daan.fyi, my personal website. You are free to do with it whatever you want, as long as you give me proper attribution. You are encouraged to learn from it and build upon it.
This website is built on the following tech stack:
- Astro as the framework, doing static site generation. No client-side framework — the only JavaScript shipped is two small inline scripts, for the colour-mode toggle and the mobile nav
- Tailwind CSS for styling, driven by a set of semantic design tokens rather than utility classes at the call site
- I write content in MDX, which combines the power of Markdown and JSX to enable rich and interactive content. I use the unified stack (incl. remark and rehype) to interpret and render the Markdown bits
- Shiki for syntax highlighting, with hand-ported themes
This site is deployed on Vercel
The site previously ran on Next.js and Chakra UI.
MIGRATION.mdis a full record of the move — the plan, what broke, and why a number of things are written the way they are.
You need the following to build, run and develop this site locally:
First install all dependencies:
npm installStart the development server:
npm run devYou can make a production build like this:
npm run buildNow you can serve the production build:
npm run previewType checking across both .astro and .ts files:
npm run type-checkWhen building this website, there were a few websites that inspired me and/or helped me with actual solutions to coding problems (yay for open source!):
Thanks for the inspiration!