@@ -70,6 +70,8 @@ yaml_preface:
7070 - `nav`: override or disable inherited navigation.
7171 - `footer`: override or disable inherited footer.
7272 - `comments`: page-level comments settings when comments are enabled.
73+ - `toc`: enable or disable the generated table of contents for this notebook page.
74+ - `colab`: enable or disable the Colab badge for this notebook page.
7375
7476linking :
7577 label : Link a Notebook
@@ -96,11 +98,29 @@ colab:
9698 If Webifier is run with a repository name, notebook pages can include a
9799 Google Colab URL pointing to the source notebook in the repository. The
98100 standard bundled assets include a small Colab badge image for this workflow.
101+ Colab links are enabled by default for notebooks when `--repo-full-name` is
102+ available.
99103
100104 ```bash
101105 webify --repo-full-name owner/repo --baseurl /repo
102106 ```
103107
108+ Disable the badge for one notebook in the first Markdown cell:
109+
110+ ```markdown
111+ ---
112+ title: Local-only Notebook
113+ colab: false
114+ ---
115+ ```
116+
117+ Or set the site-wide notebook default:
118+
119+ ```yaml
120+ notebook:
121+ colab: false
122+ ```
123+
104124assets_and_outputs :
105125 label : Assets and Outputs
106126 content : |
@@ -119,10 +139,31 @@ toc_and_polish:
119139 label : Table of Contents and Page Polish
120140 content : |
121141 The standard content page can build a collapsible table of contents from
122- headings in notebook Markdown cells. That works best when notebooks use
142+ headings in notebook Markdown cells. Notebook content pages get this TOC by
143+ default when they have enough headings. That works best when notebooks use
123144 normal heading levels and do not also contain a hand-written table of
124145 contents cell.
125146
147+ Disable it for one notebook in the first Markdown cell:
148+
149+ ```markdown
150+ ---
151+ title: Tiny Notebook
152+ toc: false
153+ ---
154+ ```
155+
156+ Or use explicit content-page controls:
157+
158+ ```markdown
159+ ---
160+ title: Tiny Notebook
161+ content_pages:
162+ toc: true
163+ cleanup: true
164+ ---
165+ ```
166+
126167 Recommended notebook cleanup before publishing:
127168
128169 - Put metadata in the first Markdown cell as YAML front matter.
0 commit comments