Skip to content

Commit 3eaf1c5

Browse files
committed
Literate examples
1 parent 7023120 commit 3eaf1c5

File tree

5 files changed

+18
-3
lines changed

5 files changed

+18
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ benchmark/*.json
1212
docs/Manifest.toml
1313
docs/build/
1414
docs/src/index.md
15+
docs/src/examples.md

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensorNetworks"
22
uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7"
33
authors = ["Matthew Fishman <[email protected]>, Joseph Tindall <[email protected]> and contributors"]
4-
version = "0.12.2"
4+
version = "0.12.3"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
34
ITensorNetworks = "2919e153-833c-4bdc-8836-1ea460a35fc7"
45
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
56

67
[compat]
78
Documenter = "1.10.0"
9+
Graphs = "1.12.1"
810
ITensorNetworks = "0.12.0"
911
Literate = "2.20.1"

docs/make.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
using ITensorNetworks: ITensorNetworks
21
using Documenter: Documenter, DocMeta, deploydocs, makedocs
2+
using ITensorNetworks: ITensorNetworks
3+
using Literate: Literate
34

45
DocMeta.setdocmeta!(
56
ITensorNetworks, :DocTestSetup, :(using ITensorNetworks); recursive=true
67
)
78

89
include("make_index.jl")
910

11+
Literate.markdown(
12+
joinpath(@__DIR__, "src", "examples.jl"),
13+
joinpath(@__DIR__, "src");
14+
flavor=Literate.DocumenterFlavor(),
15+
)
16+
1017
makedocs(;
1118
modules=[ITensorNetworks],
1219
authors="ITensor developers <[email protected]> and contributors",
@@ -16,7 +23,7 @@ makedocs(;
1623
edit_link="main",
1724
assets=["assets/favicon.ico", "assets/extras.css"],
1825
),
19-
pages=["Home" => "index.md", "Reference" => "reference.md"],
26+
pages=["Home" => "index.md", "Examples" => "examples.md", "Reference" => "reference.md"],
2027
warnonly=true,
2128
)
2229

docs/src/examples.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# # Examples
2+
3+
using Graphs: path_graph
4+
using ITensorNetworks: ITensorNetwork
5+
tn = ITensorNetwork(path_graph(4); link_space=2)

0 commit comments

Comments
 (0)