Skip to content

Commit 0f89cc9

Browse files
committed
DRAFT: automatically generate README
1 parent 8b0e8be commit 0f89cc9

File tree

4 files changed

+37
-150
lines changed

4 files changed

+37
-150
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ docs/examples/%: examples/%/_site
3232

3333
docs-build-examples: docs/examples/single-page docs/examples/pkgdown docs/examples/auto-package
3434

35+
docs-build-readme:
36+
BUILDING_README=1 cd docs \
37+
&& quarto render get-started/overview.qmd \
38+
--to gfm \
39+
--output README.md
40+
3541
docs-build: docs-build-examples
3642
cd docs && quarto add --no-prompt ..
3743
cd docs && quartodoc build

README.md

Lines changed: 0 additions & 143 deletions
This file was deleted.

docs/README.qmd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
replace_base_domain: "https://machow.github.io/quartodoc"
3+
replace_rel_path: "/get-started"
4+
filters:
5+
- _filters/replace-readme-links.lua
6+
format: gfm
7+
---
8+
9+
{{< include get-started/overview.qmd >}}

docs/get-started/overview.qmd

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,25 @@ or read on for instructions on installation and use.
1919

2020
<br>
2121

22-
22+
```{python}
23+
#| echo: false
24+
#| output: asis
25+
import os
26+
27+
if "BUILDING_README" in os.environ:
28+
print("""
29+
[![](https://cdn.loom.com/sessions/thumbnails/fb4eb736848e470b8409ba46b514e2ed-00001.gif)](https://www.loom.com/share/fb4eb736848e470b8409ba46b514e2ed)
30+
""")
31+
else:
32+
print("""
2333
<div style="position: relative; padding-bottom: 64.5933014354067%; height: 0;"><iframe src="https://www.loom.com/embed/fb4eb736848e470b8409ba46b514e2ed?sid=31db7652-43c6-4474-bab3-19dea2170775" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>
34+
""")
35+
36+
```
37+
38+
39+
2440

25-
<br>
2641
<br>
2742

2843
## Installation
@@ -131,9 +146,9 @@ The functions listed in `contents` are assumed to be imported from the package.
131146

132147
## Learning more
133148

134-
Go [to the next page](./get-started/basic-docs.qmd) to learn how to configure quartodoc sites, or check out these handy pages:
149+
Go [to the next page](basic-docs.qmd) to learn how to configure quartodoc sites, or check out these handy pages:
135150

136-
* [Examples page](./examples/index.qmd): sites using quartodoc.
137-
* [Tutorials page](./tutorials/index.qmd): screencasts of building a quartodoc site.
138-
* [Docstring issues and examples](./get-started/docstring-examples.qmd): common issues when formatting docstrings.
139-
* [Programming, the big picture](./get-started/dev-big-picture.qmd): the nitty gritty of how quartodoc works, and how to extend it.
151+
* [Examples page](/examples/index.qmd): sites using quartodoc.
152+
* [Tutorials page](/tutorials/index.qmd): screencasts of building a quartodoc site.
153+
* [Docstring issues and examples](docstring-examples.qmd): common issues when formatting docstrings.
154+
* [Programming, the big picture](dev-big-picture.qmd): the nitty gritty of how quartodoc works, and how to extend it.

0 commit comments

Comments
 (0)