Skip to content

Commit d839325

Browse files
authored
Add pyvis html render to documentation (#394)
docs: add pyvis html render
1 parent 836e84b commit d839325

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Added:
99
- Tree Render: `render_tree` to accept theme argument.
10+
- Docs: Add pyvis html render to Tree Demonstration.
1011

1112
## [0.29.2] - 2025-05-15
1213
### Added:

docs/gettingstarted/demo/tree.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ After tree is constructed, it can be viewed by printing to console using `show`,
343343
for compact, horizontal, and vertical orientation respectively.
344344
Alternatively, the `print_tree`, `hprint_tree`, or `vprint_tree` method can be used.
345345

346-
```python hl_lines="8 15"
346+
```python hl_lines="8 15 21"
347347
from bigtree import Node, print_tree, hprint_tree, vprint_tree
348348

349349
root = Node("a", alias="alias-a", age=90, gender="F")
@@ -1372,3 +1372,14 @@ flowchart TB
13721372
0("a") --> 0-1("c")
13731373
classDef default stroke-width:1
13741374
```
1375+
1376+
- Pyvis network
1377+
1378+
<div style="background-color: white;">
1379+
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
1380+
{%
1381+
include-markdown "../../../assets/demo/vis.html"
1382+
start="<body>"
1383+
end="</body>"
1384+
%}
1385+
</div>

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ IPython
33
mdx_truly_sane_lists==1.3
44
mkdocs==1.5.3
55
mkdocs-glightbox==0.3.7
6+
mkdocs-include-markdown-plugin
67
mkdocs-jupyter
78
mkdocs-material[imaging]==9.5.17
89
mkdocstrings[python]>=0.25.0 # griffe.collections error

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ plugins:
104104
- mkdocs-jupyter:
105105
ignore_h1_titles: True
106106
- search
107+
- include-markdown
107108
- social:
108109
cards_layout_options:
109110
logo: docs/_static/favicon.svg

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ dependencies = [
113113
"IPython",
114114
"mkdocs==1.5.3",
115115
"mkdocs-glightbox",
116+
"mkdocs-include-markdown-plugin",
116117
"mkdocs-jupyter",
117118
"mkdocs-material[imaging]==9.5.17",
118119
"mdx_truly_sane_lists==1.3",

0 commit comments

Comments
 (0)