diff --git a/book/_config.yml b/book/_config.yml index 99ea80d..02e26d1 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -11,8 +11,6 @@ html: baseurl : "https://teachbooks.io/manual/" sphinx: - local_extensions: - include_remove_yaml: _ext/ extra_extensions: - sphinx_inline_tabs - sphinx.ext.imgconverter diff --git a/book/_ext/include_remove_yaml/__init__.py b/book/_ext/include_remove_yaml/__init__.py deleted file mode 100644 index a6181f5..0000000 --- a/book/_ext/include_remove_yaml/__init__.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations -from sphinx.util import logging -logger = logging.getLogger(__name__) - -def _strip_yaml(lines: list[str]) -> list[str]: - - if not lines: - return lines - for ix,lines_set in enumerate(lines): - new_lines = lines_set.splitlines() - if new_lines[0].strip() != "---": - continue - # yaml front matter detected - # find closing delimiter - index_end = 1 - for i in range(1, len(new_lines)): - tok = new_lines[i].strip() - if tok == "---": - index_end = i - break - new_lines = new_lines[index_end+1 :] - lines[ix] = "\n".join(new_lines) - return lines # no closing delimiter -> leave unchanged - -def on_include_read(app, docname, path, content): - # content is a list[str]; modify in-place - new = _strip_yaml(content) - if new is not content: - content[:] = new - -def setup(app): - app.connect("include-read", on_include_read) - return {} diff --git a/book/intro.md b/book/intro.md index c2739e3..165c9f7 100644 --- a/book/intro.md +++ b/book/intro.md @@ -1,8 +1,3 @@ ---- -file_format: mystnb -kernelspec: - name: python3 ---- # TeachBooks Manual This manual is primarily designed for and by teachers for use in education, but should be a useful resource for anyone interested in creating and collaborating on a TeachBook: a Jupyter book v1 v1 using the Sphinx logo Sphinx backend with additional editing tools and book features. Our aim is to provide a simple way to start book-making for new users (it only takes 10 clicks!), ease the editing process for anyone, and provide additional features developed for education-purposes. We hope you find this resource useful and refer back to it often. diff --git a/requirements.txt b/requirements.txt index 946f15a..c7b9259 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -# teachbooks == 0.2.3 -git+https://github.com/TeachBooks/TeachBooks@issue-127 +teachbooks == 0.2.3 sphinx-inline-tabs git+https://github.com/TeachBooks/TeachBooks-Favourites +sphinx-gated-directives teachbooks-sphinx-grasple @@ -11,8 +11,4 @@ sphinx-apa-references # For executing Jupyter Notebooks myst_nb numpy -matplotlib - -sphinx-tudelft-theme == 1.2.1 - -git+https://github.com/TeachBooks/Sphinx-Gated-Directives \ No newline at end of file +matplotlib \ No newline at end of file