-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(quarto): override api code blocks with custom renderer
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from __future__ import annotations | ||
|
||
import griffe.dataclasses as dc # noqa: F401 | ||
import griffe.docstrings.dataclasses as ds # noqa: F401 | ||
import griffe.expressions as expr # noqa: F401 | ||
import quartodoc.ast as qast | ||
from plum import dispatch | ||
from quartodoc import MdRenderer | ||
|
||
|
||
class Renderer(MdRenderer): | ||
style = "ibis" | ||
|
||
@dispatch | ||
def render(self, el: qast.ExampleCode): | ||
return f"""``` | ||
{el.value} | ||
```""" |