4 ms·
I recently migrated away from Hugo to Gatsby because I wanted more control over the Markdown content I write. I had technical debt piling up [1] from the hacks
by activatedgeek 6y ago
I recently migrated away from Hugo to Gatsby because I wanted more control over the Markdown content I write. I had technical debt piling up [1] from the hacks I had in Hugo to get writing completed and wanted minimal vendor lock-in.
My approach was to start from bare-bones Gatsby and make incremental additions. Key pieces that help me have virtually limitless control:
- React: I subscribe to the philosophy of component-based systems.
- Remark: Plugin-based approach to extending Markdown capabilities.
- MDX: bring component-based systems to Markdown. opens up virtually anything possible in React to be possible in Markdown.
- Gatsby: Builds on top of React and a plugin-based system for extensions.
- Netlify: Super easy deploys.
Key highlight: I needed BibTeX citations in Markdown. I implemented a plugin from scratch myself (effectively amounts to manipulating the Abstract Syntax Tree given by MDX) which was fairly straightforward (https://github.com/activatedgeek/website/blob/master/src/plugins/gatsby-remark-bibtex/index.js https://github.com/activatedgeek/website/blob/master/src/plu...).
Website: https://www.sanyamkapoor.com https://www.sanyamkapoor.com
Source: https://github.com/activatedgeek/website https://github.com/activatedgeek/website
[1]: I had a non-elegant hack to use Distill as my theme in Hugo https://github.com/activatedgeek/distillpub https://github.com/activatedgeek/distillpub and had to go through some hoops to get everything coherently working (but brittle).