mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Enable MyST Markdown docs, port events.rst, refs #2565
This commit is contained in:
parent
48982a0ff5
commit
47e4060469
5 changed files with 28 additions and 16 deletions
2
Justfile
2
Justfile
|
|
@ -29,7 +29,7 @@ export DATASETTE_SECRET := "not_a_secret"
|
||||||
|
|
||||||
# Serve live docs on localhost:8000
|
# Serve live docs on localhost:8000
|
||||||
@docs: cog blacken-docs
|
@docs: cog blacken-docs
|
||||||
cd docs && uv run make livehtml
|
uv sync --extra docs && cd docs && uv run make livehtml
|
||||||
|
|
||||||
# Apply Black
|
# Apply Black
|
||||||
@black:
|
@black:
|
||||||
|
|
|
||||||
12
docs/conf.py
12
docs/conf.py
|
|
@ -36,12 +36,19 @@ extensions = [
|
||||||
"sphinx.ext.extlinks",
|
"sphinx.ext.extlinks",
|
||||||
"sphinx.ext.autodoc",
|
"sphinx.ext.autodoc",
|
||||||
"sphinx_copybutton",
|
"sphinx_copybutton",
|
||||||
|
"myst_parser",
|
||||||
|
"sphinx_markdown_builder",
|
||||||
]
|
]
|
||||||
if not os.environ.get("DISABLE_SPHINX_INLINE_TABS"):
|
if not os.environ.get("DISABLE_SPHINX_INLINE_TABS"):
|
||||||
extensions += ["sphinx_inline_tabs"]
|
extensions += ["sphinx_inline_tabs"]
|
||||||
|
|
||||||
autodoc_member_order = "bysource"
|
autodoc_member_order = "bysource"
|
||||||
|
|
||||||
|
myst_enable_extensions = ["colon_fence"]
|
||||||
|
|
||||||
|
markdown_http_base = "https://docs.datasette.io/en/stable"
|
||||||
|
markdown_uri_doc_suffix = ".html"
|
||||||
|
|
||||||
extlinks = {
|
extlinks = {
|
||||||
"issue": ("https://github.com/simonw/datasette/issues/%s", "#%s"),
|
"issue": ("https://github.com/simonw/datasette/issues/%s", "#%s"),
|
||||||
}
|
}
|
||||||
|
|
@ -53,7 +60,10 @@ templates_path = ["_templates"]
|
||||||
# You can specify multiple suffix as a list of string:
|
# You can specify multiple suffix as a list of string:
|
||||||
#
|
#
|
||||||
# source_suffix = ['.rst', '.md']
|
# source_suffix = ['.rst', '.md']
|
||||||
source_suffix = ".rst"
|
source_suffix = {
|
||||||
|
".rst": "restructuredtext",
|
||||||
|
".md": "markdown",
|
||||||
|
}
|
||||||
|
|
||||||
# The master toctree document.
|
# The master toctree document.
|
||||||
master_doc = "index"
|
master_doc = "index"
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
.. _events:
|
(events)=
|
||||||
|
# Events
|
||||||
Events
|
|
||||||
======
|
|
||||||
|
|
||||||
Datasette includes a mechanism for tracking events that occur while the software is running. This is primarily intended to be used by plugins, which can both trigger events and listen for events.
|
Datasette includes a mechanism for tracking events that occur while the software is running. This is primarily intended to be used by plugins, which can both trigger events and listen for events.
|
||||||
|
|
||||||
The core Datasette application triggers events when certain things happen. This page describes those events.
|
The core Datasette application triggers events when certain things happen. This page describes those events.
|
||||||
|
|
||||||
Plugins can listen for events using the :ref:`plugin_hook_track_event` plugin hook, which will be called with instances of the following classes - or additional classes :ref:`registered by other plugins <plugin_hook_register_events>`.
|
Plugins can listen for events using the {ref}`plugin_hook_track_event` plugin hook, which will be called with instances of the following classes - or additional classes {ref}`registered by other plugins <plugin_hook_register_events>`.
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
.. automodule:: datasette.events
|
.. automodule:: datasette.events
|
||||||
:members:
|
:members:
|
||||||
:exclude-members: Event
|
:exclude-members: Event
|
||||||
|
```
|
||||||
|
|
@ -64,6 +64,8 @@ docs = [
|
||||||
"blacken-docs",
|
"blacken-docs",
|
||||||
"sphinx-copybutton",
|
"sphinx-copybutton",
|
||||||
"sphinx-inline-tabs",
|
"sphinx-inline-tabs",
|
||||||
|
"myst-parser",
|
||||||
|
"sphinx-markdown-builder",
|
||||||
"ruamel.yaml",
|
"ruamel.yaml",
|
||||||
]
|
]
|
||||||
test = [
|
test = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue