cooperaj / rmwd-hugo-theme

The theme for my blog. It is pretty custom but you're welcome to have a browse.
https://realmenweardress.es
MIT License
2 stars 0 forks source link

Trying to use the toot shortcode but fails on my Hugo #25

Open hobbesjaap opened 1 year ago

hobbesjaap commented 1 year ago

First of all - a big thank you for putting toot.html together! A Hugo shortcode that parses a Toot and integrates it into a static webpage like this is exactly what I'm looking for.

I'm unable to get it to work, however, and was wondering if you could help me?

I run a separate "flavour" of Hugo known as "blogdown" which integrates Hugo with R to allow for R Markdown files to be parsed into websites.

I try to call your shortcode like this:

r htmltools::HTML("{{< toot id=\"110168841652121342\" >}}")

This is the accepted way for blogdown to pass shortcodes and it works fine with other shortcodes. When trying to use it with your shortcode, the %s isn't converted into anything.

Before I try to dig a bit deeper, would this numeric code be sufficient for my toot to be pulled? I haven't specified my domain name or link to any JS libraries anywhere. Would that be required or should that be parsed from just this number?

(It could be an issue with blogdown specifically, for example)

Thanks for any help you may be able to give!

cooperaj commented 1 year ago

Yeah. Its is possible to use {{<toot 110168841652121342>}} but I'm not sure how blogdown works with it all.