Suppose I should de-bork my home-rolled audio preview cards.
Rabbit hole Exhibit A:
Category posts are assigned images for preview cards ∴ posts without any images oughta default to a their category's image rather than a site default image.
Posts can belong to more than one category ∴ it would be cool-as-f$&k if all a post's categories were represented in the preview card image.
Ooh … ooh … I bet I could stick the category images under the assets directory and, using the Hugo pipe image manipulation API, generate these hybrid preview card images on the f$&kin' fly…
And then there were two…
(plus all their f$&king READMEs
(눈_눈) )The current state of the refactor list. They all require Hugo 0.91 (if you need help updating your rig from 0.45 just holler). None of the READMEs have been updated #ADHD.
.@manton version logic is off.
side note: I almost have the bookshelf plugin refactored. Just touching up the styling and I will need to update the README for my new parameter paradigm.
'Bout to find out if I just wasted six hours or so because I managed to f$&king forget that using HTML comment syntax (containing zero Hugo code) inside of Hugo templates leads to silent f$&king failures where page generation is concerned.
Updated plugin-conversation (aside from the README) to utilize Sass style parameters and statically fetched JSON feeds. These two comments happen to be reply tweets bounced over by Brid.gy:
The current state of the plugin refactoring list:
Okay … whatever … I removed the need for the query parameter and added support for cross posting external preview cards in plugin-cards by embedding the card in an a comment and using Javascript to exchange the element content.
Okay … whatever … I put the Javascript back into plugin-cards supporting the
cardify
query parameter and it only gets loaded when a page actually contains a link with the query parameter. The use case is cross posting preview cards.Well … none of that sh$te worked. Still an either or scenario where the preview card is concerned … in the blog post … or everywhere else.
The irony of rolling my own preview cards statically … now I have to figure out how to keep the HTML in my post but send the cardified link when cross posting.
README isn't up to date … but thanks to the tip from @sod … plugin-cards now generates preview cards for external links … and the whole thing is done statically via shortcode.
.@manton Is it possible to get more of these error messages or are you receiving them truncated? The structure of my invocations causes these messages to truncate just when they are about to become helpful.
Here's a nice example of the kind of ridiculous I must embrace when writing Hugo code (f$&k I miss Swift). What you are looking at is a simple check for the use of a pair of shortcodes (hacked to f$&k so it works on the homepage, taxonomy pages, and single pages).
cc @sod
Thanks to @sod, totally refactored the
cardify
portion of plugin-cards (not pushed yet) … no more Javascript plus support for external links … 'course now I'll have to rework that monster walkthrough I've yet to finish.(눈_눈) Probably time for Gluon to handle gifs and video, wouldn't you say? You'd think at some point I'd be able to leave the web client behind without writing the app myself that replaces its use.
Being that Hugo is server-side, were I able to fetch HTML the way I'm able to fetch JSON, I could create a plugin for generating preview cards for external links within posts. Why I'm fixated on thinking up things I could do is beyond me.
Gonna have to reread the Hugo documentation in its entirety to recall all the things I wanted to tinker with that I can now actually tinker with (since @manton kindly updated our Hugo API … making the documentation relevant again).
#Unbummed
.@manton … the deal breaking screenshot:
What I would give for Sublime Text on my iPad.
Just found this, @manton, and diggin' it.
Hugo … your choice of which f$&king end oughta catch the ellipses could not possibly render your debug output more f$&king useless. Thanks, bro.
So, at some point I am gonna come back to the bookshelves plugin and touch it up with some of the techniques and best practices I've developed as I've created additional plugins. As it stands, I want to start with two things.
- Check to make sure the plugin version as listed in the plugin.json is 6.0.0 so we can rule out an intermediate build that I corrected along the way.
- Let's try replacing the use of the plugin parameter interface with the use of a data file stored in the plugin.
From Design → Edit Custom Themes select the plugin and create a new template with location
data/plugin_bookshelves/bookshelves_data.toml
.Use the following as a starting point (where the asterisks in the description values are simply Markdown to render italics).
CoverWidth = 100 InitialView = 'grid' [[bookshelves]] key = "currentlyreading" description = "*Books I am somewhat in the process of reading*" [[bookshelves]] key = "finishedreading" description = "*Books I've managed to get myself to read*" [[bookshelves]] key = "wanttoread" description = "*Books that gaze at me judingly from beneath the television, where they currently live, for having yet to crack their spine (f$&kers).*" [[bookshelves]] key = "didwanttoread" description = "*Books whose gaze of judgement I've kinda become okay with as my interest in reading them has waned.*"