diff --git a/src/content/posts/software/designing-this-website.mdx b/src/content/posts/software/designing-this-website.mdx index 60478e8..7f54624 100644 --- a/src/content/posts/software/designing-this-website.mdx +++ b/src/content/posts/software/designing-this-website.mdx @@ -5,7 +5,29 @@ date: "18/06/2024" ## Update: Port to Astro (22/05/2025) -hi +I'm expanding my website to included more detailed algorithms, implementations, write-ups, and low-level optimization case studies. + +I thought about writing these posts in the raw HTML as I've been doing and physically cringed. + +Then I recalled the below post I made around one year ago and realized the following: + +- Sure, you can be efficient with raw HTML/CSS/JS. However, _no matter what you do_ snippets, hotkeys, etc, nothing is fast than writing markdown. +- Overhead (i.e. the massive overhead of copying over content, writing the html) matters +- I'll be needing more advanced features that, while possible to do in vanilla web, would just be painful to maintain. +- Sure, frameworks come with bloat. At this point, I'd added web components and script finagling—I was on the path to reinventing React myself. + +Enter [astro](https://astro.build/). + +- Lower overhead +- Small bundle size +- SSR opt in/out +- Minimal boilerplate + +Everything is now in MDX. I had to say goodbye to my d3 latex labels (I could only do this with MathJax, which I recently found out was overkill for my needs) and a bit of custom styling. + +On the upside, I have around the same LOC, a dead-simple blog post setup ([here](https://github.com/barrett-ruth/barrettruth.com/commit/8666e5a16983b177118f6e8a3246feb0d6907fff) was my biggest commit), and the entire Astro community at my back. + +The choice of Astro was of no significance. It did the job and that's all that matters. I'm not quite a fan of the funky `---` syntax to separate HTML and JS, though. I find it counterintuitive to separate the UI and the frontend logic, which ought to be tightly coupled. I don't want to imagine working on larger files in Astro. ## HTML, JavaScript, and CSS @@ -13,10 +35,10 @@ That's all there is to it. I thought about using the following frameworks: -1. [React.js](https://react.dev/) -2. [Next.js](https://nextjs.org/) -3. [Hugo](https://gohugo.io/) -4. [Astro](https://astro.build/) +1. [React.js](https://react.dev/) +2. [Next.js](https://nextjs.org/) +3. [Hugo](https://gohugo.io/) +4. [Astro](https://astro.build/) But I did not actually _need_ any of them to make this site look decent.