Skip to content

Commit c3d3b32

Browse files
authored
Apply replace_make_readme patch (#175)
1 parent fe5c8cc commit c3d3b32

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "NamedDimsArrays"
22
uuid = "60cbd0c0-df58-4cb7-918c-6f5607b73fde"
3-
version = "0.14.7"
3+
version = "0.14.8"
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 @@
11
using Literate: Literate
2-
using NamedDimsArrays: NamedDimsArrays
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(NamedDimsArrays), "examples", "README.jl"),
17-
joinpath(pkgdir(NamedDimsArrays));
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)