examples icon indicating copy to clipboard operation
examples copied to clipboard

Sveltekit Blog Example

Open braebo opened this issue 2 years ago • 4 comments

A minimal blog with simple DX that supports markdown would be a great addition.

  • [x] the example is focused on a specific use case or technology
  • [x] the example is self-contained and easy to grasp
  • [x] the example is stable and does not require much maintenance

braebo avatar Feb 22 '23 06:02 braebo

Do you have any specific wishes/things you want to see in such an example? I've actually already started work on it and am experimenting with a few things. Was considering to make it a full template in its own repo but could also go in here. This is a list of things I definitely wanted to implement:

  • Markdown support (Markdoc or MDX)
  • OpenGraph and Twitter tags
  • RSS feed
  • Code fences with syntax highlighting
  • a table of contents for longer articles
  • light and dark mode

karimfromjordan avatar Feb 22 '23 12:02 karimfromjordan

A part of me thinks (we should have a simple one and a kitchen sink one, but ultimately every blog would benefit from the extra features and most will ultimately need to re-invent many wheels, so it makes sense. I dig it!

I think Sean's starter swyxkit is one of the most comprehensive I've seen and could be a great reference.

braebo avatar Feb 23 '23 18:02 braebo

Also -- is mdsvex not the blessed path for markdown anymore?

braebo avatar Feb 23 '23 18:02 braebo

I actually changed my mind a bit and was thinking that maybe we could create simple integration examples for Markdown, MDX (mdsvex) and Markdoc and a full blog template in a separate repo but with plain Markdown only. mdsvex is still used by many people but it's only necessary if you want to render Svelte components within your Markdown. Will check out swyxkit, thanks.

I'm closely following what Astro does. They are currently in the process of integrating Markdoc as an alternative and they hope it will potentially solve two problems with MDX - performance and fetching remote content from e.g. a CMS which is not possible with MDX content. Will be interesting to see what they learn from this.

karimfromjordan avatar Feb 23 '23 23:02 karimfromjordan