|
| 1 | +## Day 11: Sidetracked with Markdown |
| 2 | + |
| 3 | +### **Jeroen**, February 23, 2023 |
| 4 | + |
| 5 | +I let myself get sidetracked... |
| 6 | + |
| 7 | +Not sure how much it is to procrastinate working on the actual game. |
| 8 | +But I _am_ sure that it sparked joy to play around with something else. |
| 9 | +Here's what I changed up for this pincrediball.com's website source code. |
| 10 | + |
| 11 | +#### Prose TailwindCSS plugin |
| 12 | + |
| 13 | +Tailwind resets styling, so you can reliably create Web Applications and Sites. |
| 14 | +That's all great, but for long-form textual content it's actually painful to loose _all_ styling. |
| 15 | +[The Tailwind "Prose" plugin](https://tailwindcss.com/docs/typography-plugin) aims to solve that, without compromising the reset of styles that Tailwind gives you. |
| 16 | + |
| 17 | +It was just fine to write this devlog straight up with html and Tailwind classes. |
| 18 | +But copy-pasting things like `mt-4` on each `<p>` becomes tedious pretty quickly. |
| 19 | +The Prose plugin fixes that nicely, and cleaned up my devlog source code considerably. |
| 20 | + |
| 21 | +#### Markdown for blogging |
| 22 | + |
| 23 | +This also enables the next step. |
| 24 | +Markdown is a far nicer format to write blogposts in. |
| 25 | +I had noticed before that [`svelte.dev` uses markdown for their blog](https://github.com/sveltejs/sites/tree/master/sites/svelte.dev/content/blog), |
| 26 | +which sparked my interest. |
| 27 | + |
| 28 | +After briefly trying the (rather nice!) [svelte-exmarkdown](https://github.com/ssssota/svelte-exmarkdown) library, I decided I needed a bit more control. |
| 29 | +So I dove a bit deeper into how `svelte.dev` does things. |
| 30 | +And that setup is quite nice indeed, as it includes support for SSR and RSS. |
| 31 | + |
| 32 | +So, I used a (much) simplified variant of that setup. |
| 33 | +And: it works like a breeze! |
| 34 | +Adding a blog post can now be as simple as adding one `.md` file to the repository! |
| 35 | + |
| 36 | +#### What's next? |
| 37 | + |
| 38 | +That's all nice! |
| 39 | +But what's next? |
| 40 | +Should I ever feel like getting side-tracked again, there's a few things left to tweak: |
| 41 | + |
| 42 | +- RSS feed would be nice; |
| 43 | +- Having `[slug]` based pages might be nice; |
| 44 | +- GitHub actions to `npm run build` and auto-publish to GitHub-Pages; |
| 45 | + |
| 46 | +But for now: let's stop procrastination and get back to building the game. |
| 47 | +Shall we? |
0 commit comments