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
See a `sample document source <https://raw.githubusercontent.com/adamtheturtle/sphinx-notionbuilder/refs/heads/main/sample/index.rst>`_ and the `published Notion page <https://www.notion.so/Sphinx-Notionbuilder-Sample-2579ce7b60a48142a556d816c657eb55>`_ for an example of each of these.
42
43
43
-
To set these up, install the extensions you want to use and add them to your ``conf.py``:
44
+
To set these up, install the extensions you want to use and add them to your ``conf.py``, before ``sphinx_notion``:
44
45
45
46
.. code-block:: python
46
47
47
48
"""Configuration for Sphinx."""
48
49
49
50
extensions = [
50
51
"atsphinx.audioplayer",
52
+
"sphinx.ext.mathjax",
53
+
"sphinx_iframes",
54
+
"sphinx_immaterial.task_lists",
55
+
"sphinx_simplepdf",
51
56
"sphinx_toolbox.collapse",
57
+
"sphinx_toolbox.rest_example",
52
58
"sphinxcontrib.video",
59
+
"sphinxcontrib_text_styles",
53
60
"sphinxnotes.strike",
54
-
"sphinx_immaterial.task_lists",
55
-
"sphinx_toolbox.rest_example",
56
-
"sphinx.ext.mathjax",
57
-
"sphinx_notion", # Put ``sphinx_notion`` after the other extensions.
61
+
"sphinx_notion",
58
62
]
59
63
60
-
If you are using ``sphinxcontrib.video`` with ``sphinx-iframes``, the warning ``app.add_directive`` will be raised.
61
-
This is because ``sphinxcontrib.video`` and ``sphinx-iframes`` both implement a ``video`` directive.
64
+
If you are using ``sphinxcontrib.video`` with ``sphinx_iframes``, the warning ``app.add_directive`` will be raised.
65
+
This is because ``sphinxcontrib.video`` and ``sphinx_iframes`` both implement a ``video`` directive.
62
66
To suppress this warning, add the following to your ``conf.py``:
63
67
64
68
.. code-block:: python
@@ -67,8 +71,8 @@ To suppress this warning, add the following to your ``conf.py``:
67
71
68
72
suppress_warnings = ["app.add_directive"]
69
73
70
-
Supported markup
71
-
----------------
74
+
Supported Notion Block Types
75
+
----------------------------
72
76
73
77
The following syntax is supported:
74
78
@@ -78,26 +82,22 @@ The following syntax is supported:
78
82
- Code blocks
79
83
- Table of contents
80
84
- Block quotes
81
-
- All standard admonitions (note, warning, tip, attention, caution, danger, error, hint, important)
82
-
- Collapsible sections (using the ``collapse`` directive from ``sphinx-toolbox``)
83
-
- Rest-example blocks (using the ``rest-example`` directive from ``sphinx-toolbox``)
85
+
- Callouts
86
+
- Collapsible sections (using the ``collapse`` directive from `sphinx-toolbox<https://sphinx-toolbox.readthedocs.io/en/stable/extensions/collapse.html>`_ )
87
+
- Rest-example blocks (using the ``rest-example`` directive from `sphinx-toolbox<https://sphinx-toolbox.readthedocs.io/en/stable/extensions/rest_example.html>`_ )
84
88
- Images (with URLs or local paths)
85
89
- Videos (with URLs or local paths)
86
90
- Audio (with URLs or local paths)
87
91
- PDFs (with URLs or local paths)
88
-
- Embed blocks (using the ``iframe`` directive from ``sphinx-iframes``)
92
+
- Embed blocks (using the ``iframe`` directive from `sphinx-iframes<https://pypi.org/project/sphinx-iframes/>`_ )
89
93
- Tables
90
-
- Strikethrough text
91
-
- Colored text and text styles (bold, italic, monospace)
92
-
- Mathematical equations (inline and block-level)
94
+
- Strikethrough text (using the ``strike`` role from `sphinxnotes-strike <https://github.com/sphinx-toolbox/sphinxnotes-strike>`_ )
95
+
- Colored text and text styles (bold, italic, monospace) (using various roles from `sphinxcontrib-text-styles <https://sphinxcontrib-text-styles.readthedocs.io/>`_ )
96
+
- Mathematical equations (inline and block-level, using the ``math`` role and directive from `sphinx.ext.mathjax <https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax>`_ )
93
97
94
98
See a `sample document source <https://raw.githubusercontent.com/adamtheturtle/sphinx-notionbuilder/refs/heads/main/sample/index.rst>`_ and the `published Notion page <https://www.notion.so/Sphinx-Notionbuilder-Sample-2579ce7b60a48142a556d816c657eb55>`_.
95
99
96
-
.. code-block:: python
97
-
98
-
"""Configuration for Sphinx."""
99
-
100
-
suppress_warnings = ["app.add_directive"]
100
+
All of these can be used in a way which means your documentation can still be rendered to HTML.
0 commit comments