Skip to content

Commit ad9e5b9

Browse files
authored
docs: redirect uvicorn.org to uvicorn.dev (#2705)
1 parent 0e3b18c commit ad9e5b9

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

docs/overrides/main.html

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{% extends "base.html" %}
22

3-
{% block announce %}
4-
<style>
5-
div[data-md-component="announce"] {
6-
background-color: #f0f8ff; /* Light blue */
7-
color: #333;
3+
{% block extrahead %}
4+
{{ super() }}
5+
<script>
6+
// Redirect starlette.io to starlette.dev
7+
if (window.location.hostname === 'www.uvicorn.org' || window.location.hostname === 'uvicorn.org') {
8+
const newUrl = window.location.href.replace(/^https?:\/\/(www\.)?uvicorn\.org/, 'https://uvicorn.dev');
9+
window.location.replace(newUrl);
810
}
9-
div[data-md-component="announce"] a {
10-
color: #0366d6;
11-
}
12-
</style>
13-
If you're using uvicorn in production, please consider <a href="/sponsorship">sponsoring the project</a> to help with maintenance and development. ✨
11+
</script>
1412
{% endblock %}

0 commit comments

Comments
 (0)