Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
27902d42
Unverified
Commit
27902d42
authored
Jul 04, 2024
by
youkaichao
Committed by
GitHub
Jul 04, 2024
Browse files
[misc][doc] try to add warning for latest html (#5979)
parent
56b325e9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
docs/source/_templates/sections/header.html
docs/source/_templates/sections/header.html
+38
-0
docs/source/conf.py
docs/source/conf.py
+8
-0
No files found.
docs/source/_templates/sections/header.html
0 → 100644
View file @
27902d42
<style>
.notification-bar
{
width
:
100vw
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
16px
;
}
.notification-bar
p
{
margin
:
0
;
}
.notification-bar
a
{
font-weight
:
bold
;
text-decoration
:
none
;
}
/* Light mode styles (default) */
.notification-bar
{
background-color
:
#fff3cd
;
color
:
#856404
;
}
.notification-bar
a
{
color
:
#d97706
;
}
/* Dark mode styles */
html
[
data-theme
=
dark
]
.notification-bar
{
background-color
:
#333
;
color
:
#ddd
;
}
html
[
data-theme
=
dark
]
.notification-bar
a
{
color
:
#ffa500
;
/* Brighter color for visibility */
}
</style>
<div
class=
"notification-bar"
>
<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>
</div>
docs/source/conf.py
View file @
27902d42
...
@@ -69,6 +69,14 @@ html_theme_options = {
...
@@ -69,6 +69,14 @@ html_theme_options = {
'use_edit_page_button'
:
True
,
'use_edit_page_button'
:
True
,
}
}
# see https://docs.readthedocs.io/en/stable/reference/environment-variables.html # noqa
READTHEDOCS_VERSION_TYPE
=
os
.
environ
.
get
(
'READTHEDOCS_VERSION_TYPE'
)
if
READTHEDOCS_VERSION_TYPE
==
"tag"
:
# remove the warning banner if the version is a tagged release
header_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"_templates/sections/header.html"
)
os
.
remove
(
header_file
)
# Add any paths that contain custom static files (such as style sheets) here,
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# so a file named "default.css" will overwrite the builtin "default.css".
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment