Lab notes in Rmarkdown
To publish an analysis note in the notebook, you need to have blogdown and hugo installed on your computer.
- git clone this repository (for example
git clone https://github.com/hakyimlab/web-internal-notes.git)
- Go to the folder where you cloned the repo and open RStudio by double clicking
internal-notes.Rproj(your Rproj name may be different depending on which repo you cloned)
- Start a new analysis by adding a
New Postfrom the addin option at the top of the
sourcepanel (this creates a folder in the contents/post/ folder with and index.md and subfolders with figures)
- Choose the title, author, tags
- Choose the
mdformat unless you will be be running R commands in the post in which case select
R Markdown (.Rmd)format option
- Save the md or Rmd (for the Rmd this will trigger the rendering of the html). The reason we use
*.mdformat instead of the
*.Rmdformat is the the md format can be edited directly from github and will be rendered automatically. Rmd needs to be rendered by Rstudio.
- git add, commit and push
- check your note has been added in https://lab-notes.hakyimlab.org/
Publishing in the internal notebook
- If we don’t want to make the post publicly available, we should use the http://internal-notes.hakyimlab.org with the repo at https://github.com/hakyimlab/web-internal-notes
Moving posts between different websites
- To move posts between websites (lab-notes.hakyimlab.org, internal-notes.hakyimlab.org, predictdb.org, etc) just move the specific folder under contents/post. For example, move the folder with all its contents in
~/Github/web-lab-notes/content/post/2020-10-29-first-note-hki/or vice versa. When in doubt, publish first on the internal repo.
Netlify is hosting the content here