Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mendrugory committed Oct 21, 2021
1 parent cbea6f6 commit 763b9fa
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
import pathlib

extensions = ["myst_parser"]
source_suffix = ['.md']
source_suffix = ['.rst', '.md']
readme_path = pathlib.Path(__file__).parent.resolve().parent / "README.md"
readme_target = pathlib.Path(__file__).parent / "readme.md"

with readme_target.open("w") as outf:
# Change the title to "Readme"
outf.write(
"\n".join(
[
"Readme",
"======",
]
)
)
lines = []
for line in readme_path.read_text().split("\n"):
if line.startswith("# "):
# Skip title, because we now use "Readme"
# Could also simply exclude first line for the same effect
continue
lines.append(line)
outf.write("\n".join(lines))

0 comments on commit 763b9fa

Please sign in to comment.