Essays
Toronto photos 2
Years ago my wife and I were in Vegas and had a chance to see Elton John… and missed it. This year, when I realized he was playing in Toronto on the night of our 20th anniversary, I bought tickets as a surprise birthday gift and we planned a short trip around the concert.
We arrived in the late afternoon earlier this week, took the airport train to Union Station and the subway to our hotel, then went down to Polson Pier to catch the sunset. We had dinner and explored the Distillery District before checking out Jurassic Park for the Raptors game — too late, they had already closed it off — and settling for beers at the sports bar next door to watch the end of the game.
The next day we did a bike tour of the city. On the way to meet the guide, we wandered down a street to look at the trees and a woman said hi as she walked by. Realizing we were tourists, she stopped and told us that she had been friends with Jane Jacobs, who lived just a block away. There’s a sign outside her old house.
The bike tour was a great way to see a bunch of Toronto. Murals, CN Tower, trains at Roundhouse Park, sculptures at Ireland Park, the university, and several neighborhoods. We stopped for hot chocolate and then back on our own visited a couple libraries including the Sherlock Holmes room at the Toronto Reference Library.
Dinner in Little India and then the streetcar back for the concert. We loved it. Even with just a couple days we really got a lot out of visiting the city. Looking forward to coming back one day.
Testing templates
Greg Morris is considering migrating his site from WordPress to Micro.blog hosting and had a question about referencing photos in a template:
Card previews I really want to be able to solve - does anyone know how to pull an image out of a hugo post in order to put meta property=“og:image” into the head?
Micro.blog uses Hugo themes because they are fast and there’s so much flexibility to customize them. To test this, I created a theme and edited the layouts/partials/head.html template, adding this somewhere along with the other meta tags:
{{ with .Params.images }}
{{ range first 1 . }}
<meta property="og:image" content="{{ . }}">
{{ end }}
{{ end }}
This looks at the photos on a post and takes the first one, adding its URL to a meta tag. If instead of the original photo you want to include a smaller thumbnail, you can use Micro.blog’s special photos.micro.blog resizing proxy. Here’s an example to include a 300x300 thumbnail:
{{ with .Params.images }}
{{ range first 1 . }}
<meta property="og:image" content="https://photos.micro.blog/300/{{ . }}">
{{ end }}
{{ end }}
I still want to add more built-in designs, as well as add design settings so that custom themes aren’t necessary for common features. But there’s a lot of power here to make your blog whatever you want it to be.
























