{
"path": "/3mbueyjaxc22b",
"site": "at://did:plc:tbzfsowmg4zj234pws47u3x6/site.standard.publication/3mb25gdgmj22r",
"tags": [
"bluesky",
"hugo",
"markdown",
"leaflet"
],
"$type": "site.standard.document",
"title": "Leaflet to Markdown or why you can now read this post on my Hugo blog too - Toolbox #3",
"content": {
"$type": "pub.leaflet.content",
"pages": [
{
"id": "019b9a13-413b-700d-99d7-9c3ad47d1b50",
"$type": "pub.leaflet.pages.linearDocument",
"blocks": [
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 188,
"byteStart": 184
},
"features": [
{
"uri": "https://gohugo.io/",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "A few days ago I announced on BlueSky that I created a small tool to convert my leaflet posts (like the one you are reading right now) to markdown, so that they can also show up on my hugo based blog."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.bskyPost",
"postRef": {
"cid": "bafyreig4zol7lqtzoxuzfti3sxhxdhhs7j6lczlilf3ay2iiueihsjbgnu",
"uri": "at://did:plc:tbzfsowmg4zj234pws47u3x6/app.bsky.feed.post/3mbrxzvw36c22"
}
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "\nI promised to follow up with an article about how I use it and that's what you are reading now. "
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 87,
"byteStart": 69
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
}
],
"plaintext": "In the root directory of your hugo blog you'll need to create a file .leaflet-sync.yaml - here is what mine looks like."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.code",
"language": "yaml",
"plaintext": "source:\n handle: \"mariuskimmina.com\"\n collection: \"pub.leaflet.document\"\n publication_name: \"Marius Toolbox\"\n\noutput:\n posts_dir: \"content/posts/leaflet\"\n images_dir: \"static/images/leaflet\"\n image_path_prefix: \"/images/leaflet\"\n\ntemplate:\n frontmatter: |\n ---\n title: \"{{ .Title }}\"\n date: {{ .CreatedAt }}\n original_url: \"https://toolbox.leaflet.pub/{{ .Slug }}\"\n author: \"{{ .Handle }}\"\n ---\n content: |\n *Originally published at [Marius Toolbox](https://toolbox.leaflet.pub/{{ .Slug }})*\n\n {{ .Content }}\n\n ---\n *Originally published at [Marius Toolbox](https://toolbox.leaflet.pub/{{ .Slug }})*"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 60,
"byteStart": 43
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
}
],
"plaintext": "In this same directory you now need to run leaflet-hugo-sync - my recommendation for now would be to just use "
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.code",
"language": "yaml",
"plaintext": "nix run github:mariuskimmina/leaflet-hugo-sync"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "But I might also look into producing an official release soon."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 47,
"byteStart": 26
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
}
],
"plaintext": "This will create a folder content/posts/leaflet containing all your leaflet posts with sanitized version of the post name as the file name."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 37,
"byteStart": 21
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
}
],
"plaintext": "If you leave out the publication_name it will get all your leaflets which may or may not what you want."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 29,
"byteStart": 21
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
}
],
"plaintext": "You can then use the template section to customize the content a bit, I for example added links back to the leaflet at the top and bottom of the posts. "
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 174,
"byteStart": 157
},
"features": [
{
"uri": "https://mariuskimmina.com",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "If you actually use this I would love to hear feedback <3\nI will also soon publish another post to detail the entire setup of how I now host my hugo blog on mariuskimmina.com and keep it sync with my leaflet posts. \n\nSource:"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 55,
"byteStart": 0
},
"features": [
{
"uri": "https://tangled.org/mariuskimmina.com/leaflet-hugo-sync",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "https://tangled.org/mariuskimmina.com/leaflet-hugo-sync"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 50,
"byteStart": 0
},
"features": [
{
"uri": "https://github.com/mariuskimmina/leaflet-hugo-sync",
"$type": "pub.leaflet.richtext.facet#link"
}
]
},
{
"index": {
"byteEnd": 132,
"byteStart": 100
},
"features": [
{
"uri": "https://mariuskimmina.com/posts/",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "https://github.com/mariuskimmina/leaflet-hugo-sync\n\nYou can find my blog, including this posts, on \nhttps://mariuskimmina.com/posts/"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": ""
}
}
]
}
]
},
"description": "I created a small tool that can convert leaflet posts to markdown and sync them with my hugo based blog",
"publishedAt": "2026-01-07T21:11:39.039Z"
}