Skip to content

Commit 752975a

Browse files
authored
Apply replace_make_readme patch (#27)
1 parent 8671224 commit 752975a

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 = "BackendSelection"
22
uuid = "680c2d7c-f67a-4cc9-ae9c-da132b1447a5"
3-
version = "0.1.13"
3+
version = "0.1.14"
44
authors = ["ITensor developers <support@itensor.org> and contributors"]
55

66
[compat]

docs/make_readme.jl

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
using BackendSelection: BackendSelection
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(BackendSelection), "examples", "README.jl"),
17-
joinpath(pkgdir(BackendSelection));
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)