You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -92,6 +93,21 @@ which will build HTML files in `~/tmp/test-build`. You can then inspect those fi
92
93
- add `[[open-in-colab]]` in the tutorial for which you want to build a notebook
93
94
- add `--notebook_dir {path_to_notebook_folder}` to the build command.
94
95
96
+
## Writing in notebooks
97
+
98
+
You can write your docs in jupyter notebooks & use doc-builder to: turn jupyter notebooks into mdx files.
99
+
100
+
In some situations, such as course & tutorials, it makes more sense to write in jupyter notebooks (& use doc-builder converter) rather than writing in mdx files directly.
101
+
102
+
The process is:
103
+
1. In your `build_main_documentation.yml` & `build_pr_documentation.yml` enable the flag [convert_notebooks: true](https://github.com/huggingface/doc-builder/blob/main/.github/workflows/build_main_documentation.yml#L46-L48).
104
+
2. After this flag is enabled, doc-builder will convert all .ipynb files in [path_to_docs](https://github.com/huggingface/doc-builder/blob/main/.github/workflows/build_main_documentation.yml#L19-L20) to mdx files.
105
+
106
+
Moreover, you can locally convert .ipynb files into mdx files.
107
+
```bash
108
+
doc-builder notebook-to-mdx {path to notebook file or folder containing notebook files}
109
+
```
110
+
95
111
## Templates for GitHub Actions
96
112
97
113
`doc-builder` provides templates for GitHub Actions, so you can build your documentation with every pull request, push to some branch etc. To use them in your project, simply create the following three files in the `.github/workflows/` directory:
0 commit comments