Skip to content

Commit d7a8967

Browse files
Merge remote-tracking branch 'origin/upstream'
2 parents 232405f + 5a1e8c2 commit d7a8967

File tree

20 files changed

+417
-169
lines changed

20 files changed

+417
-169
lines changed

.vitepress/config.ts

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import fs from 'fs'
22
import path from 'path'
3-
import { defineConfigWithTheme, type HeadConfig } from 'vitepress'
3+
import { defineConfigWithTheme, type HeadConfig, type Plugin } from 'vitepress'
44
import type { Config as ThemeConfig } from '@vue/theme'
5+
import llmstxt from 'vitepress-plugin-llms'
56
import baseConfig from '@vue/theme/config'
67
import { headerPlugin } from './headerMdPlugin'
78
// import { textAdPlugin } from './textAdMdPlugin'
@@ -728,7 +729,7 @@ export default defineConfigWithTheme<ThemeConfig>({
728729
{
729730
link: 'https://ru.vuejs.org',
730731
text: 'Русский',
731-
repo: 'https://github.com/translation-gang/docs-ru'
732+
repo: 'https://github.com/vuejs-translations/docs-ru'
732733
},
733734
{
734735
link: 'https://cs.vuejs.org',
@@ -740,6 +741,11 @@ export default defineConfigWithTheme<ThemeConfig>({
740741
text: '繁體中文',
741742
repo: 'https://github.com/vuejs-translations/docs-zh-hk'
742743
},
744+
{
745+
link: 'https://pl.vuejs.org',
746+
text: 'Polski',
747+
repo: 'https://github.com/vuejs-translations/docs-pl',
748+
},
743749
{
744750
link: '/translations/',
745751
text: 'به ما در ترجمه کمک کنید!',
@@ -813,6 +819,30 @@ export default defineConfigWithTheme<ThemeConfig>({
813819
},
814820
json: {
815821
stringify: true
816-
}
822+
},
823+
plugins: [
824+
llmstxt({
825+
ignoreFiles: [
826+
'about/team/**/*',
827+
'about/team.md',
828+
'about/privacy.md',
829+
'about/coc.md',
830+
'developers/**/*',
831+
'ecosystem/themes.md',
832+
'examples/**/*',
833+
'partners/**/*',
834+
'sponsor/**/*',
835+
'index.md'
836+
],
837+
customLLMsTxtTemplate: `\
838+
# Vue.js
839+
840+
Vue.js - The Progressive JavaScript Framework
841+
842+
## Table of Contents
843+
844+
{toc}`
845+
}) as Plugin
846+
]
817847
}
818848
})

.vitepress/inlined-scripts/restorePreference.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
restore('vue-docs-prefer-composition', 'prefer-composition', true)
99
restore('vue-docs-prefer-sfc', 'prefer-sfc', true)
1010

11-
// window.__VUE_BANNER_ID__ = ''
12-
// restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
11+
window.__VUE_BANNER_ID__ = 'vueconf2025'
12+
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
1313
})()

.vitepress/theme/components/Banner.vue

Lines changed: 79 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,31 @@ function dismiss() {
2222

2323
<template>
2424
<div class="banner" v-if="open">
25-
<a target="_blank"></a>
25+
<p class="vt-banner-text">
26+
<span class="vt-text-primary">
27+
Vueconf.US
28+
</span>
29+
<span class="vt-tagline"> · The official Vue.js conf</span>
30+
<span class="vt-place"> · Tampa, USA</span>
31+
<span class="vt-date"> · 19-21 May 2025</span>
32+
<a target="_blank" class="vt-primary-action"
33+
href="https://vueconf.us/?utm_source=vuejs&utm_content=top_banner">
34+
Register
35+
</a>
36+
</p>
2637
<button @click="dismiss">
2738
<VTIconPlus class="close" />
2839
</button>
40+
<p class="vt-banner-text vt-coupon">
41+
<span class="vt-text-primary">Use</span> VUEJSDOCS
42+
<span class="vt-text-primary"> $200 off</span>
43+
</p>
2944
</div>
3045
</template>
3146

3247
<style>
3348
html:not(.banner-dismissed) {
34-
--vt-banner-height: 30px;
49+
--vt-banner-height: 60px;
3550
}
3651
</style>
3752

@@ -50,12 +65,12 @@ html:not(.banner-dismissed) {
5065
font-weight: 600;
5166
color: #fff;
5267
background-color: var(--vt-c-green);
53-
background: linear-gradient(
54-
90deg,
55-
rgba(66, 184, 131, 1) 0%,
56-
rgba(39, 179, 137, 1) 19%,
57-
rgba(100, 126, 255, 1) 100%
58-
);
68+
background: #0f172a;
69+
display: flex;
70+
justify-content: center;
71+
align-items: center;
72+
73+
5974
}
6075
6176
.banner-dismissed .banner {
@@ -70,7 +85,7 @@ button {
7085
position: absolute;
7186
right: 0;
7287
top: 0;
73-
padding: 5px;
88+
padding: 10px 10px;
7489
}
7590
7691
.close {
@@ -79,10 +94,61 @@ button {
7994
fill: #fff;
8095
transform: rotate(45deg);
8196
}
82-
/*
83-
@media (max-width: 720px) {
84-
a > span {
97+
98+
.vt-banner-text {
99+
color: #fff;
100+
font-size: 16px;
101+
}
102+
103+
.vt-text-primary {
104+
color: #75c05e;
105+
}
106+
107+
.vt-primary-action {
108+
background: #75c05e;
109+
color: #121c1a;
110+
padding: 8px 15px;
111+
border-radius: 5px;
112+
font-size: 14px;
113+
text-decoration: none;
114+
margin: 0 10px;
115+
font-weight: bold;
116+
}
117+
118+
.vt-primary-action:hover {
119+
text-decoration: none;
120+
background: #c4d141;
121+
}
122+
123+
@media (max-width: 1280px) {
124+
.banner .vt-banner-text {
125+
font-size: 14px;
126+
}
127+
128+
129+
}
130+
131+
@media (max-width: 780px) {
132+
.vt-tagline {
133+
display: none;
134+
}
135+
.vt-primary-action {
136+
margin: 0 10px;
137+
padding: 5px 5px;
138+
}
139+
140+
.vt-time-now {
141+
display: none;
142+
}
143+
}
144+
145+
@media (max-width: 560px) {
146+
147+
.vt-place {
85148
display: none;
86149
}
87-
} */
150+
.vt-date {
151+
display: none;
152+
}
153+
}
88154
</style>

.vitepress/theme/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import {
1010
} from './components/preferences'
1111
import SponsorsAside from './components/SponsorsAside.vue'
1212
import VueSchoolLink from './components/VueSchoolLink.vue'
13-
// import Banner from './components/Banner.vue'
13+
import Banner from './components/Banner.vue'
1414
// import TextAd from './components/TextAd.vue'
1515

1616
export default Object.assign({}, VPTheme, {
1717
Layout: () => {
1818
// @ts-ignore
1919
return h(VPTheme.Layout, null, {
20-
// banner: () => h(Banner),
20+
banner: () => h(Banner),
2121
'sidebar-top': () => h(PreferenceSwitch),
2222
'sidebar-bottom': () => h(SecurityUpdateBtn),
2323
'aside-mid': () => h(SponsorsAside)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@types/markdown-it": "^14.1.2",
2424
"@types/node": "^22.7.5",
2525
"typescript": "^5.6.3",
26+
"vitepress-plugin-llms": "^0.0.8",
2627
"vue-tsc": "^2.1.6"
2728
},
2829
"packageManager": "[email protected]"

0 commit comments

Comments
 (0)