Blog with SvelteKit & mdsvex & Tailwind + optional Decap CMS (WIP)
7/25/2024
Why the tutorial?
I was planning on starting a blog in which I could share with you what it’s like to be a Smart TV apps developer. It’s a niche world, so I thought it would be interesting topic for other devs. However, in order to do that, I had to set up a blog. And since I was looking for an excuse to learn some new technologies, what’s a better way to learn than to teach? :)
Tech stack
SvelteKit
I’m a fan of Svelte, I’ve used it in my previous jobs, and now I am rewriting the project at my day job using it as the UI framework of choice.
For me, in SPA scenario Svelte has an edge over other frameworks, mainly because it’s compilable and because it doesn’t use VDOM. Thanks to that the end product doesn’t use a lot of memory and is perfect for a web app that will run on low-end devices such as Smart TVs or set-top boxes.
I have never used SvelteKit however and this is a great opportunity to do it, as I want my blog to be statically generated, meaning I can just host it on any HTTP server, no Node.js backend required.
mdsvex
Do you love writing with Markdown syntax? I sure hope so, because we are going to put Svelte components inside a Markdown file!
mdsvex is a Markdown preprocessor, which creates Svelte components from .md files. If you do not feel comfortable editing Markdown in your code editor, you can integrate your SvelteKit app with Decap CMS and use a built-in Rich-Text editor (more on that later).
Tailwind
Initial Setup
SvelteKit
npx svelte haha lah blah