Table of Contents

Creating a Reproducibility Guide using Github Pages

Let's do reproducible science! We can create a Github Page that goes along with our project repo (our project code on github) that walks others through our project, code, analyses, and how to reproduce or implement all code associated with a given publication.

To uses github's built-in support for the jekyll static site generator, a minimal documentation setup includes a docs/ directory with two files: _config.yaml and index.md.

docs/
  _config.yaml   # theme and configuration
  index.md       # actual documentation

Step 1. make docs/

First, create a docs/ directory in your local github repository

cd /path/to/mygithub/repo
mkdir docs

Step 2. docs/_config.yml

Create a _config.yml file in docs which includes the page title, description, logo (image file), and theme for your Project Page. Your _config.yml file should look something like this:

title: <br>Cortical Myelin Maturation
description: <br>Project Information and Reproducibility Guide
logo: ./project_abstract.png
theme: jekyll-theme-minimal

Step 4. doc/index.md

Create an index.md file. This file includes all of the text, links, etc. that you want to include on your Project Page! The text you write should comply to and will follow the formatting of Markdown syntax: https://github.com/Manuel83/sample/blob/master/index.md. Here is an example of an index.md file that served as one of Valerie’s study reproducibility guides.

Here's a contrived example

# My Project
This project **does amazing things**. Use it like
```bash
./01_organize_data.bash
./02_run_stats.R
```

> [!NOTE]
> Watch out for this made up statistical //edge case//

Step 5. commit changes

Add, commit and push your config file, index file, and logo images. (Here we are using the main branch. Others may want to use gh-pages branch.)

git add docs 
git commit -m "initiating Project Page!" #edit the message after -m to your liking
git push origin main

Step 6. configure github

Finally, tell github to build your Project Page from /docs on your main branch. Go to your github repository on github.com (in the web browser) and follow these steps:

  1. Click on Settings on your repo page
  2. Click on Pages on the left column
  3. Under “Build and deployment” select Deploy from a branch
  4. Under Branch, choose main and /docs (use gh-pages instead of main if you made that choice above).

Your site should be live 8-)! At https://labneurocogdevel.github.io/my_reponame or https://mygitusername.github.io/my_reponame (depending where your repo lives)