Skip to content

Commit 3593c89

Browse files
committed
Migrate to VitePress 1.x
1 parent 9724220 commit 3593c89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1991
-4791
lines changed

.editorconfig

-9
This file was deleted.

.eslintignore

-2
This file was deleted.

.eslintrc.js

-17
This file was deleted.

.github/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Documentation for [wsrv.nl](https://wsrv.nl/).
99

1010
## Getting started
1111

12-
```bash
12+
```shell
1313
git clone https://github.com/weserv/docs.git
1414
cd docs
1515
yarn # OR npm install
1616
```
1717

1818
### As easy as 1, 2, 3
1919

20-
```bash
20+
```shell
2121
# Create a markdown file and write something
2222
echo '# Hello World' > docs/Hello.md
2323

@@ -26,4 +26,8 @@ yarn run dev # OR npm run dev
2626

2727
# Build to static files
2828
yarn run build # OR npm run build
29+
30+
# Serve dist/
31+
docker run -d -p 8080:80 -v "$(pwd)/dist:/var/www/imagesweserv/public" --shm-size=1gb --name=weserv ghcr.io/weserv/images:5.x
32+
# Visit http://localhost:8080/
2933
```

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ yarn-error.log*
1616
*.njsproj
1717
*.sln
1818
*.sw*
19+
20+
# VitePress
21+
.vitepress/cache

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.md
2+
*.vue
3+
dist

.prettierrc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
semi: true
2+
singleQuote: true
3+
printWidth: 120
4+
trailingComma: none

.vitepress/config.js

-60
This file was deleted.

.vitepress/config.ts

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
import { defineConfig } from 'vitepress';
2+
3+
const version = 5;
4+
5+
export default defineConfig({
6+
lang: 'en-US',
7+
title: 'wsrv.nl',
8+
description: 'Image cache & resize service',
9+
head: [
10+
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }],
11+
['link', { rel: 'manifest', href: '/site.webmanifest' }],
12+
['link', { rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#a72376' }],
13+
['meta', { name: 'msapplication-TileColor', content: '#a72376' }],
14+
['meta', { name: 'theme-color', content: '#ffffff' }]
15+
],
16+
themeConfig: {
17+
logo: {
18+
light: '/logo.svg',
19+
dark: '/logo-dark.svg',
20+
alt: 'Logo'
21+
},
22+
nav: [
23+
{ text: 'Documentation', link: '/docs/introduction', activeMatch: '/docs/' },
24+
{ text: 'News', link: '/news/index', activeMatch: '/news/' },
25+
{ text: 'FAQ', link: '/faq/index', activeMatch: '/faq/' },
26+
{
27+
text: `v${version}`,
28+
items: [
29+
{
30+
text: 'Changelog',
31+
link: `https://github.com/weserv/images/blob/${version}.x/CHANGELOG.md`
32+
},
33+
{
34+
text: 'Privacy Policy',
35+
link: `https://github.com/weserv/images/blob/${version}.x/Privacy-Policy.md`
36+
}
37+
]
38+
}
39+
],
40+
sidebar: {
41+
'/docs/': {
42+
base: '/docs/',
43+
items: [
44+
{
45+
text: 'Documentation',
46+
items: [
47+
{ text: 'Introduction', link: 'introduction' },
48+
{ text: 'Quick reference', link: 'quick-reference' },
49+
{ text: 'Size', link: 'size' },
50+
{ text: 'Fit', link: 'fit' },
51+
{ text: 'Crop', link: 'crop' },
52+
{ text: 'Mask', link: 'mask' },
53+
{ text: 'Orientation', link: 'orientation' },
54+
{ text: 'Adjustment', link: 'adjustment' },
55+
{ text: 'Format', link: 'format' }
56+
]
57+
}
58+
]
59+
},
60+
'/news/': {
61+
base: '/news/',
62+
items: [
63+
{
64+
text: 'News',
65+
items: [
66+
{ text: 'Introducing API version 5', link: '2019/09/01/introducing-api-5' },
67+
{ text: 'Introducing API version 4', link: '2018/07/29/introducing-api-4' }
68+
]
69+
}
70+
]
71+
}
72+
},
73+
editLink: {
74+
pattern: 'https://github.com/weserv/docs/edit/master/:path',
75+
text: 'Suggest changes to this page'
76+
},
77+
socialLinks: [{ icon: 'github', link: 'https://github.com/weserv/images' }],
78+
footer: {
79+
message: `Released under the <a href='https://github.com/weserv/images/blob/${version}.x/LICENSE' target='_blank'>BSD 3-Clause License</a>.`,
80+
copyright:
81+
'Copyright &copy; 2007-present <a href="https://github.com/weserv/images/graphs/contributors" target="_blank">wsrv.nl contributors</a>.'
82+
},
83+
search: {
84+
provider: 'algolia',
85+
options: {
86+
appId: 'FVJ36DNUJC',
87+
apiKey: '7563ec929d69f24be83776fd79b57a1b',
88+
indexName: 'images_weserv'
89+
}
90+
}
91+
},
92+
markdown: {
93+
gfmAlerts: false
94+
},
95+
vue: {
96+
template: {
97+
transformAssetUrls: {
98+
includeAbsolute: false
99+
}
100+
}
101+
},
102+
outDir: 'dist'
103+
});

.vitepress/theme/CustomLayout.vue

-21
This file was deleted.

.vitepress/theme/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# @weserv/docs-theme
22

33
Default theme for [wsrv.nl](https://wsrv.nl/).
4-

.vitepress/theme/components/Home.vue

-28
This file was deleted.

0 commit comments

Comments
 (0)