2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 11:35:41 +00:00

feat(docs): add stable links for external sites (#9620)

* add stable links for external docs
this is usefull for the CII best practices badge and other sites where we might need stable links; assuming we maintain control of docs.inventree.org seems like a stable bet with current structures

* fix checking logic

* fix link target
This commit is contained in:
Matthias Mair
2025-05-05 22:35:00 +02:00
committed by GitHub
parent 3fe08751d3
commit 6d0a08d1f5
4 changed files with 24 additions and 1 deletions

View File

@ -93,7 +93,8 @@ def check_link(url) -> bool:
while attempts > 0:
response = requests.head(url, timeout=5000)
if response.status_code == 200:
# Ensure GH is not causing issues
if response.status_code in (200, 429):
# Update the cache file
with open(CACHE_FILE, 'a', encoding='utf-8') as f:
f.write(f'{url}\n')