Skip to content

Commit d88fe9a

Browse files
authored
Merge pull request #694 from fastai/conditional-content
Conditional content for markdown vs HTML for README
2 parents 8fede7f + 99888dd commit d88fe9a

File tree

2 files changed

+61
-10
lines changed

2 files changed

+61
-10
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ Getting started
33

44
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
55

6-
**NB: This is nbdev v2, a new from-scratch rewrite of nbdev that’s not
7-
backwards compatible. Whilst the differences to nbdev1 aren’t huge, it
8-
does require some changes. So if you wish to continue to use nbdev1
9-
until you’ve got the time to upgrade, you can find the old version docs
10-
at [nbdev1.fast.ai](https://nbdev1.fast.ai). You can use version-pinning
11-
in your `requirements.txt` or `settings.ini` (i.e use `'nbdev<2'` as
12-
your dependency) to stop nbdev from being upgraded.**
6+
*NB: This is nbdev v2, a major upgrade of nbdev. Whilst the differences
7+
to nbdev1 aren’t huge, it does require some changes. The old version
8+
docs are at [nbdev1.fast.ai](https://nbdev1.fast.ai). You can use
9+
version-pinning in `settings.ini` (i.e `'nbdev<2'`) to stop nbdev from
10+
upgrading. To upgrade, follow the [migration
11+
tutorial](/migrating.html).*
1312

1413
------------------------------------------------------------------------
1514

@@ -68,8 +67,17 @@ The best way to learn to use nbdev is to complete one of these tutorials
6867
square in the bottom right of the video; to view in a separate Youtube
6968
window, click the Youtube logo):
7069

71-
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/l7zS8Ld4_iA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
72-
</iframe>
70+
<div>
71+
72+
<div>
73+
74+
<a href="http://www.youtube.com/watch?v=l7zS8Ld4_iA" target="_blank"
75+
title="nbdev walkthrough"><img
76+
src="https://github.com/fastai/logos/raw/main/nbdev_walkthrough.png" /></a>
77+
78+
</div>
79+
80+
</div>
7381

7482
(There’s an [alternate version of the
7583
walkthru](https://youtu.be/67FdzLSt4aA) avaialable with the coding
@@ -103,6 +111,7 @@ available commands:
103111
nbdev_preview Start a local docs webserver
104112
nbdev_pypi Create and upload Python package to PyPI
105113
nbdev_quarto Create Quarto docs and README.md
114+
nbdev_readme Render README.md from index.ipynb
106115
nbdev_release Release both conda and PyPI packages
107116
nbdev_sidebar Create sidebar.yml
108117
nbdev_test Test in parallel notebooks matching `fname`, passing along `flags`

nbs/getting_started.ipynb

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,22 @@
7979
"cell_type": "markdown",
8080
"metadata": {},
8181
"source": [
82-
"<iframe width=\"560\" height=\"315\" src=\"https://www.youtube-nocookie.com/embed/l7zS8Ld4_iA\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
82+
"::: {.content-visible when-format=\"html\"}\n",
83+
"\n",
84+
"<iframe width=\"560\" height=\"315\" src=\"https://www.youtube-nocookie.com/embed/l7zS8Ld4_iA\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n",
85+
"\n",
86+
":::"
87+
]
88+
},
89+
{
90+
"cell_type": "markdown",
91+
"metadata": {},
92+
"source": [
93+
"::: {.content-visible when-format=\"markdown\"}\n",
94+
"\n",
95+
"[![](https://github.com/fastai/logos/raw/main/nbdev_walkthrough.png)](http://www.youtube.com/watch?v=l7zS8Ld4_iA \"nbdev walkthrough\"){target=\"_blank\"}\n",
96+
"\n",
97+
":::"
8398
]
8499
},
85100
{
@@ -120,6 +135,7 @@
120135
"\u001b[1m\u001b[94mnbdev_preview\u001b[0m Start a local docs webserver\n",
121136
"\u001b[1m\u001b[94mnbdev_pypi\u001b[0m Create and upload Python package to PyPI\n",
122137
"\u001b[1m\u001b[94mnbdev_quarto\u001b[0m Create Quarto docs and README.md\n",
138+
"\u001b[1m\u001b[94mnbdev_readme\u001b[0m Render README.md from index.ipynb\n",
123139
"\u001b[1m\u001b[94mnbdev_release\u001b[0m Release both conda and PyPI packages\n",
124140
"\u001b[1m\u001b[94mnbdev_sidebar\u001b[0m Create sidebar.yml\n",
125141
"\u001b[1m\u001b[94mnbdev_test\u001b[0m Test in parallel notebooks matching `fname`, passing along `flags`\n",
@@ -132,6 +148,13 @@
132148
"!nbdev_help"
133149
]
134150
},
151+
{
152+
"cell_type": "markdown",
153+
"metadata": {},
154+
"source": [
155+
"## FAQ"
156+
]
157+
},
135158
{
136159
"cell_type": "markdown",
137160
"metadata": {},
@@ -146,6 +169,25 @@
146169
"[Watch this video](https://youtu.be/9Q6sLbz37gk). Don't worry, we still get this too, despite having used `nbdev` for a wide range of \"very serious\" software projects over the last three years, including [deep learning libraries](https://github.com/fastai/fastai), [API clients](https://github.com/fastai/ghapi), [Python language extensions](https://github.com/fastai/fastcore), [terminal user interfaces](https://github.com/nat/ghtop), and more!"
147170
]
148171
},
172+
{
173+
"cell_type": "markdown",
174+
"metadata": {},
175+
"source": [
176+
"## nbdev in the wild\n",
177+
"\n",
178+
"### fastai ecosystem\n",
179+
"\n",
180+
"`nbdev` has been used to build innovative software in the fastai\n",
181+
"ecosystem, including the [`fastai`](https://docs.fast.ai/) deep learning\n",
182+
"library which implements a [unique layered API and callback\n",
183+
"system](https://arxiv.org/abs/2002.04688), and\n",
184+
"[`fastcore`](https://fastcore.fast.ai/), which supercharges Python\n",
185+
"leveraging its dynamic nature. Furthermore, `nbdev` allows a very small\n",
186+
"number of developers to maintain and grow a [large\n",
187+
"ecosystem](https://github.com/fastai) of software engineering, data\n",
188+
"science, machine learning, and devops tools."
189+
]
190+
},
149191
{
150192
"cell_type": "markdown",
151193
"metadata": {},

0 commit comments

Comments
 (0)