manton.org
manton.org

Easier map embeds

I have a new version of Sunlit in review at Apple, and Android in development, so I wanted to improve how Micro.blog allows map embeds on your blog for check-ins. I’ve updated the default theme Sumo to support this directly. The Hugo code is really simple now:
{{ with .Params.location.map_url }}
<img... www.manton.org

Map thumbnail.
|
…
Embed
jtr
jtr

@manton.org Don’t know if you saw my previous comment — ignore it, I was posting to my test blog and didn’t realize. However, no map on the blog, just the place’s name.

It seems like an additional “ was missing in the code (no opening “). Also, the code as is gave me a broken image, had to change ? to & (Caude indicated that this is because the html already includes ?). I’m not sure if this is just my theme (Tiny) or in general. Because I use TT, I’m adding it into an additional microhook, complete with size and a div for CSS adjustments.

|
…
Embed
manton
manton

@jtr Sorry, just seeing this… Claude is right, I made a mistake in the documentation. I’ll fix it. Good idea to use a microhook! Let me know if there’s still anything to address.

|
…
Embed
jtr
jtr

@manton it worked after the above fixes (the “ and the &) 😊

Ended up including it in a div so it’s easy for the CSS. Only added 100% width so it looks ok on mobile (otherwise the map tile is too big in my settings, on medium)

|
…
Embed
In reply to
manton
manton

@jtr Cool! If you have any requests, let me know. Thinking maybe some more options for styling, labels, etc.

|
…
Embed