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
13 changes: 13 additions & 0 deletions docs/operations/funasr-com-site-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ kill -HUP <master-pid>

## Monitoring

Visible repository, documentation, and release links use the fixed `/go/github`,
`/go/docs`, and `/go/releases` routes. The JSON-LD `codeRepository` value remains
the direct GitHub URL so attribution does not change search metadata. Redirect
targets are defined only in `web-pages/nginx/conversion-map.conf`; never accept a
target from a query parameter.

Check after one hour and again after 24 hours:

```bash
Expand All @@ -85,4 +91,11 @@ curl -fsSI https://www.funasr.com/deploy/vllm.html
curl -fsSI https://www.funasr.com/blog/
```

Count non-smoke conversion requests by route:

```bash
grep -vE '"(FunASR release smoke|curl/)' /var/log/nginx/funasr-conversions.log \
| awk '{print $7}' | sort | uniq -c | sort -nr
```

Roll back on elevated 5xx responses, missing indexed routes, mobile overflow, missing assets, invalid conversion redirects, or a failed static validation.
6 changes: 5 additions & 1 deletion web-pages/product-site/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

SITE_ROOT = Path(__file__).resolve().parent
BASE_URL = 'https://www.funasr.com'
GITHUB_REPOSITORY_URL = 'https://github.com/modelscope/FunASR'


def sha256(path: Path) -> str:
Expand Down Expand Up @@ -129,7 +130,10 @@ def _page_context(
'description': description,
'navigation': _navigation(navigation, language),
'assets': assets,
'github_url': 'https://github.com/modelscope/FunASR',
'github_repository_url': GITHUB_REPOSITORY_URL,
'github_url': '/go/github',
'docs_url': '/go/docs',
'releases_url': '/go/releases',
}


Expand Down
5 changes: 3 additions & 2 deletions web-pages/product-site/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'applicationCategory': 'DeveloperApplication',
'operatingSystem': 'Linux, macOS, Windows',
'url': canonical,
'codeRepository': github_url,
'codeRepository': github_repository_url,
'license': 'https://www.apache.org/licenses/LICENSE-2.0'
} | tojson }}</script>
</head>
Expand Down Expand Up @@ -60,7 +60,8 @@
</div>
<div class="footer-links">
<a href="{{ '/deploy/' if language == 'zh' else '/en/deploy/' }}">{{ '部署' if language == 'zh' else 'Deploy' }}</a>
<a href="https://github.com/modelscope/FunASR/tree/main/docs">{{ '文档' if language == 'zh' else 'Docs' }}</a>
<a href="{{ docs_url }}">{{ '文档' if language == 'zh' else 'Docs' }}</a>
<a href="{{ releases_url }}">{{ '发布' if language == 'zh' else 'Releases' }}</a>
<a href="{{ '/donors.html' if language == 'zh' else '/en/donors.html' }}">{{ '功德榜' if language == 'zh' else 'Donors' }}</a>
</div>
</footer>
Expand Down
20 changes: 20 additions & 0 deletions web-pages/product-site/tests/test_build.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import json
import re
import sys
from pathlib import Path
Expand Down Expand Up @@ -75,6 +76,25 @@ def test_language_metadata_is_symmetric(tmp_path):
assert en.select_one('link[hreflang="zh-CN"]')['href'] == 'https://www.funasr.com/'


def test_visible_repository_links_use_fixed_conversion_routes(tmp_path):
build(tmp_path)

for relative in ('index.html', 'en/index.html'):
soup = read_soup(tmp_path / relative)
github_links = soup.select('a[aria-label="GitHub"], .final-cta a')
github_hrefs = {
link.get('href')
for link in github_links
if link.get_text(strip=True) == 'GitHub' or link.get('aria-label') == 'GitHub'
}
json_ld = json.loads(soup.select_one('script[type="application/ld+json"]').string)

assert github_hrefs == {'/go/github'}
assert soup.select_one('.site-footer a[href="/go/docs"]')
assert soup.select_one('.site-footer a[href="/go/releases"]')
assert json_ld['codeRepository'] == 'https://github.com/modelscope/FunASR'


def test_build_manifest_records_asset_hashes(tmp_path):
manifest = build(tmp_path)

Expand Down
Loading