Skip to content

Commit aa8107f

Browse files
committed
ignore both dirs
1 parent a4848c7 commit aa8107f

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎docs/app/reflex_docs/pages/docs/__init__.py‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,14 @@ def get_previews_from_frontmatter(filepath: str) -> dict[str, str]:
8989
# ---------------------------------------------------------------------------
9090
# Discover all docs — single pipeline via reflex_docgen
9191
# ---------------------------------------------------------------------------
92-
_package_root = Path(__file__).resolve().parent.parent.parent # …/reflex_docs/
93-
_app_root = _package_root.parent # …/app/
94-
_docs_dir = _app_root.parent # …/docs/
95-
_pkg_dir = _docs_dir / "package" # sibling docs/package/ (reflex-docs-bundle)
92+
_app_root = Path(__file__).resolve().parent.parent.parent.parent # …/app/
93+
_docs_dir = _app_root.parent # …/docs/ (parent of app/)
94+
_pkg_root = _docs_dir / "package" # …/package/ (reflex-docs-bundle)
9695

9796
all_docs: dict[str, str] = {} # virtual_path → actual_path
9897
for _md_file in sorted(_docs_dir.rglob("*.md")):
99-
# Skip anything under app/ or package/ — those are Python packages, not source markdown.
100-
if _md_file.is_relative_to(_app_root) or _md_file.is_relative_to(_pkg_dir):
98+
# Skip anything inside the app/ or package/ subdirectories.
99+
if _md_file.is_relative_to(_app_root) or _md_file.is_relative_to(_pkg_root):
101100
continue
102101
_virtual = "docs/" + str(_md_file.relative_to(_docs_dir)).replace("\\", "/")
103102
all_docs[_virtual] = str(_md_file)

0 commit comments

Comments
 (0)