Skip to content

Commit 4df5519

Browse files
authored
Merge pull request #3499 from modelscope/codex/site-official-repo-footer-20260817
docs(site): surface official repositories in footer
2 parents 74ca876 + 7db30d2 commit 4df5519

3 files changed

Lines changed: 35 additions & 1 deletion

File tree

web-pages/product-site/assets/css/site.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,12 @@ td a {
11631163
color: #aeb9c8;
11641164
}
11651165

1166+
.footer-repositories {
1167+
display: flex;
1168+
flex-direction: column;
1169+
gap: 10px;
1170+
}
1171+
11661172
.footer-links {
11671173
display: flex;
11681174
align-items: center;

web-pages/product-site/templates/base.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@
5959
<strong>FunASR</strong>
6060
<p>{{ '面向生产部署的开源语音基础设施。' if language == 'zh' else 'Open speech infrastructure for production deployment.' }}</p>
6161
</div>
62+
<nav class="footer-repositories" data-footer-repositories aria-label="{{ '官方仓库' if language == 'zh' else 'Official repositories' }}">
63+
<strong>{{ '官方仓库' if language == 'zh' else 'Official repositories' }}</strong>
64+
<div class="footer-links">
65+
<a href="/go/fun-asr">Fun-ASR</a>
66+
<a href="/go/sensevoice">SenseVoice</a>
67+
<a href="/go/funclip">FunClip</a>
68+
</div>
69+
</nav>
6270
<div class="footer-links">
6371
<a href="{{ '/deploy/' if language == 'zh' else '/en/deploy/' }}">{{ '部署' if language == 'zh' else 'Deploy' }}</a>
6472
<a href="{{ docs_url }}">{{ '文档' if language == 'zh' else 'Docs' }}</a>

web-pages/product-site/tests/test_build.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
SITE_ROOT = Path(__file__).resolve().parents[1]
1212
sys.path.insert(0, str(SITE_ROOT))
1313

14-
from build import build # noqa: E402
14+
from build import build, route_path # noqa: E402
1515

1616

1717
def read_soup(path: Path) -> BeautifulSoup:
@@ -95,6 +95,26 @@ def test_visible_repository_links_use_fixed_conversion_routes(tmp_path):
9595
assert json_ld['codeRepository'] == 'https://github.com/modelscope/FunASR'
9696

9797

98+
def test_every_product_page_footer_surfaces_official_repositories(tmp_path):
99+
manifest = build(tmp_path)
100+
101+
for page in manifest['pages']:
102+
soup = read_soup(route_path(tmp_path, page['route']))
103+
repositories = soup.select_one('[data-footer-repositories]')
104+
expected_heading = '官方仓库' if page['language'] == 'zh' else 'Official repositories'
105+
106+
assert repositories
107+
assert repositories.strong.get_text(strip=True) == expected_heading
108+
assert {
109+
link.get('href'): link.get_text(strip=True)
110+
for link in repositories.select('a[href]')
111+
} == {
112+
'/go/fun-asr': 'Fun-ASR',
113+
'/go/sensevoice': 'SenseVoice',
114+
'/go/funclip': 'FunClip',
115+
}
116+
117+
98118
def test_home_surfaces_attributed_ecosystem_repositories(tmp_path):
99119
build(tmp_path)
100120

0 commit comments

Comments
 (0)