Skip to content

Commit b52e2e8

Browse files
authored
Apply replace_make_readme patch (#64)
1 parent 44e8dc1 commit b52e2e8

2 files changed

Lines changed: 15 additions & 19 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ITensorNetworksNext"
22
uuid = "302f2e75-49f0-4526-aef7-d8ba550cb06c"
3-
version = "0.3.13"
3+
version = "0.3.14"
44
authors = ["ITensor developers <support@itensor.org> and contributors"]
55

66
[workspace]

docs/make_readme.jl

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
using ITensorNetworksNext: ITensorNetworksNext
21
using Literate: Literate
32

4-
function ccq_logo(content)
5-
include_ccq_logo = """
6-
<picture>
7-
<source media="(prefers-color-scheme: dark)" width="20%" srcset="docs/src/assets/CCQ-dark.png">
8-
<img alt="Flatiron Center for Computational Quantum Physics logo." width="20%" src="docs/src/assets/CCQ.png">
9-
</picture>
10-
"""
11-
content = replace(content, "{CCQ_LOGO}" => include_ccq_logo)
12-
return content
13-
end
3+
let inputfile = joinpath(@__DIR__, "..", "examples", "README.jl"),
4+
outputdir = joinpath(@__DIR__, ".."), flavor = Literate.CommonMarkFlavor(),
5+
name = "README"
146

15-
Literate.markdown(
16-
joinpath(pkgdir(ITensorNetworksNext), "examples", "README.jl"),
17-
joinpath(pkgdir(ITensorNetworksNext));
18-
flavor = Literate.CommonMarkFlavor(),
19-
name = "README",
20-
postprocess = ccq_logo
21-
)
7+
function postprocess(content)
8+
include_ccq_logo = """
9+
<picture>
10+
<source media="(prefers-color-scheme: dark)" width="20%" srcset="docs/src/assets/CCQ-dark.png">
11+
<img alt="Flatiron Center for Computational Quantum Physics logo." width="20%" src="docs/src/assets/CCQ.png">
12+
</picture>
13+
"""
14+
return replace(content, "{CCQ_LOGO}" => include_ccq_logo)
15+
end
16+
Literate.markdown(inputfile, outputdir; flavor, name, postprocess)
17+
end

0 commit comments

Comments
 (0)