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:
@ -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')
|
||||
|
Reference in New Issue
Block a user