Sapper is a toolkit for creating Svelte apps. It comes with a bunch of conventions baked in to help you get your project up and running quickly.
I...
For further actions, you may consider blocking this person and/or reporting abuse
Bonus: I've added a few branches to the repo
This helped me! Do you know a way to wrap images from markdown in
figure
, notp
?Glad it helped :)
I think the
p
tag comes from having an empty line before defining the image. It's not the image that causes thep
tag.One workaround is to
<figure>
tag inside markdown. HTML tags are allowed in markdown.Otherwise you'll have to look at modifying the markdown parser, or finding one that has a configurable option for this.
Well the
p
tag will wrap either only the image, or the image and other inline elements.Thanks. I was guessing I had to find another parser. markdown-it seems like the most active -- plugin wise ...
Welcome.
Try forking the markdown rollup plugin and switching
showdown
tomarkdown-it
. That should do it.Any suggestion for pagination? Its one of most basic features of a Blog.
That is true, pagination is important.
Here's one way to do it:
1) Group posts into pages/chunks inside
src/posts.js
2) Inside
routes/index.svelte
, define apreload
function that looks at the query params:3) Add conditional next & previous links
Hope that helps!
Nice! Thank you,
Can we do this same without sapper.
Yes. Though sapper and it's replacement svelte-kit make it easier.
One way is to create a vanilla svelte project with a router (tinro?). Then make sure your hosting rewrites routes like
/posts/...
to/index.html
.Thanks subscribed.