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).
@sod I found discussion of the problem on a forum or I'd never have known WTF the problem was. With list pages you have to check every page in the list … and … for whatever reason … on the home page you have to go a layer deeper.
@Moondeer I probably lack too much context here, but judging by the comment at the bottom, you're including stylesheets based on if a shortcode is used or not. Is that right? Could an alternative be to just always have the stylesheet? That way, you could just get rid of the entire