fmmattioni / downloadthis

Implement Download Buttons in rmarkdown 💾
https://fmmattioni.github.io/downloadthis/
Other
147 stars 5 forks source link

Missing fontawesome webfonts file causes pandoc error #43

Closed HDash closed 1 month ago

HDash commented 3 months ago

rmarkdown::render encounters fatal error when trying to knit an Rmd file which contains downloadthis buttons with self_contained = TRUE.

Error:

pandoc: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/downloadthis/assets/css/../webfonts/fa-v4compatibility.woff2: withBinaryFile: does not exist (No such file or directory)
Error:
! pandoc document conversion failed with error 1
Backtrace:
 1. EpiCompare::EpiCompare(...)
 2. rmarkdown::render(...)
 3. rmarkdown (local) convert(output_file, run_citeproc)
 4. rmarkdown (local) convert_it(output)
 5. rmarkdown (local) convert_fun(...)
 6. rmarkdown:::stop2(...)

With some experimentation, I pinpointed the root cause to be missing files:

  1. assets/css/../webfonts/fa-v4compatibility.woff2
  2. assets/css/../webfonts/fa-v4compatibility.tff

    These files are being referenced in the all.min.css, which likely invokes the missing file errors.

While they are present in the fontawesome 6.5.2 web kit, for some reason, they have not been included in the package's assets.

antonioggsousa commented 1 month ago

Hi,

I encountered the same error.

Is there any progress or workaround this issue?

Best, António

HDash commented 1 month ago

Hello @antonioggsousa, I have created a PR (#44) to fix this issue by including the missing webfont files.

fmmattioni commented 1 month ago

thanks @HDash

antonioggsousa commented 1 month ago

Thank you @HDash!