First Swallows of the year for me. About a dozen or so just drifted past the house, not sure if I was the final destination or they’re moving on, but lovely to see.
First establishment of a wildflower mix going in for Biodiversity π more to follow shortly and more diverse plots and woodland in the pipeline π
Test from micropublish to my test micro.blog using location information and the swarm plugin - successful π
Luna went bang on point on going around the end of a wall. I expected the usual Pheasant, but amazingly (especially at this time of day) it was a Nightjar on the ground, within 6 feet. It gently wafted into a nearby tree, but flew off again before I could get close enough with my iPhone.
Hmm, Editorial seems to be misbehaving with grabbing the location data, but thanks to Gluon always having the Title field visible, using Apple Maps to get the coords and pasting it straight in is actually much easier π
π¨ Been seeing the Buzzard regularly on my morning walks, and with the overnight snow, thought it would make a suitable subject for a daily painting.
Acrylic on Dibond panel 150 x 180 mm
Micro.blog “is the blog you will actually use.” I have adapted my method of linking articles to and from a map here within a subscription Micro.blog’s pages that again uses Leaflet and tiles from Open Street Map/Mapbox. See on Github
This method will not be for everybody. I use the Title for the coordinates - it’s the only variable open to you to - so I use h1 tags etc in the body of the post if I want a heading and the single page layout is used up for housing the map code.
As Micro.blog is based on Hugo, the passing of the location coordinates requires a couple of tweaks to the code to enable them to be formatted correctly - safeURL and safeJS - these are shown below in the templates.
You will have to choose how you get the location reference - I tend to use an Editorial template with a custom workflow to form my Article with pre-formed settings and coordinates loaded now use Apple Maps and copy the coords from there.
It’s worth noting that in the Micro.blog timeline, the Titles (when shown) are not clickable links, see the Timeline display rules and this method doesn’t work with just an image, as there’s no link formed from the timeline to your page, so an image description won’t go amiss. Fortunately, Micro.blog doesn’t seem to treat coordinates as a number, so they do get displayed.
I have a blog post here, to describe how to do it.
Hint: When posting from iOS, I recommend using Gluon app to post. It shows the (optional) Title field by default, so enter the coordinates here.
I hope it makes sense (and I havenβt made any errors - all done on an iPad Mini π). @manton
Well, some progress - multiple posts coming into the Map.
However, when bringing in the Front Matter variable (in this case the Title) I get “quoted” coords instead of the bare coords (which doesn’t work). A general call-out to anybody who knows Hugo and bringing Front Matter into a script better than ?! Thanks.
Here is the code:
{{ $list := (where .Site.Pages "Type" "post") }}
{{ range $list }}
{{ if.Title }}
var marker = new L.Marker([ {{ .Title }} ],
Gives:
var marker = new L.Marker([ "51.1441,0.37165" ],
This is how it should look:
var marker = new L.Marker([ 51.1441,0.37165 ],
Micro.Blog.Map up - nothing on it yet… spotthehall.net/map/
This is a test to see if iCab picks up the ICBM data from the header of the custom theme Iβm using in micro.blog. The title field does seem to remain even if I delete text back below the βthresholdβ. It is really a cheat, but thought I’d give it a go before I try to feed it through to a custom micro.blog Map page.