View Code? Open in Web Editor
NEW
This project forked from rahuldave /gpages
Home Page: https://github.com/rahuldave/gpages
HTML 0.10%
Smarty 0.05%
Python 0.02%
Jupyter Notebook 99.83%
gpages's Introduction
Script for the Lab: Preamble
Set up a github account
Create a Public repository called testgpages
with a README.md
and a Jekyll .gitignore
.
Download the github app and clone this repository down.
Also fork-clone/clone the repository https://github.com/rahuldave/gpages .
Open both repositories side by side in the Finder (File Manager)
Make an edit to the README.md
in testgpages
and commit and push to understand the git flow.
Open a terminal from the github app for testgpages
.
Copy the notebooks
folder from gpages
into testgpages
Using that terminal, convert the notebooks to html:
jupyter nbconvert --output-dir . --to html notebooks/olives-eda.ipynb
jupyter nbconvert --output-dir . --to html notebooks/olives-model.ipynb
Copy oldondex.html
from gpages
to index.html
in testgpages
Commit and push
Go to the hithub user interface for settings and enable a website on the master
branch of testgpages
.
Go to https://username.github.io/testgpages/index.html
to see your website
Delete the html files in the main testgpages
folder. We will generate markdown instead
From gpages
copy the _layouts
folder, index.md
, and _config.yml
.
Using the testgpages
terminal, convert the notebooks into markdown using our custom template.
jupyter nbconvert --output-dir . --to markdown --template ../gpages/_support/markdown.tpl notebooks/olives-eda.ipynb
jupyter nbconvert --output-dir . --to markdown --template ../gpages/_support/markdown.tpl notebooks/olives-model.ipynb
Add YAML preambles and some TOC frontmatter to our markdown files
python ../gpages/_support/nbmd.py olives-eda.md
python ../gpages/_support/nbmd.py olives-model.md
Edit the markdown files to add a YAML tag nav_include: 1
and nav_include: 2
respectively to the above markdown files.The 1 and 2 reflect the position on the navigation menu in the default.html
template in _layouts
.
Commit and push everything
Go to the website in a bit to check the improvements
Hide some cells: see our nbconvert
template to see how to do this.
Use another theme from the github defaults
ADVANCED: use your own jekyll theme.