statichunt / iwriter-hugo

iWriter is a Travel blog template based on Bootstrap and powered by Hugo.
https://statichunt.com/themes/hugo-iwriter
MIT License
16 stars 15 forks source link

index page using image from about page, pulling other info too #9

Closed genebean closed 1 year ago

genebean commented 1 year ago

I set this at the top of content/english/about.md:

image: "https://storage.buzzsprout.com/variants/nft3jr170a2lo7sohle2b62ehzv4/f39677667998d4983b671c898b89f635827f90bc24d585ec289a8d3e04495b83.png"

Doing so breaks https://github.com/statichunt/iwriter-hugo/blob/adeab442cdd419459e711c8713451eb1e2b3fae7/layouts/partials/datasets/twitter-card.html#L3

Somehow, that section of code that sets og:image and the like is attempting to pull in the value of image from the about page and, because it is remote, it is not passing the fileExists test. What I feel is a bug is it pulling ANYTHING from the frontmatter of about.md.

Is this maybe because the template for index and a few other pages are not under themes/iWriter-hugo/layouts/_default/ like the templates for the about page?

genebean commented 1 year ago

I commented out the image in my about page as a work around. The other related issue is that the index page is pulling some other open graph info from contact. For example, check out how Twitter previews https://www.volunteertechnologist.com/

19B3519B-9C76-47DD-9B70-FFCABD1418C0

genebean commented 1 year ago

On a related note, how come this theme doesn’t use the built in twitter card? https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/twitter_cards.html Does the theme one do extra stuff?