Skip to content

Commit 6b973b2

Browse files
Point docs to Astral favicon (#13219)
## Summary Same as astral-sh/uv#6951. Unfortunately we have to use a single favicon for the docs.
1 parent c0e2c13 commit 6b973b2

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

.github/workflows/publish-docs.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
- name: "Set docs version"
3535
run: |
3636
version="${{ (inputs.plan != '' && fromJson(inputs.plan).announcement_tag) || inputs.ref }}"
37-
# if version is missing, exit with error
38-
if [[ -z "$version" ]]; then
39-
echo "Can't build docs without a version."
40-
exit 1
37+
# if version is missing, use 'latest'
38+
if [ -z "$version" ]; then
39+
echo "Using 'latest' as version"
40+
version="latest"
4141
fi
4242
4343
# Use version as display name for now
@@ -145,6 +145,7 @@ jobs:
145145
GITHUB_TOKEN: ${{ secrets.ASTRAL_DOCS_PAT }}
146146
run: |
147147
branch_name="${{ env.branch_name }}"
148+
148149
# auto-merge the PR if the build was triggered by a release. Manual builds should be reviewed by a human.
149150
# give the PR a few seconds to be created before trying to auto-merge it
150151
sleep 10

docs/.overrides/main.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% extends "base.html" %}
2+
3+
{% block extrahead %}
4+
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png"/>
5+
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png"/>
6+
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png"/>
7+
<link rel="manifest" href="/static/site.webmanifest"/>
8+
<link rel="mask-icon" href="/static/safari-pinned-tab.svg" color="#2e183d"/>
9+
<meta name="msapplication-TileColor" content="#d7ff64"/>
10+
<meta name="theme-color" content="#ffffff"/>
11+
<meta name="robots" content="index,follow"/>
12+
<script type="application/ld+json">
13+
{
14+
"@context": "https://schema.org",
15+
"@type": "WebSite",
16+
"name": "Astral",
17+
"url": "https://astral.sh"
18+
}
19+
</script>
20+
{% endblock %}

docs/assets/favicon.ico

7.23 KB
Binary file not shown.

mkdocs.template.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ site_name: Ruff
22
theme:
33
name: material
44
logo: assets/bolt.svg
5-
favicon: assets/ruff-favicon.png
5+
favicon: assets/favicon.ico
66
features:
77
- navigation.instant
88
- navigation.instant.prefetch

0 commit comments

Comments
 (0)