Andrew on Nostr: ¹ – From my perspective, partials and shortcodes are deliberately *slightly* ...
¹ – From my perspective, partials and shortcodes are deliberately *slightly* different to confuse you.
Creating your own variables helps:
for shortcodes: `{{ $id: = index.params 0 }}`,
for partials: `{{ $id: =. }}`,
and you go from there, but then you spend a lot of frustrating time until you stumble on the fact that you use `.Site.Data.something` to get the /data/something.json file, but in partials it’s `site.Data.something`. WHY?!
Published at
2024-11-10 09:12:05Event JSON
{
"id": "e50651ce29f86a5cf3f569843b7d24e660e2a017cc2b49fd13a1077b71c2f6a9",
"pubkey": "1bd8da6f61ca4da4a35844d9e60da3bc2edf3ac40a1293182b4050d44afef684",
"created_at": 1731229925,
"kind": 1,
"tags": [
[
"e",
"2a57c5cf1d1c6cf1da7fc94d62628c10da80f854862deef26e085b78881ac1b0",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://mastodon.online/users/alsorew/statuses/113457884397308705",
"activitypub"
]
],
"content": "¹ – From my perspective, partials and shortcodes are deliberately *slightly* different to confuse you.\n\nCreating your own variables helps:\n\nfor shortcodes: `{{ $id: = index.params 0 }}`,\nfor partials: `{{ $id: =. }}`,\n\nand you go from there, but then you spend a lot of frustrating time until you stumble on the fact that you use `.Site.Data.something` to get the /data/something.json file, but in partials it’s `site.Data.something`. WHY?!",
"sig": "88bbaa9d828a6ec584a1c150470ef96cd36b6e9f3ec18f278fb2043ac2a936ef417af3e2e4d5af19348379747cab88016a8beb768958d2b683057ffe07da2e8a"
}