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
022c58b8
Unverified
Commit
022c58b8
authored
Jun 30, 2025
by
Reid
Committed by
GitHub
Jun 30, 2025
Browse files
[doc] Add Slack and Forum to the top navigation (#20208)
Signed-off-by:
reidliu41
<
reid201711@gmail.com
>
parent
19108ef3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
0 deletions
+83
-0
docs/mkdocs/javascript/slack_and_forum.js
docs/mkdocs/javascript/slack_and_forum.js
+56
-0
docs/mkdocs/stylesheets/extra.css
docs/mkdocs/stylesheets/extra.css
+26
-0
mkdocs.yaml
mkdocs.yaml
+1
-0
No files found.
docs/mkdocs/javascript/slack_and_forum.js
0 → 100644
View file @
022c58b8
/**
* slack_and_forum.js
*
* Adds a custom Slack and Forum button to the MkDocs Material header.
*
*/
window
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
headerInner
=
document
.
querySelector
(
'
.md-header__inner
'
);
if
(
headerInner
)
{
const
slackButton
=
document
.
createElement
(
'
button
'
);
slackButton
.
className
=
'
slack-button
'
;
slackButton
.
title
=
'
Join us on Slack
'
;
slackButton
.
style
.
border
=
'
none
'
;
slackButton
.
style
.
background
=
'
transparent
'
;
slackButton
.
style
.
cursor
=
'
pointer
'
;
slackButton
.
innerHTML
=
`
<img src="https://a.slack-edge.com/80588/marketing/img/icons/icon_slack_hash_colored.png"
style="height: 1.1rem;"
alt="Slack">
`
;
slackButton
.
addEventListener
(
'
click
'
,
()
=>
{
window
.
open
(
'
https://slack.vllm.ai
'
,
'
_blank
'
,
'
noopener
'
);
});
const
forumButton
=
document
.
createElement
(
'
button
'
);
forumButton
.
className
=
'
forum-button
'
;
forumButton
.
title
=
'
Join the Forum
'
;
forumButton
.
style
.
border
=
'
none
'
;
forumButton
.
style
.
background
=
'
transparent
'
;
forumButton
.
style
.
cursor
=
'
pointer
'
;
forumButton
.
innerHTML
=
`
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 -960 960 960"
fill="currentColor"
>
<path d="M817.85-198.15 698.46-317.54H320q-24.48 0-41.47-16.99T261.54-376v-11.69h424.61q25.39 0 43.47-18.08 18.07-18.08 18.07-43.46v-268.92h11.69q24.48 0 41.47 16.99 17 16.99 17 41.47v461.54ZM179.08-434.69l66.84-66.85h363.31q10.77 0 17.69-6.92 6.93-6.92 6.93-17.69v-246.77q0-10.77-6.93-17.7-6.92-6.92-17.69-6.92H203.69q-10.77 0-17.69 6.92-6.92 6.93-6.92 17.7v338.23Zm-36.93 89.46v-427.69q0-25.39 18.08-43.46 18.08-18.08 43.46-18.08h405.54q25.39 0 43.46 18.08 18.08 18.07 18.08 43.46v246.77q0 25.38-18.08 43.46-18.07 18.07-43.46 18.07H261.54L142.15-345.23Zm36.93-180.92V-797.54v271.39Z"/>
</svg>
`
;
forumButton
.
addEventListener
(
'
click
'
,
()
=>
{
window
.
open
(
'
https://discuss.vllm.ai/
'
,
'
_blank
'
,
'
noopener
'
);
});
const
githubSource
=
document
.
querySelector
(
'
.md-header__source
'
);
if
(
githubSource
)
{
githubSource
.
parentNode
.
insertBefore
(
slackButton
,
githubSource
.
nextSibling
);
githubSource
.
parentNode
.
insertBefore
(
forumButton
,
slackButton
.
nextSibling
);
}
}
});
docs/mkdocs/stylesheets/extra.css
View file @
022c58b8
...
...
@@ -108,3 +108,29 @@ body[data-md-color-scheme="slate"] .md-nav__item--section > label.md-nav__link .
.md-content__button-wrapper
a
:hover
{
color
:
var
(
--md-accent-fg-color
);
}
/* Slack and Forum css */
.slack-button
,
.forum-button
{
display
:
inline-flex
;
align-items
:
center
;
justify-content
:
center
;
margin-left
:
0.4rem
;
height
:
24px
;
}
.slack-button
img
{
height
:
18px
;
filter
:
none
!important
;
}
.slack-button
:hover
,
.forum-button
:hover
{
opacity
:
0.7
;
}
.forum-button
svg
{
height
:
28px
;
opacity
:
0.9
;
transform
:
translateY
(
2px
);
}
mkdocs.yaml
View file @
022c58b8
...
...
@@ -127,6 +127,7 @@ extra_javascript:
-
mkdocs/javascript/run_llm_widget.js
-
https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
-
mkdocs/javascript/edit_and_feedback.js
-
mkdocs/javascript/slack_and_forum.js
# Makes the url format end in .html rather than act as a dir
# So index.md generates as index.html and is available under URL /index.html
...
...
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