···86868787**Configuration** (`internal/config/config.go`):
8888- `Source`: Specifies handle, collection, optional publication_name
8989-- `Output`: Defines posts_dir, images_dir, image_path_prefix
8989+- `Output`: Defines posts_dir, images_dir, image_path_prefix, bsky_embed_style
9090- `Template`: Go template strings for frontmatter and content
91919292### Important Implementation Details
···113113 posts_dir: "content/posts/leaflet"
114114 images_dir: "static/images/leaflet"
115115 image_path_prefix: "/images/leaflet"
116116+ bsky_embed_style: "link" # "link" (default) or "shortcode" for Hugo embeds
116117117118template:
118119 frontmatter: |
+10
README.md
···1616 posts_dir: "content/posts/leaflet"
1717 images_dir: "static/images/leaflet"
1818 image_path_prefix: "/images/leaflet"
1919+ bsky_embed_style: "link" # Optional: "link" (default) or "shortcode"
19202021template:
2122 frontmatter: |
···2526 original_url: "{{ .OriginalURL }}"
2627 ---
2728```
2929+3030+## BlueSky Post Embeds
3131+3232+When your Leaflet posts reference BlueSky posts, they can be rendered in two ways:
3333+3434+- **`link`** (default): Simple markdown links that work everywhere
3535+- **`shortcode`**: Rich Hugo shortcodes for custom styling
3636+3737+For shortcode setup instructions, see [SHORTCODE_SETUP.md](SHORTCODE_SETUP.md).
28382939## How it works
3040
+28
SHORTCODE_SETUP.md
···11+# BlueSky Post Embed Setup
22+33+The sync tool can generate BlueSky post embeds in two ways:
44+- **Simple links** (default) - Plain markdown links that work everywhere
55+- **Hugo shortcodes** (optional) - Rich, styled embeds with custom styling
66+77+## Quick Setup for Hugo Shortcodes
88+99+By default, BlueSky posts are rendered as simple markdown links. To enable rich Hugo shortcode embeds:
1010+1111+1. **Enable shortcode mode in your config file** (`.leaflet-sync.yaml`):
1212+ ```yaml
1313+ output:
1414+ posts_dir: "content/posts/leaflet"
1515+ images_dir: "static/images/leaflet"
1616+ image_path_prefix: "/images/leaflet"
1717+ bsky_embed_style: "shortcode" # Add this line
1818+ ```
1919+2020+3. **Copy the shortcode to your Hugo site:**
2121+ ```bash
2222+ cp bsky.html /path/to/your/hugo/site/layouts/shortcodes/bsky.html
2323+ ```
2424+2525+4. **Run the sync:**
2626+ ```bash
2727+ leaflet-hugo-sync -config .leaflet-sync.yaml
2828+ ```
+23
bsky.html
···11+{{/*
22+ BlueSky Post Embed Shortcode (Enhanced with oEmbed)
33+44+ Usage: {{< bsky-oembed did="did:plc:abc123" postid="3mbrxzvw36c22" >}}
55+66+ This shortcode uses BlueSky's iframe embed for rich post display.
77+ Copy this file to your Hugo site's layouts/shortcodes/ directory as bsky.html
88+*/}}
99+1010+{{ $did := .Get "did" }}
1111+{{ $postid := .Get "postid" }}
1212+{{ $url := printf "https://bsky.app/profile/%s/post/%s" $did $postid }}
1313+1414+<div class="bsky-embed-container" style="margin: 1.5em 0;">
1515+ <blockquote class="bluesky-embed" data-bluesky-uri="at://{{ $did }}/app.bsky.feed.post/{{ $postid }}" data-bluesky-cid="">
1616+ <p lang="en">
1717+ <a href="{{ $url }}" target="_blank" rel="noopener noreferrer">
1818+ View post on Bluesky
1919+ </a>
2020+ </p>
2121+ </blockquote>
2222+ <script async src="https://embed.bsky.app/static/embed.js" charset="utf-8"></script>
2323+</div>
+1-1
cmd/leaflet-hugo-sync/main.go
···100100101101 downloader := media.NewDownloader(cfg.Output.ImagesDir, cfg.Output.ImagePathPrefix, pdsClient.XRPC.Host)
102102 gen := generator.NewGenerator(cfg)
103103- conv := converter.NewConverter()
103103+ conv := converter.NewConverter(cfg.Output.BskyEmbedStyle)
104104105105 for _, rec := range records {
106106 // Try to unmarshal as LeafletDocument