Skip to content

Commit 5a9c708

Browse files
committed
Improve placeholder to explain template strategy
The OUTPUT placeholder now explains why we don't commit generated content: to keep docs copyable and avoid recursion issues.
1 parent 3bec330 commit 5a9c708

File tree

8 files changed

+23
-18
lines changed

8 files changed

+23
-18
lines changed

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ icon: lucide/git-pull-request
99
<!-- print(readme_section("contributing")) -->
1010
<!-- CODE:END -->
1111
<!-- OUTPUT:START -->
12-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
12+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
1313
<!-- OUTPUT:END -->
1414

1515
## Development Setup

docs/docs_gen.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727

2828
# Placeholder comment for OUTPUT sections in docs templates
2929
# This must be present in committed docs files (not in README.md)
30-
OUTPUT_PLACEHOLDER = "<!-- ⚠️ This content is auto-generated. Do not edit. -->"
30+
# Explains our template strategy: output is generated at build time, not committed
31+
OUTPUT_PLACEHOLDER = (
32+
"<!-- ⚠️ This output is generated during CI build. "
33+
"We intentionally don't commit generated content to keep docs copyable "
34+
"and avoid recursion issues. See docs/docs_gen.py for details. -->"
35+
)
3136

3237

3338
def readme_section(section_name: str, *, strip_heading: bool = True) -> str:

docs/examples.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Real-world examples demonstrating the power and flexibility of `markdown-code-ru
1111
<!-- print(readme_section("examples")) -->
1212
<!-- CODE:END -->
1313
<!-- OUTPUT:START -->
14-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
14+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
1515
<!-- OUTPUT:END -->
1616
```
1717
@@ -23,7 +23,7 @@ This is an example of a simple code block:
2323
<!-- print('Hello, world!') -->
2424
<!-- CODE:END -->
2525
<!-- OUTPUT:START -->
26-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
26+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
2727
<!-- OUTPUT:END -->
2828
```
2929

@@ -38,7 +38,7 @@ First code block:
3838
<!-- print('Hello, world!') -->
3939
<!-- CODE:END -->
4040
<!-- OUTPUT:START -->
41-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
41+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
4242
<!-- OUTPUT:END -->
4343
```
4444

@@ -50,7 +50,7 @@ Second code block:
5050
<!-- print('Hello again!') -->
5151
<!-- CODE:END -->
5252
<!-- OUTPUT:START -->
53-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
53+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
5454
<!-- OUTPUT:END -->
5555
```
5656

@@ -65,7 +65,7 @@ First code block:
6565
<!-- print('Hello, world!') -->
6666
<!-- CODE:END -->
6767
<!-- OUTPUT:START -->
68-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
68+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
6969
<!-- OUTPUT:END -->
7070

7171
Second code block:
@@ -74,7 +74,7 @@ Second code block:
7474
<!-- print('Hello again!') -->
7575
<!-- CODE:END -->
7676
<!-- OUTPUT:START -->
77-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
77+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
7878
<!-- OUTPUT:END -->
7979
```
8080

@@ -92,7 +92,7 @@ Second code block:
9292
<!-- print(content) -->
9393
<!-- CODE:END -->
9494
<!-- OUTPUT:START -->
95-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
95+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
9696
<!-- OUTPUT:END -->
9797
```
9898
Which is rendered as:

docs/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This guide will help you install and start using `markdown-code-runner` in minut
1313
<!-- print(readme_section("installation")) -->
1414
<!-- CODE:END -->
1515
<!-- OUTPUT:START -->
16-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
16+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
1717
<!-- OUTPUT:END -->
1818

1919
You can also install with `uv`:
@@ -35,7 +35,7 @@ uv tool install markdown-code-runner
3535
<!-- print(readme_section("quick-start")) -->
3636
<!-- CODE:END -->
3737
<!-- OUTPUT:START -->
38-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
38+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
3939
<!-- OUTPUT:END -->
4040

4141
## Next Steps

docs/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ icon: lucide/play
1515
<!-- print(readme_section("intro")) -->
1616
<!-- CODE:END -->
1717
<!-- OUTPUT:START -->
18-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
18+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
1919
<!-- OUTPUT:END -->
2020

2121
<div style="text-align: center; margin: 2rem 0;">
@@ -34,7 +34,7 @@ icon: lucide/play
3434
<!-- print(readme_section("features")) -->
3535
<!-- CODE:END -->
3636
<!-- OUTPUT:START -->
37-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
37+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
3838
<!-- OUTPUT:END -->
3939

4040
## Why Use Markdown Code Runner?
@@ -44,7 +44,7 @@ icon: lucide/play
4444
<!-- print(readme_section("problem-statement")) -->
4545
<!-- CODE:END -->
4646
<!-- OUTPUT:START -->
47-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
47+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
4848
<!-- OUTPUT:END -->
4949

5050
## Quick Example
@@ -93,5 +93,5 @@ Hello, world!
9393
<!-- print(readme_section("license")) -->
9494
<!-- CODE:END -->
9595
<!-- OUTPUT:START -->
96-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
96+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
9797
<!-- OUTPUT:END -->

docs/usage/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This will process the file in-place, executing all code blocks and updating the
2424
<!-- print("```") -->
2525
<!-- CODE:END -->
2626
<!-- OUTPUT:START -->
27-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
27+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
2828
<!-- OUTPUT:END -->
2929

3030
## Options

docs/usage/github-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Automate your Markdown updates with CI/CD workflows.
1313
<!-- print(readme_section("github-actions")) -->
1414
<!-- CODE:END -->
1515
<!-- OUTPUT:START -->
16-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
16+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
1717
<!-- OUTPUT:END -->
1818

1919
## Workflow Breakdown

docs/usage/python-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ icon: lucide/code
99
<!-- print(readme_section("python-api")) -->
1010
<!-- CODE:END -->
1111
<!-- OUTPUT:START -->
12-
<!-- ⚠️ This content is auto-generated. Do not edit. -->
12+
<!-- ⚠️ This output is generated during CI build. We intentionally don't commit generated content to keep docs copyable and avoid recursion issues. See docs/docs_gen.py for details. -->
1313
<!-- OUTPUT:END -->
1414

1515
## Function Reference

0 commit comments

Comments
 (0)