docs(site): surface official repositories in footer

Signed-off-by: LauraGPT <[email protected]>
This commit is contained in:
LauraGPT
2026-08-16 20:51:49 +00:00
parent 74ca876864
commit 7db30d2e95
3 changed files with 35 additions and 1 deletions
@@ -1163,6 +1163,12 @@ td a {
color: #aeb9c8;
}
.footer-repositories {
display: flex;
flex-direction: column;
gap: 10px;
}
.footer-links {
display: flex;
align-items: center;
@@ -59,6 +59,14 @@
<strong>FunASR</strong>
<p>{{ '面向生产部署的开源语音基础设施。' if language == 'zh' else 'Open speech infrastructure for production deployment.' }}</p>
</div>
<nav class="footer-repositories" data-footer-repositories aria-label="{{ '官方仓库' if language == 'zh' else 'Official repositories' }}">
<strong>{{ '官方仓库' if language == 'zh' else 'Official repositories' }}</strong>
<div class="footer-links">
<a href="/go/fun-asr">Fun-ASR</a>
<a href="/go/sensevoice">SenseVoice</a>
<a href="/go/funclip">FunClip</a>
</div>
</nav>
<div class="footer-links">
<a href="{{ '/deploy/' if language == 'zh' else '/en/deploy/' }}">{{ '部署' if language == 'zh' else 'Deploy' }}</a>
<a href="{{ docs_url }}">{{ '文档' if language == 'zh' else 'Docs' }}</a>
+21 -1
View File
@@ -11,7 +11,7 @@ from bs4 import BeautifulSoup
SITE_ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(SITE_ROOT))
from build import build # noqa: E402
from build import build, route_path # noqa: E402
def read_soup(path: Path) -> BeautifulSoup:
@@ -95,6 +95,26 @@ def test_visible_repository_links_use_fixed_conversion_routes(tmp_path):
assert json_ld['codeRepository'] == 'https://github.com/modelscope/FunASR'
def test_every_product_page_footer_surfaces_official_repositories(tmp_path):
manifest = build(tmp_path)
for page in manifest['pages']:
soup = read_soup(route_path(tmp_path, page['route']))
repositories = soup.select_one('[data-footer-repositories]')
expected_heading = '官方仓库' if page['language'] == 'zh' else 'Official repositories'
assert repositories
assert repositories.strong.get_text(strip=True) == expected_heading
assert {
link.get('href'): link.get_text(strip=True)
for link in repositories.select('a[href]')
} == {
'/go/fun-asr': 'Fun-ASR',
'/go/sensevoice': 'SenseVoice',
'/go/funclip': 'FunClip',
}
def test_home_surfaces_attributed_ecosystem_repositories(tmp_path):
build(tmp_path)