Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a Jupyter Notebook episode template for auto-generating markdown #3

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions episode_template_for_conversion.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"cells": [
{
"cell_type": "raw",
"metadata": {},
"source": [
"---\n",
"title: \"Title of Episode\"\n",
"teaching: 10\n",
"exercises: 5\n",
"questions:\n",
"- \"How to include YAML front matter for episodes in Jupyter Notebook format that will be converted to Markdown so Jekyll renders them?\"\n",
"- \"How to utilize callouts and other styles available through the Carpentries lesson style file?\"\n",
"objectives:\n",
"- \"Describe how to build an episode as a Jupyter Notebook that will subsequently be converted to Markdown.\"\n",
"keypoints:\n",
"- \"YAML front matter must be in the first cell, with cell type 'Raw NBConvert'.\"\n",
"- \"Include questions, objectives, and keypoints in the YAML front matter.\"\n",
"- \"Callout styles can be used as documented, in a cell of type 'Markdown'.\"\n",
"authors: [Ciera Martinez, Hilmar Lapp]\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> ## Things You'll Need to Complete This Tutorial\n",
">\n",
"> Good pizza, and some time ...\n",
">\n",
"> ### Download Data\n",
"> Instructions for downloading ...\n",
"{: .prereq}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lesson\n",
"\n",
"This is where you put your lesson content, which can include additional Markdown and code cells."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises\n",
"\n",
"This is where you add learner exercises to the lesson.\n",
"There can be multiple of these throughout the lesson.\n",
"\n",
"You can utilize the Carpentries-style callout style for exercises:\n",
"\n",
"> ## Exercise 1\n",
"> Text about how to carry out the exercise ...\n",
"{: .challenge}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can use all other callout styles as well:\n",
"\n",
"> ## Data Tip\n",
"> This is where you put instructions to clarify a data concept. There can be multiple of these tips throughout the lesson episode.\n",
"{: .callout}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that Questions, Objectives, and Key points callout will be rendered automatically from the YAML front matter."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## How to link images\n",
"\n",
"![](./fig/reproLogo-plustext.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## How to convert to Markdown episode"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Note that for the command below we assume that the Notebook source is in _episodes_notebooks/\n",
"# (or another directory that is at the same level as _episodes), and that generated plots and\n",
"# other figures are all to go into the fig/ directory\n",
"! jupyter nbconvert --NbConvertApp.output_files_dir=../fig --to=markdown --output-dir _episodes NN-episode-name.ipynb"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Binary file added fig/reproLogo-plustext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.