A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 22:00 UTC
[misc][doc] try to add warning for latest html (#5979)
youkaichao committed
Jul 4, 2024 at 09:57 UTC
27902d42beeeb5828ef3243d5455a3b9af3317b3
2 files changed
+46
docs/source/_templates/sections/header.html
new
+38
@@ -0,0 +1,38 @@
1
+<style>
2
+ .notification-bar {
3
+ width: 100vw;
4
+ display: flex;
5
+ justify-content: center;
6
+ align-items: center;
7
+ font-size: 16px;
8
+ }
9
+ .notification-bar p {
10
+ margin: 0;
11
+ }
12
+ .notification-bar a {
13
+ font-weight: bold;
14
+ text-decoration: none;
15
+ }
16
+
17
+ /* Light mode styles (default) */
18
+ .notification-bar {
19
+ background-color: #fff3cd;
20
+ color: #856404;
21
+ }
22
+ .notification-bar a {
23
+ color: #d97706;
24
+ }
25
+
26
+ /* Dark mode styles */
27
+ html[data-theme=dark] .notification-bar {
28
+ background-color: #333;
29
+ color: #ddd;
30
+ }
31
+ html[data-theme=dark] .notification-bar a {
32
+ color: #ffa500; /* Brighter color for visibility */
33
+ }
34
+</style>
35
+
36
+<div class="notification-bar">
37
+ <p>You are viewing the latest developer preview docs. <a href="https://docs.vllm.ai/en/stable/">Click here</a> to view docs for the latest stable release.</p>
38
+</div>
docs/source/conf.py
+8
@@ -69,6 +69,14 @@ html_theme_options = {
69
'use_edit_page_button': True,
70
}
71
72
+# see https://docs.readthedocs.io/en/stable/reference/environment-variables.html # noqa
73
+READTHEDOCS_VERSION_TYPE = os.environ.get('READTHEDOCS_VERSION_TYPE')
74
+if READTHEDOCS_VERSION_TYPE == "tag":
75
+ # remove the warning banner if the version is a tagged release
76
+ header_file = os.path.join(os.path.dirname(__file__),
77
+ "_templates/sections/header.html")
78
+ os.remove(header_file)
79
+
80
# Add any paths that contain custom static files (such as style sheets) here,
81
# relative to this directory. They are copied after the builtin static files,
82
# so a file named "default.css" will overwrite the builtin "default.css".