- Building apps with the
leblog
plugin would hang indefinitely; no longer!
- Feeds are now 'virtual', and the only thing you need to do is specify them in your config. For example:
export default {
collections: {
posts: {
path: 'posts',
feed: 'blog.atom'
},
changelog: 'CHANGELOG.md'
}
}
And as if by magic, a /blog.atom
route will exist on your website with an Atom feed of all your posts (RSS and JSON also work; just change the file extension).
- The way this plugin works has been overhauled. It's now a Vite plugin, and you load entries from the exported load function.
- Footnotes are now supported (https://github.com/micromark/micromark-extension-gfm-footnote).
- Posts no longer require a slug, so a date is a valid filename (e.g.
2023-06-03.md
). - Entries now have a
path
property which you can use for linking pages, which will be the date combined with the slug if there is one. Using theslug
property alone still works, in case you don't want the date displayed in the URL.
- You can now create Atom and RSS feeds! To do so, export a
GET
request handler from a page's+server.js
:
import { loadFeed } from 'leblog'
export const GET = loadFeed('posts')
- Entries now contain an
html
field with — you guessed it! — the entry's HTML.
@sveltejs/kit
andsvelte
dependencies are now set correctly.
Entry
is now exported fromleblog
instead ofleblog/entry
(conditional exports ftw).
loadCollection
,loadEntry
andload
now run on the server in+page.server.js
endpoints, removing the need for a handle hook.- The
Entry
component is now exported fromleblog/entry
.
- Only markdown files (
.md
) are now considered entries.
- The
leblog
hook, which is replaced by the aforementioned load functions.
- A
load
function to infer a collection/entry, assuming there's only one defined collection. - Added an optional second
slug
parameter toloadEntry
, so you can override the defaultparams.slug
. - An exported
handle
alias ofleblog
, so inhooks.server.js
you can simply:export { handle } from 'leblog/hooks'
.
The first release!