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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 17 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,23 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Red+Hat+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Red+Hat+Text:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css?v=73">
<link rel="stylesheet" href="styles.css?v=74">
</head>
<body>
<!-- legacy-catalog-banner:start -->
<aside class="legacy-catalog-banner" role="alert" aria-label="Legacy catalog notice">
<div class="legacy-catalog-banner-inner">
<p class="legacy-catalog-banner-kicker">Deprecated legacy catalog</p>
<p class="legacy-catalog-banner-title">You are viewing a <strong>frozen snapshot</strong> from the archived <a href="https://github.com/RHEcosystemAppEng/agentic-collections" target="_blank" rel="noopener noreferrer">agentic-collections</a> repository.</p>
<p class="legacy-catalog-banner-body">Active development now lives in two maintained repositories:</p>
<ul class="legacy-catalog-banner-links">
<li><a href="https://github.com/RHEcosystemAppEng/agentic-collections-skills" target="_blank" rel="noopener noreferrer"><strong>agentic-collections-skills</strong> — packs, skills, and Lola modules</a></li>
<li><a href="https://github.com/RHEcosystemAppEng/agentic-collections-catalog" target="_blank" rel="noopener noreferrer"><strong>agentic-collections-catalog</strong> — marketplace catalog and collection metadata</a></li>
</ul>
<p class="legacy-catalog-banner-cta"><a href="https://rhecosystemappeng.github.io/agentic-collections-catalog/" target="_blank" rel="noopener noreferrer">Go to the current Red Hat Agentic Catalog →</a></p>
</div>
</aside>
<!-- legacy-catalog-banner:end -->
<header>
<div class="toolbar">
<div class="toolbar-left">
Expand Down Expand Up @@ -112,7 +126,7 @@ <h2 onclick="toggleSection('community-mcp')">
</main>

<footer>
<p>Generated from the <a href="https://github.com/RHEcosystemAppEng/agentic-collections" target="_blank" rel="noopener noreferrer">agentic-collections</a> repository on GitHub.</p>
<p>Legacy catalog snapshot from the archived <a href="https://github.com/RHEcosystemAppEng/agentic-collections" target="_blank" rel="noopener noreferrer">agentic-collections</a> repository. Use <a href="https://github.com/RHEcosystemAppEng/agentic-collections-skills" target="_blank" rel="noopener noreferrer">agentic-collections-skills</a> for packs and skills, and <a href="https://github.com/RHEcosystemAppEng/agentic-collections-catalog" target="_blank" rel="noopener noreferrer">agentic-collections-catalog</a> for marketplace metadata.</p>
</footer>

<!-- Modal for Pack Details -->
Expand All @@ -125,6 +139,6 @@ <h2 onclick="toggleSection('community-mcp')">
<div class="modal-content" id="mcp-details"></div>
</div>

<script src="app.js?v=73"></script>
<script src="app.js?v=74"></script>
</body>
</html>
88 changes: 88 additions & 0 deletions docs/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,94 @@ body {
flex-direction: column;
}

/* Deprecated legacy catalog banner (archived agentic-collections Pages site) */
.legacy-catalog-banner {
position: sticky;
top: 0;
z-index: 2000;
background: linear-gradient(90deg, #3d0000 0%, #c9190b 45%, #a30000 100%);
color: #fff;
border-bottom: 4px solid #ffcc00;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.legacy-catalog-banner-inner {
max-width: 72rem;
margin: 0 auto;
padding: 1.25rem 1.5rem;
text-align: center;
}

.legacy-catalog-banner-kicker {
font-size: 0.8rem;
font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
color: #ffeb99;
margin-bottom: 0.4rem;
}

.legacy-catalog-banner-title {
font-family: var(--font-heading);
font-size: clamp(1.15rem, 2.8vw, 1.65rem);
font-weight: 700;
line-height: 1.35;
margin-bottom: 0.5rem;
}

.legacy-catalog-banner-title a {
color: #fff;
text-decoration: underline;
text-underline-offset: 0.15em;
}

.legacy-catalog-banner-body {
font-size: 1rem;
margin-bottom: 0.85rem;
color: rgba(255, 255, 255, 0.95);
}

.legacy-catalog-banner-links {
list-style: none;
margin: 0 0 1rem;
padding: 0;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.75rem 1.25rem;
}

.legacy-catalog-banner-links a {
color: #fff;
text-decoration: underline;
text-underline-offset: 0.15em;
}

.legacy-catalog-banner-links a:hover {
color: #ffeb99;
}

.legacy-catalog-banner-cta {
margin: 0;
}

.legacy-catalog-banner-cta a {
display: inline-block;
background: #fff;
color: #a30000;
font-weight: 700;
padding: 0.65rem 1.35rem;
border-radius: var(--radius);
text-decoration: none;
font-size: 1.05rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.legacy-catalog-banner-cta a:hover {
background: #ffeb99;
color: #3d0000;
}

/* Standalone collection pages (no catalog header): Red Hat top bar */
.site-brand-accent {
height: 3px;
Expand Down
14 changes: 11 additions & 3 deletions scripts/build_website.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# Import our data generators
from catalog_site_bundle import bundle_catalog_for_site
from eval_site_enrichment import apply_eval_enrichment
from catalog_legacy_banner import sync_index_banner
from generate_collection_pages import generate_collection_pages
from generate_pack_data import generate_pack_data
from generate_mcp_data import generate_mcp_data
Expand Down Expand Up @@ -55,6 +56,8 @@ def build_website():
pack_data = generate_pack_data()

root = Path(__file__).resolve().parent.parent
docs_dir = Path('docs')
docs_dir.mkdir(exist_ok=True)

# Merge pack icons and optional resolved collection catalog (for Pages UI)
for pack in pack_data:
Expand Down Expand Up @@ -91,6 +94,13 @@ def build_website():
print(f"✅ Generated {page_count} pages in docs/collections/")
print()

print("⚠️ Syncing legacy catalog deprecation banner...")
if sync_index_banner(docs_dir / "index.html"):
print("✅ Updated docs/index.html with legacy catalog banner")
else:
print("ℹ️ docs/index.html banner already current or marker missing")
print()

# Combine into final output
output = {
'repository': {
Expand All @@ -104,9 +114,7 @@ def build_website():
'generated_at': datetime.now(timezone.utc).isoformat()
}

# Ensure docs directory exists
docs_dir = Path('docs')
docs_dir.mkdir(exist_ok=True)
# Ensure docs directory exists (mkdir at start of build_website)

# Write data.json
output_file = docs_dir / 'data.json'
Expand Down
68 changes: 68 additions & 0 deletions scripts/catalog_legacy_banner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/env python3
"""Shared HTML for the deprecated legacy catalog site banner."""

from __future__ import annotations

import html
import re
from pathlib import Path

ARCHIVED_REPO_URL = "https://github.com/RHEcosystemAppEng/agentic-collections"
CURRENT_CATALOG_SITE_URL = "https://rhecosystemappeng.github.io/agentic-collections-catalog/"
CURRENT_CATALOG_REPO_URL = "https://github.com/RHEcosystemAppEng/agentic-collections-catalog"
CURRENT_SKILLS_REPO_URL = "https://github.com/RHEcosystemAppEng/agentic-collections-skills"

BANNER_MARKER_START = "<!-- legacy-catalog-banner:start -->"
BANNER_MARKER_END = "<!-- legacy-catalog-banner:end -->"


def render_legacy_catalog_banner() -> str:
"""Return a prominent deprecation banner for archived catalog Pages."""
archived = html.escape(ARCHIVED_REPO_URL, quote=True)
catalog_site = html.escape(CURRENT_CATALOG_SITE_URL, quote=True)
catalog_repo = html.escape(CURRENT_CATALOG_REPO_URL, quote=True)
skills = html.escape(CURRENT_SKILLS_REPO_URL, quote=True)

return f"""<aside class="legacy-catalog-banner" role="alert" aria-label="Legacy catalog notice">
<div class="legacy-catalog-banner-inner">
<p class="legacy-catalog-banner-kicker">Deprecated legacy catalog</p>
<p class="legacy-catalog-banner-title">You are viewing a <strong>frozen snapshot</strong> from the archived <a href="{archived}" target="_blank" rel="noopener noreferrer">agentic-collections</a> repository.</p>
<p class="legacy-catalog-banner-body">Active development now lives in two maintained repositories:</p>
<ul class="legacy-catalog-banner-links">
<li><a href="{skills}" target="_blank" rel="noopener noreferrer"><strong>agentic-collections-skills</strong> — packs, skills, and Lola modules</a></li>
<li><a href="{catalog_repo}" target="_blank" rel="noopener noreferrer"><strong>agentic-collections-catalog</strong> — marketplace catalog and collection metadata</a></li>
</ul>
<p class="legacy-catalog-banner-cta"><a href="{catalog_site}" target="_blank" rel="noopener noreferrer">Go to the current Red Hat Agentic Catalog →</a></p>
</div>
</aside>"""


def wrap_banner_markers(fragment: str) -> str:
return f"{BANNER_MARKER_START}\n{fragment}\n{BANNER_MARKER_END}"


def sync_index_banner(index_path: Path) -> bool:
"""Insert or refresh the legacy banner block in docs/index.html."""
if not index_path.is_file():
return False

content = index_path.read_text(encoding="utf-8")
wrapped = wrap_banner_markers(render_legacy_catalog_banner())
pattern = re.compile(
re.escape(BANNER_MARKER_START) + r".*?" + re.escape(BANNER_MARKER_END),
re.DOTALL,
)

if pattern.search(content):
updated = pattern.sub(wrapped, content, count=1)
elif "legacy-catalog-banner" in content:
return False
elif "<body>" in content:
updated = content.replace("<body>", f"<body>\n {wrapped}", 1)
else:
return False

if updated != content:
index_path.write_text(updated, encoding="utf-8")
return True
return False
10 changes: 8 additions & 2 deletions scripts/generate_collection_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

import markdown

from catalog_legacy_banner import render_legacy_catalog_banner

REPO_ROOT = Path(__file__).resolve().parent.parent
STYLES_VERSION = "74"


def md_to_html(text: Any) -> str:
Expand Down Expand Up @@ -638,6 +641,8 @@ def render_collection_page(pack: Dict[str, Any], mcp_data: List[Dict[str, Any]])
license_nav_href = "https://github.com/RHEcosystemAppEng/agentic-collections/blob/main/LICENSE"
license_nav_href_esc = html.escape(license_nav_href, quote=True)

legacy_banner = render_legacy_catalog_banner()

return f"""<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -647,9 +652,10 @@ def render_collection_page(pack: Dict[str, Any], mcp_data: List[Dict[str, Any]])
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Red+Hat+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Red+Hat+Text:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../styles.css?v=73">
<link rel="stylesheet" href="../styles.css?v={STYLES_VERSION}">
</head>
<body>
{legacy_banner}
<div class="site-brand-accent" aria-hidden="true"></div>
<main>
<section class="collection-page">
Expand Down Expand Up @@ -694,7 +700,7 @@ def render_collection_page(pack: Dict[str, Any], mcp_data: List[Dict[str, Any]])
<div class="modal-content" id="mcp-details"></div>
</div>

<script src="../app.js?v=73"></script>
<script src="../app.js?v={STYLES_VERSION}"></script>
</body>
</html>
"""
Expand Down
Loading