Skip to content

Commit df8368a

Browse files
vicmeowSaraVieira
authored andcommitted
Add VuePress template (#1652)
* added vuepress logo * add vuepress * Add @vicbergquist as a contributor * default file to open in editor * Update index.ts * add distdir for netlify
1 parent bc4059e commit df8368a

File tree

7 files changed

+66
-5
lines changed

7 files changed

+66
-5
lines changed

.all-contributorsrc

+9
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,15 @@
10761076
"contributions": [
10771077
"code"
10781078
]
1079+
},
1080+
{
1081+
"login": "vicbergquist",
1082+
"name": "Victoria Bergquist",
1083+
"avatar_url": "https://avatars0.githubusercontent.com/u/25737281?v=4",
1084+
"profile": "https://twitter.com/vicbergquist",
1085+
"contributions": [
1086+
"code"
1087+
]
10791088
}
10801089
],
10811090
"repoType": "github"

README.md

+19-3
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import * as React from 'react';
2+
import vuepress from './vuepress.png';
3+
4+
export default props => <img alt="vuepress" src={vuepress} {...props} />;
Loading

packages/common/src/templates/icons.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Apollo from '../components/logos/Apollo';
1919
import Nest from '../components/logos/Nest';
2020
import Static from '../components/logos/Static';
2121
import Styleguidist from '../components/logos/Styleguidist';
22+
import VuePress from '../components/logos/VuePress';
2223
import MDXDeck from '../components/logos/mdx-deck';
2324

2425
import {
@@ -42,7 +43,8 @@ import {
4243
sapper,
4344
staticTemplate,
4445
styleguidist,
45-
mdxDeck,
46+
vuepress,
47+
mdxDeck
4648
} from './';
4749

4850
import { TemplateType } from './';
@@ -96,6 +98,8 @@ export default function getIcon(theme: TemplateType): ReturnedIcon {
9698
return Static;
9799
case styleguidist.name:
98100
return Styleguidist;
101+
case vuepress.name:
102+
return VuePress;
99103
case mdxDeck.name:
100104
return MDXDeck;
101105
default:

packages/common/src/templates/index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import sapper from './sapper';
2020
import nest from './nest';
2121
import staticTemplate from './static';
2222
import styleguidist from './styleguidist';
23+
import vuepress from './vuepress';
2324
import mdxDeck from './mdx-deck';
2425

2526
export {
@@ -45,7 +46,8 @@ export {
4546
ember,
4647
staticTemplate,
4748
styleguidist,
48-
mdxDeck,
49+
vuepress,
50+
mdxDeck
4951
};
5052

5153
export type TemplateType =
@@ -67,6 +69,7 @@ export type TemplateType =
6769
| 'nest'
6870
| 'static'
6971
| 'styleguidist'
72+
| 'vuepress'
7073
| 'mdx-deck';
7174

7275
export default function getDefinition(theme: TemplateType) {
@@ -117,6 +120,8 @@ export default function getDefinition(theme: TemplateType) {
117120
return mdxDeck;
118121
case ember.name:
119122
return ember;
123+
case vuepress.name:
124+
return vuepress;
120125
default:
121126
return react;
122127
}
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// @flow
2+
import Template from './template';
3+
import { decorateSelector } from '../theme';
4+
5+
export class VuePressTemplate extends Template {
6+
// The file to open by the editor
7+
getDefaultOpenedFiles() {
8+
return ['/README.md', '/guide/README.md'];
9+
}
10+
}
11+
export default new VuePressTemplate(
12+
'vuepress',
13+
'VuePress',
14+
'https://vuepress.vuejs.org/',
15+
'github/vicbergquist/codesandbox-vuepress',
16+
decorateSelector(() => '#4abf8a'),
17+
{
18+
mainFile: [], // 🤔
19+
distDir: 'docs/.vuepress/dist',
20+
isServer: true,
21+
showOnHomePage: true,
22+
}
23+
);

0 commit comments

Comments
 (0)