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 15, 04:45 UTC
[doc] Add Slack and Forum to the top navigation (#20208)
Signed-off-by: reidliu41 <reid201711@gmail.com>
Reid committed
Jun 30, 2025 at 15:53 UTC
022c58b80f8ae2e27dc526860b769455ef4c5498
3 files changed
+83
docs/mkdocs/javascript/slack_and_forum.js
new
+56
@@ -0,0 +1,56 @@
1
+/**
2
+ * slack_and_forum.js
3
+ *
4
+ * Adds a custom Slack and Forum button to the MkDocs Material header.
5
+ *
6
+ */
7
+
8
+window.addEventListener('DOMContentLoaded', () => {
9
+ const headerInner = document.querySelector('.md-header__inner');
10
+
11
+ if (headerInner) {
12
+ const slackButton = document.createElement('button');
13
+ slackButton.className = 'slack-button';
14
+ slackButton.title = 'Join us on Slack';
15
+ slackButton.style.border = 'none';
16
+ slackButton.style.background = 'transparent';
17
+ slackButton.style.cursor = 'pointer';
18
+
19
+ slackButton.innerHTML = `
20
+ <img src="https://a.slack-edge.com/80588/marketing/img/icons/icon_slack_hash_colored.png"
21
+ style="height: 1.1rem;"
22
+ alt="Slack">
23
+ `;
24
+
25
+ slackButton.addEventListener('click', () => {
26
+ window.open('https://slack.vllm.ai', '_blank', 'noopener');
27
+ });
28
+
29
+ const forumButton = document.createElement('button');
30
+ forumButton.className = 'forum-button';
31
+ forumButton.title = 'Join the Forum';
32
+ forumButton.style.border = 'none';
33
+ forumButton.style.background = 'transparent';
34
+ forumButton.style.cursor = 'pointer';
35
+
36
+ forumButton.innerHTML = `
37
+ <svg
38
+ xmlns="http://www.w3.org/2000/svg"
39
+ viewBox="0 -960 960 960"
40
+ fill="currentColor"
41
+ >
42
+ <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"/>
43
+ </svg>
44
+ `;
45
+
46
+ forumButton.addEventListener('click', () => {
47
+ window.open('https://discuss.vllm.ai/', '_blank', 'noopener');
48
+ });
49
+
50
+ const githubSource = document.querySelector('.md-header__source');
51
+ if (githubSource) {
52
+ githubSource.parentNode.insertBefore(slackButton, githubSource.nextSibling);
53
+ githubSource.parentNode.insertBefore(forumButton, slackButton.nextSibling);
54
+ }
55
+ }
56
+});
docs/mkdocs/stylesheets/extra.css
+26
@@ -108,3 +108,29 @@ body[data-md-color-scheme="slate"] .md-nav__item--section > label.md-nav__link .
108
.md-content__button-wrapper a:hover {
109
color: var(--md-accent-fg-color);
110
}
111
+
112
+/* Slack and Forum css */
113
+.slack-button,
114
+.forum-button {
115
+ display: inline-flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ margin-left: 0.4rem;
119
+ height: 24px;
120
+}
121
+
122
+.slack-button img {
123
+ height: 18px;
124
+ filter: none !important;
125
+}
126
+
127
+.slack-button:hover,
128
+.forum-button:hover {
129
+ opacity: 0.7;
130
+}
131
+
132
+.forum-button svg {
133
+ height: 28px;
134
+ opacity: 0.9;
135
+ transform: translateY(2px);
136
+}
mkdocs.yaml
+1
@@ -127,6 +127,7 @@ extra_javascript:
127
- mkdocs/javascript/run_llm_widget.js
128
- https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
129
- mkdocs/javascript/edit_and_feedback.js
130
+ - mkdocs/javascript/slack_and_forum.js
131
132
# Makes the url format end in .html rather than act as a dir
133
# So index.md generates as index.html and is available under URL /index.html