tilburgsciencehub / website

Learn to work more efficiently on empirical research projects.
https://tilburgsciencehub.com
38 stars 47 forks source link

[Development Call]: Script that converts .Rmd/Jupyter notebooks to TSH format #675

Closed shrabasteebanerjee closed 7 months ago

shrabasteebanerjee commented 1 year ago

Is your content request related to a problem you've encountered during your research process? Please describe.

Some folks are more comfortable writing on Rmd or Jupyter. Can we offer them the option of using a script that takes their markdown as input and generates the TSH template as output?

hannesdatta commented 1 year ago

Here are some pointers, @paulina-ambroziak.

https://hugodown.r-lib.org/

I'd say: teach yourself how this package works and what it can do (and cannot do). Then, provide an assessment whether it can be used for our purpose or not, and how much time it would take you to get it to work.

paulina-ambroziak commented 1 year ago

Hi @hannesdatta,

I'd like to have a short discussion to choose the best solution, some points for the meeting:

1. Hugodown and Blogdown hugodown is an experimental package – there’s not much documentation available blogdown might be more intuitive to use due to addins in RStudio (e.g. Addins > Blogdown > New post), Preview site with _blogdown::servesite() Info on using blogdown: https://smac-group.github.io/ds/section-blogdown-websites-and-blogs-creation.html

2. Hugo Archetypes It is possible to create Archetypes in Hugo so that when a new post is created (with ‘hugo new’ command), it contains a template (e.g. for a building block or tutorial). More info: https://gohugo.io/content-management/archetypes/

3. Convert Rmd to md It’s recommended to convert RMarkdown files directly to Markdown without Blogdown by using _render("input.Rmd", mddocument()) or adding _output: mddocument to the file’s front matter. Source: https://wowchemy.com/docs/import/rmarkdown/

4. Convert Jupyter Notebook to md Convert notebook to Markdown: _jupyter nbconvert Untitled.ipynb --to markdown --NbConvertApp.output_filesdir=. Source: https://wowchemy.com/docs/import/jupyter/

paulina-ambroziak commented 1 year ago

Status: done (see issue #670)

Notes after speaking to Valerie:

Solution: update Onboarding Guide with a step-by-step guide explaining everything from creating a building block/tutorial from a template (including templates that can be downloaded in the .md format) to building the site locally to creating a pull request.

paulina-ambroziak commented 1 year ago

Status: to do

Notes after talking to Alex:

Action Point: research how to implement it on the TSH website

hannesdatta commented 7 months ago

Let's close. We didn't end up taking this route for TSH.