Mtt
Mtt

Here’s a preview of a new Tiny Theme plugin I’m developing. On any post/page, add a magazine style gallery of images (great on desktop). It will require some basic HTML knowledge, but it should work for most users. It isn’t available publicly yet, but hopefully will be soon.

|
Embed
Progress spinner
skoobz
skoobz

@Mtt This looks great!

|
Embed
Progress spinner
Gabz
Gabz

@Mtt 👀👀 Oh dear, oh dear, oh dear!! My fist question. This will show every image uploaded to MB or can it be setup so only a specific category of photos will only show? 🎶 Tell me more, tell me more....

|
Embed
Progress spinner
Mtt
Mtt

@Gaby It is a per-post/per-page thing that will require special input (html) by the user. It will not be automatically applied to anything.

|
Embed
Progress spinner
Gabz
Gabz

@Mtt ooooh!!! gotcha!

|
Embed
Progress spinner
In reply to
pratik
pratik

@Mtt @gaby oooh! So this is similar to @jsonbecker’s Glightbox plugin?

|
Embed
Progress spinner
jsonbecker
jsonbecker

@pratik @Mtt @Gaby sure seems like glightbox plug in when you use the <div class="img-gallery"> option, but without the lightbox zoom and arrow key nav etc.

|
Embed
Progress spinner
Mtt
Mtt

@pratik @jsonbecker Honestly, no clue. I haven’t used it. There are no scripts or anything like that. It’s pure CSS. No light box previews.

|
Embed
Progress spinner
jsonbecker
jsonbecker

@Mtt @pratik I suspect it's somewhat like this-- where I just include some hand CSS if you want to put a div around your images github.com/jsonbecke...

|
Embed
Progress spinner
Mtt
Mtt

@jsonbecker @pratik Yeah, looks like it has some basic similarity to the “extras” part of the documentation. In fact, as it is now that would be the full integration (with custom styling for Tiny added). There is nothing else added, including shortcodes. It’s pure HTML (user) and CSS (plugin).

|
Embed
Progress spinner
pratik
pratik

@jsonbecker Aren't we using a Hugo shortcode in our posts with your plugin? I have always been wary of using too many shortcodes for portability's sake. Usually, HTML and/or Markdown is my rule now, although Shortcodes make it incredibly convenient in the short term. I still have the template code in my PasteBot list. @Mtt

|
Embed
Progress spinner
jsonbecker
jsonbecker

@pratik I use just plain Markdown a bit for images, since I added a new hook that will translate Markdown. That means it's a little less reliant on the plug in and will expand everywhere Markdown works.

|
Embed
Progress spinner
pimoore
pimoore

@pratik @jsonbecker The portability—rather, lack thereof—is the main reason why I want to drop shortcodes entirely. They’re convenient yes, but at what cost?

|
Embed
Progress spinner
jsonbecker
jsonbecker

@pimoore which is why I love render hooks for images

|
Embed
Progress spinner
pratik
pratik

@jsonbecker Tell me more 🤔

|
Embed
Progress spinner
jsonbecker
jsonbecker

@pratik you can use the markdown syntax for adding images and with glightbox installed it will work just like the shortcode. Uninstall it and it’ll still work, it’ll just be a normal image.

|
Embed
Progress spinner
pratik
pratik

@jsonbecker Wow! That’s awesome. Just realized that it just…works on my blog since I had the plugin installed.

But yup, the gallery one still needs a shortcode, right?

|
Embed
Progress spinner
jsonbecker
jsonbecker

@pratikto get the CSS I think so because Hugo won’t process markdown inside of a div, but will a shortcode. Otherwise it would work.

|
Embed
Progress spinner
pimoore
pimoore

@jsonbecker Is this anything to do with lazy-loading and other similar Hugo features?

|
Embed
Progress spinner
jsonbecker
jsonbecker

@pimoore it just assumes content in literal HTML blocks are meant to be literal. I think there may be ways around it but I ran out of patience figuring it out.

|
Embed
Progress spinner
pimoore
pimoore

@jsonbecker Ah, I gotcha, that makes sense. I think part of my annoyance with shortcodes comes from publishing using them in Drafts (and formerly Ulysses), as they tend to get mangled easily and then the encoded HTML crap ends up in my blog post—and RSS feed—which I have to go back and edit. I recall this working at one point without having to escape the code, but my recent post using shortcodes failed and got mangled again.

What are you using to publish to Micro.blog, and how do you handle shortcodes?

|
Embed
Progress spinner
jsonbecker
jsonbecker

@pimoore MarsEdit or the first party apps.

|
Embed
Progress spinner