Skip to content

KopfLab/project_template

Repository files navigation

Template

This is a project template. To use it, click on the green Use this template button, select your organization (e.g. KopfLab) as the owner (you can transfer it to your account at any point when it's ready to be made public), give it an informative Repository name that starts with your initials, and select Private to keep the data and analyses within the lab until they are ready for publication. Then hit Create repository from template and wait a few seconds for the repository to get generated. In your brand new repository, hit the green Clone or download button, and then Open in Desktop to synchronize the new repository with your own computer via GitHub Desktop (you can also do this by command-line if you're familiar with Git).

Making it public

To make your entire repository public, go to your repository settings, scroll down to the Danger Zone and click on Make Public. If you do this, everything in your repository that is synched to github will be publicly available. The Danger Zone is also where you can transfer ownership if you want to move your repository out of an organization and into your own account.

Generating a website for your repo

Alternatively (or in addition), you can make the rendered versions (i.e. HTML files) of your notebooks easily available to the public as a GitHub-hosted (=free) website. This is nice if you want to let people see your fully compiled RMarkdown and Jupyter notebook reports. For an example of what this looks like for this template repository, go to https://www.kopflab.org/project_template/.

To generate the HTML files, go into the docs folder and knit the docs.Rmd markdown file (this may or may not work on Windows, sorry). Note that if you are using Jupyter notebooks in a python virtual environment, you have to set the py_venv variable in the docs.Rmd file. Rendered files of your reports are only (re)generated if they do not yet exist or if the source notebook that created them has changed in any way. If you want to force regeneration of a rendered HTML file, simply delete it from the docs directory and re-knit the docs.Rmd markdown file. You can also manually add additional HTML files and provide links or other materials in the index.Rmd file.

To then make the contents of the docs directory publicly available (works both in private and public repos!): go to your repository settings and scroll down to Github Pages and select master branch /docs folder in the Source dropdown (this will not affect the rest of your repository, only the docs folder, the rest will stay private unless you make the entire repository public). The page will reload and when you scroll back down to the Github Pages settings it will show you at what webaddress the contents of your docs directory will be available (for example, http:// http://www.kopflab.org/YOUR_REPOSITORY_NAME/ if your repository is in this organization). Please note that it usually takes a few minutes for the page to be ready when you first switch this on so check back later if the page does not load immediately.