Revert Docs minify attempt (#17831)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
7c97ed1937
commit
efbcf444a1
4 changed files with 5 additions and 4 deletions
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
|
|
@ -48,7 +48,7 @@ jobs:
|
|||
python-version: "3.x"
|
||||
- uses: astral-sh/setup-uv@v4
|
||||
- name: Install Dependencies
|
||||
run: uv pip install --system ruff black tqdm mkdocs-material "mkdocstrings[python]" mkdocs-jupyter mkdocs-redirects mkdocs-ultralytics-plugin mkdocs-macros-plugin csscompressor jsmin
|
||||
run: uv pip install --system ruff black tqdm mkdocs-material "mkdocstrings[python]" mkdocs-jupyter mkdocs-redirects mkdocs-ultralytics-plugin mkdocs-macros-plugin
|
||||
- name: Ruff fixes
|
||||
continue-on-error: true
|
||||
run: ruff check --fix --unsafe-fixes --select D --ignore=D100,D104,D203,D205,D212,D213,D401,D406,D407,D413 .
|
||||
|
|
|
|||
|
|
@ -262,7 +262,8 @@ def minify_files(html=True, css=True, js=True):
|
|||
continue
|
||||
|
||||
stats[ext] = {"original": 0, "minified": 0}
|
||||
for f in tqdm(SITE.rglob(f"*.{ext}"), desc=f"Minifying {ext.upper()}"):
|
||||
directory = "" # "stylesheets" if ext == css else "javascript" if ext == "js" else ""
|
||||
for f in tqdm((SITE / directory).rglob(f"*.{ext}"), desc=f"Minifying {ext.upper()}"):
|
||||
content = f.read_text(encoding="utf-8")
|
||||
minified = minifier(content)
|
||||
stats[ext]["original"] += len(content)
|
||||
|
|
@ -289,7 +290,7 @@ def main():
|
|||
update_docs_html()
|
||||
|
||||
# Minify files
|
||||
minify_files(html=False)
|
||||
minify_files(html=False, css=False, js=False)
|
||||
|
||||
# Show command to serve built website
|
||||
print('Docs built correctly ✅\nServe site at http://localhost:8000 with "python -m http.server --directory site"')
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB |
|
|
@ -22,7 +22,7 @@ theme:
|
|||
language: en
|
||||
custom_dir: docs/overrides/
|
||||
logo: https://raw.githubusercontent.com/ultralytics/assets/main/logo/Ultralytics_Logotype_Reverse.svg
|
||||
favicon: assets/favicon.ico
|
||||
favicon: https://raw.githubusercontent.com/ultralytics/assets/refs/heads/main/logo/favicon-yolo.png
|
||||
icon:
|
||||
repo: fontawesome/brands/github
|
||||
# font: # disabled for faster page load times
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue