Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/app/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ requires-python = ">=3.11"
dependencies = [
"numpy",
"pillow",
"reflex @ git+https://github.com/reflex-dev/reflex@carlos/reusable-docs-components",
"reflex-components-internal @ git+https://github.com/reflex-dev/reflex@carlos/reusable-docs-components#subdirectory=packages/reflex-components-internal",
"reflex-docgen @ git+https://github.com/reflex-dev/reflex@carlos/reusable-docs-components#subdirectory=packages/reflex-docgen",
"reflex @ git+https://github.com/reflex-dev/reflex@carlos/doc-page-action-followup",
"reflex-components-internal @ git+https://github.com/reflex-dev/reflex@carlos/doc-page-action-followup#subdirectory=packages/reflex-components-internal",
"reflex-docgen @ git+https://github.com/reflex-dev/reflex@carlos/doc-page-action-followup#subdirectory=packages/reflex-docgen",
"reflex-xy",
"reflex-site-shared @ git+https://github.com/reflex-dev/reflex@carlos/reusable-docs-components#subdirectory=packages/reflex-site-shared",
"reflex-site-shared @ git+https://github.com/reflex-dev/reflex@carlos/doc-page-action-followup#subdirectory=packages/reflex-site-shared",
"xy",
]

Expand Down
2 changes: 2 additions & 0 deletions docs/app/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import reflex_xy
from reflex_site_shared.plugins import DocsMarkdownPlugin, SharedSiteStylesPlugin
from xy_docs.config import DOCS_CONFIG
from xy_docs.plugins import XYDocsAgentFilesPlugin

config = rx.Config(
app_name="xy_docs",
Expand All @@ -22,6 +23,7 @@
rx.plugins.RadixThemesPlugin(),
rx.plugins.SitemapPlugin(trailing_slash="always"),
DocsMarkdownPlugin(docs=DOCS_CONFIG),
XYDocsAgentFilesPlugin(docs=DOCS_CONFIG),
reflex_xy.XYPlugin(),
],
)
90 changes: 45 additions & 45 deletions docs/app/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion docs/app/xy_docs/breadcrumb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import reflex as rx
import reflex_components_internal as ui
from reflex_site_shared.docs.models import DocsPage
from reflex_site_shared.docs import DocsPage, docs_page_actions
from reflex_site_shared.views.sidebar import docs_sidebar_drawer

from xy_docs.constants import LLMS_TXT_PATH, PUBLIC_DOCS_URL


def _breadcrumb_label(segment: str) -> str:
"""Convert one URL segment to its visible breadcrumb label.
Expand All @@ -18,6 +20,14 @@ def _breadcrumb_label(segment: str) -> str:
return segment.replace("-", " ").title()


def _markdown_asset_path(page: DocsPage) -> str:
"""Return the canonical Markdown asset path for a discovered page."""
route = page.route.strip("/")
if page.relative_path.stem.lower() == "index":
return f"{route}/index.md" if route else "index.md"
return f"{route}.md"


def xy_docs_breadcrumb(page: DocsPage, sidebar: rx.Component) -> rx.Component:
"""Render official-style XY breadcrumbs and the mobile sidebar drawer.

Expand Down Expand Up @@ -82,6 +92,12 @@ def xy_docs_breadcrumb(page: DocsPage, sidebar: rx.Component) -> rx.Component:
class_name="flex flex-row items-center gap-[5px] overflow-hidden lg:gap-4",
),
rx.box(
docs_page_actions(
markdown_url=f"{PUBLIC_DOCS_URL}/{_markdown_asset_path(page)}",
llms_full_txt_url=LLMS_TXT_PATH,
llms_label="llms.txt",
copy_url=f"/docs/xy/{_markdown_asset_path(page)}",
),
ui.icon(
"ArrowDown01Icon",
size=14,
Expand Down
4 changes: 3 additions & 1 deletion docs/app/xy_docs/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Public XY documentation constants."""

PUBLIC_DOCS_URL = "https://reflex.dev/docs/xy"
LLMS_TXT_PATH = "/llms.txt"
LLMS_FULL_TXT_PATH = "/llms-full.txt"

__all__ = ["PUBLIC_DOCS_URL"]
__all__ = ["LLMS_FULL_TXT_PATH", "LLMS_TXT_PATH", "PUBLIC_DOCS_URL"]
Loading
Loading