-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with Pandoc versions < 2.8 #5
Comments
I was just about to write the same.
|
Maybe this has something to do with the > rmarkdown::pandoc_version()
[1] ‘2.7.3’ > rmarkdown::pandoc_version()
[1] ‘2.11.2’ |
I also think this is a pandoc version issue. If you install the latest version of pandoc you can use |
#8 is an attempt at a fix, I would appreciate it if you could try it out. Install with: remotes::install_github("seankross/postcards#8") |
That makes it work for me! This is on RStudioServer which is pandoc 2.7.3. |
Just to confirm: I also got it working with the latest pandoc version. I now switched back to release version of RStudio and
With postcards#8 I can succesfully knit the document. However, the LinkedIn/Twitter Boxes below the horizontal line are not rendered any longer.
|
Yes, this works for me too.... the error is not thrown. However, the resulting Links |
Pandoc externalised the doctemplates functionality - https://github.com/jgm/doctemplates The functionality for pipes and filters was cleaned in 2.8. "Pandoc templates now support a number of new features that have been added in doctemplates: notably, elseif, it, partials, filters, and syntax to control nesting and reflowing of text. These changes make pandoc more suitable out of the box for generating plain-text documents from data in YAML metadata. It can create enumerated lists and even tabular structures." PS: Adding data-external="1" to the Adding data-external="1" to the bootstrap link tag in the header, fixed the template for me. Trestles now shows up as intended, before this, the CSS was not applied. (This perhaps defeats the purpose of self-contained HTML, but those are links to external bootstrap CSS anyway. (But not yet these links) |
This sorts it out for me completely. (Posted to the stackoverflow as well) - although the links block is not as neat/compact as in your original version; it remains flexible. Pandoc 2.7.3 can't handle the 'pairs' in 2.8, but you can define lists in the header YAML. (By explicit specification of the nested variables within the links object - (requires two tabs before 'url').
Then in the template you can just refer to the field names:
Does that work for later versions as well? I knitted to index.html - in a folder - then in RStudio (because this is a Git Project) committed and pushed to Git. My Git is hooked up to Netlify and Netlify is pointed to the same folder (so all that is automated [as recommended]): |
Thanks - it knits without error for me now (and I didn't change anything with my RStudio/packages/pandoc) |
Yes, for me too. Jolla-Blue and Trestles both knitted without error. I see the CSS, scripts and image have not been encoded in the HTML and there's no 'data-external' attribute in the html... is that achieved elsewhere? |
This will finally get me to make a website! But I ran into this error:
processing file: test.Rmd
|......................................................................| 100%
ordinary text without R code
[...]
"template" (line 34, column 26):
unexpected "/"
expecting "." or ")$"
Error: pandoc document conversion failed with error 5
Execution halted
which points to the / in$for(it/pairs)$
The text was updated successfully, but these errors were encountered: