Skip to content

Commit 2683e0b

Browse files
committed
Update docs
1 parent 62ff66c commit 2683e0b

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

devstats/publish.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
"-o", "--outdir", default="source", help="Output directory", show_default=True
1515
)
1616
def template(project, outdir):
17-
"""Generate myst report template for `repo_owner`/`repo_name`"""
17+
"""Generate myst report templates
18+
19+
These templates are copied from `devstats`, and still need to be compiled
20+
to substitute variables.
21+
"""
1822
os.makedirs(outdir, exist_ok=True)
1923
os.makedirs(os.path.join(outdir, project), exist_ok=True)
2024

@@ -46,7 +50,19 @@ def _include_file(basedir, x):
4650
"-o", "--outdir", default="build", help="Output directory", show_default=True
4751
)
4852
def publish(project, templatedir, outdir):
49-
"""Compile templates into markdown files ready for sphinx / myst"""
53+
"""Compile templates (substitute variables) into markdown files ready for sphinx / myst
54+
55+
Include sections like the following are executed:
56+
57+
```
58+
{include} filename.md
59+
```
60+
61+
Thereafter, the following variables are substituted:
62+
63+
- `{{ project }}`: Name of the project
64+
65+
"""
5066
os.makedirs(outdir, exist_ok=True)
5167
os.makedirs(os.path.join(outdir, project), exist_ok=True)
5268

0 commit comments

Comments
 (0)