gadenbuie / metathis

:information_source: <meta> tags and social media cards for R-made web things
https://pkg.garrickadenbuie.com/metathis
Other
67 stars 3 forks source link

Reduce amount of guessing in guess_blogdown() #18

Open maxwelco opened 3 years ago

maxwelco commented 3 years ago

Hi there,

I am trying to share my xaringan slides but I am getting this following error:

Quitting from lines 35-51 (pastagem.Rmd) Error in file(con, "r") : cannot open the connection Calls: ... guess_blogdown -> grepl -> collapse -> paste -> readLines -> file Execution halted

This is my repo: https://github.com/Unoeste-PP/palestra-pastagens

My xaringan presentation: https://github.com/Unoeste-PP/palestra-pastagens/blob/main/pastagem.Rmd

Thanks

gadenbuie commented 3 years ago

You can likely get around this by adding include_meta() as the last step in the metathis pipeline.

The problem arises from a function that tries to guess if the current file is destined to be a blogdown page, in which case metathis doesn't work well. I'll take another look at the function that does the guessing, which should probably check for the blogdown directories before trying to look in the config.yaml. I could also check the output metadata of the current document, to discover, for example, that we're inside a xaringan presentation, no matter whether the presentation is part of a blogdown page.

maxwelco commented 3 years ago

Thank you for your help and explanation, it works! I am trying to get it online now.