Skip to content
Merged
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
10 changes: 7 additions & 3 deletions pipeline/core/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __init__(self, src_dir: Path, build_dir: Path) -> None:
".yaml",
".css",
".js",
".html",
}

# Mapping of language codes to full names for URLs
Expand Down Expand Up @@ -156,8 +157,8 @@ def rewrite_link(match: re.Match) -> str:
url = match.group(2) # The URL
post = match.group(3) # Everything after the URL

# Only rewrite absolute /oss/ paths that don't contain 'images'
if url.startswith("/oss/") and "images" not in url:
# Only rewrite absolute /oss/ paths that don't contain 'images' or 'plugins'
if url.startswith("/oss/") and "images" not in url and "plugins" not in url:
parts = url.split("/")
# Insert full language name after "oss"
parts.insert(2, self.language_url_names[target_language])
Expand Down Expand Up @@ -743,8 +744,11 @@ def is_shared_file(self, file_path: Path) -> bool:
if "snippets" in relative_path.parts:
return True

if "plugins" in relative_path.parts:
return True

# JavaScript and CSS files should be shared (used for custom scripts/styles)
return file_path.suffix.lower() in {".js", ".css"}
return file_path.suffix.lower() in {".js", ".css", ".html", ".json"}

def _copy_shared_files(self) -> None:
"""Copy files that should be shared between versions."""
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ asyncio_default_fixture_loop_scope = "function"
line-length = 88
extend-exclude = [
"scripts/update_mdx.py",
"pipeline/tools/notebook/convert.py"
"pipeline/tools/notebook/convert.py",
"src/plugins/middleware_visualization/generate_middleware_diagrams.py"
]


Expand Down Expand Up @@ -133,3 +134,9 @@ ignore = [

[tool.ruff.lint.pydocstyle]
convention = "google"


[tool.mypy]
exclude = [
"src/plugins/middleware_visualization/generate_middleware_diagrams.py",
]
1 change: 0 additions & 1 deletion src/oss/images/0000.svg

This file was deleted.

Loading