Skip to content

Commit

Permalink
added docs re: Colab
Browse files Browse the repository at this point in the history
  • Loading branch information
hamelsmu committed Aug 11, 2020
1 parent 27e29f2 commit 95cc7fa
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,41 @@
"Although we can't fully automate the creation of the search engine (since you need to login to Google to do it) we have made it very easy. Here are the steps you need to follow: [Setting up search](https://nbdev.fast.ai/search)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Google Colab Badges"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Because both the documentation and code for nbdev is written in notebooks, you can optionally view and run nbdev documentation in [Google Colab](https://colab.research.google.com/). You can enable Google Colab badges that link to the appropriate notebook of your docs in your GitHub repository. \n",
"\n",
"You can toggle the this feature on or off in your `/_config.yml` file:\n",
"\n",
"```yaml\n",
"# This specifies what badges are turned on by default for notebook docs.\n",
"default_badges:\n",
" colab: true\n",
"```\n",
"\n",
"Furthermore, If you only want to hide a badge on an individual document, you can set the front matter `hide_colab_badge: true`. For example, if you want a Colab badge to show up on all docs created with notebooks, except for the notebook `nbs/06_cli.ipynb`, your front matter (in the form of a markdown cell at the top of your notebook should look like this:\n",
"\n",
"\n",
"```\n",
"# Command line functions\n",
"\n",
"> Console commands added by the nbdev library\n",
"\n",
"- hide_colab_badge: true\n",
"```\n",
"\n",
"Note how in the above example, in addition to a title `Command line functions` (formatted as a markdown heading) and the summary `Console commands added by the nbdev library` (formatted as a markdown note) the additional option `hide_colab_badge` is a list item. It is important that the list item is separated from the summary by 2 newlines as shown above, in the same notebook markdown cell."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -365,6 +400,18 @@
"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.7.6"
}
},
"nbformat": 4,
Expand Down

1 comment on commit 95cc7fa

@review-notebook-app
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Jupyter notebook diffs for this commit on  ReviewNB

You can open a pull request to discuss changes and offer feedback.


Powered by ReviewNB

Please sign in to comment.