Skip to content

Commit c5c2e10

Browse files
committed
docs(reference): fix a broken jinja anchor, reformat middleware call
reactpy-csr.md linked to jinja.md#pyscript_component-tag; the heading declares { #pyscript-component-tag }, so the link resolved to nothing. mkdocs only logs this at INFO, so --strict did not fail on it.
1 parent 40dc0ca commit c5c2e10

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎docs/examples/reference_jinja/component_tag/main.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ async def home(request):
2727
# imports it to satisfy that request. Register exactly the paths the template
2828
# passes to `{% component %}` -- here the `counter` and `badge` functions in
2929
# the sibling `pages.py`.
30-
my_app = ReactPyMiddleware(starlette_app, root_components=["pages.counter", "pages.badge"])
30+
my_app = ReactPyMiddleware(
31+
starlette_app, root_components=["pages.counter", "pages.badge"]
32+
)

‎docs/src/reference/reactpy-csr.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ from reactpy.executors.asgi import ReactPyCsr
2626

2727
- **`*file_paths`**: One or more paths to Python files containing components. Their **source is inlined into the served HTML**. Accepts `#!python str` or `#!python pathlib.Path`.
2828

29-
Read once, then cached for the life of the process: `executors/pyscript/utils.py`, `fetch_cached_python_file` is decorated with `#!python functools.cache`, keyed on the path. Editing the file does not change the page on reload — restart the server. The same cache strips comments and docstrings before inlining (see [Jinja](./jinja.md#pyscript_component-tag)), so what reaches the browser is not quite what you wrote.
29+
Read once, then cached for the life of the process: `executors/pyscript/utils.py`, `fetch_cached_python_file` is decorated with `#!python functools.cache`, keyed on the path. Editing the file does not change the page on reload — restart the server. The same cache strips comments and docstrings before inlining (see [Jinja](./jinja.md#pyscript-component-tag)), so what reaches the browser is not quite what you wrote.
3030

3131
- **`root_name`** *(optional)*: The name of the root component inside your Python file. Defaults to `#!python "root"`. The file may define any number of components; this one is mounted.
3232

0 commit comments

Comments
 (0)