Skip to content

Commit 217211d

Browse files
authored
[Misc][Doc] Add the latest stable release url (vllm-project#826)
### What this PR does / why we need it? Add the latest stable release url Signed-off-by: hfadzxy <starmoon_zhang@163.com>
1 parent c6ac399 commit 217211d

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<!--
2+
**********************************************************************
3+
* Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
4+
* Copyright 2023 The vLLM team.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
* This file is a part of the vllm-ascend project.
18+
* Adapted from https://github.com/vllm-project/vllm/blob/main/docs/source/_templates/sections/header.html
19+
**********************************************************************
20+
-->
21+
<style>
22+
.notification-bar {
23+
width: 100vw;
24+
display: flex;
25+
justify-content: center;
26+
align-items: center;
27+
font-size: 16px;
28+
}
29+
.notification-bar p {
30+
margin: 0;
31+
}
32+
.notification-bar a {
33+
font-weight: bold;
34+
text-decoration: none;
35+
}
36+
37+
/* Light mode styles (default) */
38+
.notification-bar {
39+
background-color: #fff3cd;
40+
color: #856404;
41+
}
42+
.notification-bar a {
43+
color: #d97706;
44+
}
45+
46+
/* Dark mode styles */
47+
html[data-theme=dark] .notification-bar {
48+
background-color: #333;
49+
color: #ddd;
50+
}
51+
html[data-theme=dark] .notification-bar a {
52+
color: #ffa500; /* Brighter color for visibility */
53+
}
54+
</style>
55+
56+
<div class="notification-bar">
57+
<p>You are viewing the latest developer preview docs. <a href="https://vllm-ascend.readthedocs.io/en/stable/">Click here</a> to view docs for the latest stable release(v0.7.3).</p>
58+
</div>

docs/source/conf.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
# add these directories to sys.path here. If the directory is relative to the
2424
# documentation root, use os.path.abspath to make it absolute, like shown here.
2525
#
26-
# import os
26+
import os
27+
2728
# import sys
2829
# sys.path.insert(0, os.path.abspath('.'))
2930

@@ -119,6 +120,16 @@
119120
# so a file named "default.css" will overwrite the builtin "default.css".
120121
# html_static_path = ['_static']
121122

123+
READTHEDOCS_VERSION_TYPE = os.environ.get('READTHEDOCS_VERSION_TYPE')
124+
if READTHEDOCS_VERSION_TYPE == "tag":
125+
# remove the warning banner if the version is a tagged release
126+
header_file = os.path.join(os.path.dirname(__file__),
127+
"_templates/sections/header.html")
128+
# The file might be removed already if the build is triggered multiple times
129+
# (readthedocs build both HTML and PDF versions separately)
130+
if os.path.exists(header_file):
131+
os.remove(header_file)
132+
122133

123134
def setup(app):
124135
pass

0 commit comments

Comments
 (0)