Skip to content
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

Consistently use gfm rather than markdown_github #285

Merged
merged 12 commits into from
Jan 31, 2022
Merged

Consistently use gfm rather than markdown_github #285

merged 12 commits into from
Jan 31, 2022

Conversation

peterdesmet
Copy link
Member

Description

Some index.Rmd files used the deprecated variant: markdown_github, which results in a warning when knitting. This PR updates all index.Rmd files to consistently use the recommended gfm and 2-space indentation in yaml frontmatter:

output: 
  md_document:
    preserve_yaml: true
    variant: gfm

For some tutorials, this updates the index_files/figure-markdown_github to index_files/gfm. The PR has little to no effect on the website.

Copy link
Member

@florisvdh florisvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems fine, except in one Rmd file where some characters were escaped for an unknown reason. I suggest to revert that since it is not consistent with Pandoc's markdown.

content/tutorials/r_citations_markdown/index.Rmd Outdated Show resolved Hide resolved
content/tutorials/r_citations_markdown/index.Rmd Outdated Show resolved Hide resolved
content/tutorials/r_citations_markdown/index.Rmd Outdated Show resolved Hide resolved
Copy link
Member

@florisvdh florisvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further, see #200 (comment). I advise to use gfm+footnotes instead of gfm.

Thanks for the efforts you have been doing here @peterdesmet 👍

@florisvdh
Copy link
Member

I advise to use gfm+footnotes instead of gfm.

In order not to have to re-knit tutorials, you could just update the Rmd files here, so that this is taken care of next time they are knitted. But probably that is your approach already.

Caveat: some open pull requests contain new tutorials, so the changes may have to be applied there as well.

@florisvdh
Copy link
Member

Caveat: some open pull requests contain new tutorials, so the changes may have to be applied there as well.

In order to limit this problem, can you have a further look at remaining tasks in this PR @peterdesmet, so that we get this in master? Thanks!

@peterdesmet
Copy link
Member Author

@florisvdh the backslashes are removed. Do you want me to use gfm+footnotes everywhere or in specific places?

@florisvdh
Copy link
Member

florisvdh commented Jan 27, 2022

Do you want me to use gfm+footnotes everywhere or in specific places?

I suggest to do it everywhere, since often a new tutorial will be based on another one and we better do it consistently. If you wish, I could try to do this at once, with sed. Further, such update is best applied to existing PRs with new tutorials, not only master. Maybe the 'create tutorial' tutorial also needs checking.

If you'd find a way to let Hugo make the citation links that appear useful - i.e. the links which appear after adding link-citations: true - then that would be superb! I didn't find the solution in #200 (comment).

The following lines caused an error in read.bib():

Error in charToDate(x) :
  character string is not in a standard unambiguous format

@florisvdh removing the lines causes a warning (already better than an error), which also happens for 4 other entries (6 in total now):

ignoring entry 'heijmans_spatial_2019' (line 106) because :
	A bibentry of bibtype ‘Book’ has to specify the field: publisher

Can you fix this?
Mostly only index.Rmd containing footnotes were knitted
@peterdesmet
Copy link
Member Author

@florisvdh I have

  • Removed output frontmatter from index.md files that are not generated from index.Rmd
  • Updated index.Rmd frontmatter to use gfm+footnotes and knitted where relevant. See e.g. footnotes at bottom, where they weren't there before at https://inbo.github.io/tutorials/tutorials/spatial_crs_coding/
  • Updated create a tutorial to indicate the desired frontmatter

peterdesmet added a commit that referenced this pull request Jan 28, 2022
peterdesmet added a commit that referenced this pull request Jan 28, 2022
peterdesmet added a commit that referenced this pull request Jan 28, 2022
peterdesmet added a commit that referenced this pull request Jan 28, 2022
@peterdesmet
Copy link
Member Author

And finally, I have updated the frontmatter in the open pull requests, so we don't reintroduce old frontmatter.

Copy link
Member

@florisvdh florisvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, well done 👍 . Thank you!

@florisvdh florisvdh merged commit b21a805 into master Jan 31, 2022
@florisvdh florisvdh deleted the gfm branch January 31, 2022 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants