Skip to content

Commit

Permalink
docs: a11y and seo
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 12, 2021
1 parent 14617ec commit 5fc1ea7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
19 changes: 16 additions & 3 deletions docs/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ export default {
h('div', { class: 'sponsors' }, [
h(
'a',
{ href: 'https://github.com/sponsors/yyx990803', target: '_blank' },
{
href: 'https://github.com/sponsors/yyx990803',
target: '_blank',
rel: 'noopener'
},
[h('span', 'Sponsors')]
),
...sponsors.map(({ href, src }) =>
h('a', { href, target: '_blank' }, [h('img', { src })])
...sponsors.map(({ href, src, name }) =>
h(
'a',
{
href,
target: '_blank',
rel: 'noopener',
'aria-label': 'sponsor-img'
},
[h('img', { src, alt: name })]
)
)
])
})
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/theme/sponsors.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
{
"name": "Tailwind Labs",
"href": "https://tailwindcss.com",
"src": "/tailwind-labs.svg"
}
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ footer: MIT Licensed | Copyright © 2019-present Evan You & Vite Contributors

<div class="frontpage sponsors">
<h2>Sponsors</h2>
<a v-for="{ href, src } of sponsors" :href="href" target="_blank">
<img :src="src">
<a v-for="{ href, src, name } of sponsors" :href="href" target="_blank" rel="noopener" aria-label="sponsor-img">
<img :src="src" :alt="name">
</a>
<br>
<a href="https://github.com/sponsors/yyx990803" target="_blank">Become a sponsor on GitHub</a>
<a href="https://github.com/sponsors/yyx990803" target="_blank" rel="noopener">Become a sponsor on GitHub</a>
</div>

<script setup>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"debug-build": "cross-env VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 node --inspect-brk ./node_modules/.bin/jest",
"docs": "vitepress dev docs",
"build-docs": "vitepress build docs",
"serve-docs": "vitepress serve docs",
"build-vite": "cd packages/vite && yarn build",
"build-plugin-vue": "cd packages/plugin-vue && yarn build",
"ci-docs": "run-s build-vite build-plugin-vue build-docs"
Expand Down

0 comments on commit 5fc1ea7

Please sign in to comment.