Skip to content

Commit e643377

Browse files
authored
Merge pull request #28 from MicroAppJS/develop
Develop
2 parents e29b16a + 87047e2 commit e643377

21 files changed

+1316
-180
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## [0.1.1](https://github.com/MicroAppJS/plugin-vuepress/compare/v0.1.0...v0.1.1) (2020-02-09)
2+
3+
4+
### Bug Fixes
5+
6+
* 修复 rss bug ([0650187](https://github.com/MicroAppJS/plugin-vuepress/commit/06501874ad6251f97312f6baea0532aef076e42f))
7+
8+
# 0.1.0 (2020-02-09)
9+
10+
11+
### Bug Fixes
12+
13+
* fix create steps ([a9716c4](https://github.com/MicroAppJS/plugin-vuepress/commit/a9716c4be02742aa6708b0ce21b4c37353fd2083))
14+
* some bugs ([f681eee](https://github.com/MicroAppJS/plugin-vuepress/commit/f681eee8fd04379890f4ef54c1134e08a4ff30ac))
15+
* update deps ([1379512](https://github.com/MicroAppJS/plugin-vuepress/commit/1379512b3e584b85c3668360a814914171dc29f9))
16+
17+
18+
### Features
19+
20+
* add 404 page ([731871a](https://github.com/MicroAppJS/plugin-vuepress/commit/731871ade4726f15a9c8edcb86e395348bc2f7d7))
21+
* add seo, shortLinks and baidu push ([77be6c6](https://github.com/MicroAppJS/plugin-vuepress/commit/77be6c6c43dda50ba0b8de71f862b128d4a07673))
22+
* art ([0a59caf](https://github.com/MicroAppJS/plugin-vuepress/commit/0a59cafe75e0abd672d11556a53879bfc1bd0551))
23+
* fix blog theme ([b3a8d73](https://github.com/MicroAppJS/plugin-vuepress/commit/b3a8d73d16080e77e6948129989709682b941c56))
24+

TODO.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# TODO
22

3-
- 搭建 404 页面
4-
- 分离主题为单独的包 `vuepress-theme-microapp`
3+
- [x] 搭建 404 页面
4+
5+
- [ ] 分离主题为单独的包 `vuepress-theme-microapp`
6+
7+
- [ ] 增加 create 的自定义

bin/micro-app-vuepress

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
'use strict';
33

44
process.env.MICRO_APP_VUEPRESS_DIRECT_RUNNING = true;
5+
56
const yParser = require('yargs-parser');
67
const argv = yParser(process.argv.slice(2));
78
const path = require('path');
@@ -16,7 +17,7 @@ const { service } = MicroAppCLI;
1617

1718
[ 'extends', 'commands' ].forEach(name => {
1819
service.registerPlugin({
19-
id: `cli:plugin-extend-vuepress-${name}`,
20+
id: `cli:plugin-vuepress-${name}`,
2021
link: path.resolve(__dirname, `../src/${name}/index.js`),
2122
});
2223
});

micro-app.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const config = {};
66
if (!process.env.MICRO_APP_VUEPRESS_DIRECT_RUNNING) {
77
config.plugins = [
88
__dirname,
9-
'@micro-app/plugin-deploy',
9+
'@micro-app/plugin-deploy', // test
1010
];
1111
}
1212

micro-app.release.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict';
2+
3+
// demo config
4+
module.exports = {
5+
hooks: {
6+
'before:init': [
7+
'npm test',
8+
],
9+
},
10+
git: {
11+
commitMessage: 'chore: release v%s',
12+
tagName: 'v%s',
13+
requireUpstream: false,
14+
push: false,
15+
},
16+
npm: {
17+
publish: true,
18+
},
19+
github: {
20+
release: true,
21+
releaseName: 'v%s Released!',
22+
},
23+
plugins: {
24+
'@release-it/conventional-changelog': {
25+
preset: 'angular',
26+
infile: 'CHANGELOG.md',
27+
},
28+
},
29+
};

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@micro-app/plugin-vuepress",
3-
"version": "0.0.17-alpha.4",
3+
"version": "0.1.1",
44
"description": "[Plugin] adapter vuepress plugin.",
55
"main": "src/index.js",
66
"bin": {
@@ -14,7 +14,9 @@
1414
"create": "micro-app vuepress create --type post --base __test --classify categories",
1515
"deploy": "micro-app deploy",
1616
"vp:deploy": "micro-app vuepress deploy --base /plugin-vuepress/",
17-
"publish:next": "npm publish --tag next"
17+
"release": "micro-app release",
18+
"release:alpha": "npm run release -- --preRelease=alpha",
19+
"release:next": "npm run release -- --preRelease=next"
1820
},
1921
"files": [
2022
"bin",
@@ -44,19 +46,18 @@
4446
},
4547
"license": "MIT",
4648
"peerDependencies": {
47-
"@micro-app/cli": ">=0.3.0"
49+
"@micro-app/cli": ">=0.3.1"
4850
},
4951
"devDependencies": {
50-
"@micro-app/plugin-deploy": "^0.0.3",
52+
"@micro-app/plugin-deploy": "^0.0.4",
5153
"@types/jest": "^24.0.25",
5254
"babel-eslint": "^10.0.3",
5355
"eslint": "^5.16.0",
5456
"eslint-config-2o3t": "^1.1.17",
5557
"jest": "^24.9.0"
5658
},
5759
"dependencies": {
58-
"@micro-app/cli": "^0.3.0-alpha.6",
59-
"@micro-app/shared-utils": "0.1.14-alpha.1",
60+
"@micro-app/cli": "^0.3.1",
6061
"@vssue/api-github-v4": "^1.4.0",
6162
"@vssue/vuepress-plugin-vssue": "^1.4.2",
6263
"@vuepress/plugin-back-to-top": "^1.3.0",

theme/components/BlogPosts.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
<div v-for="(post, index) in currentPosts" :key="post.key" :class="$style.post">
1212
<h2 :key="`title-${index}`" :class="$style.title">
1313
<NavLink :item="post.path">{{ post.title }}</NavLink>
14+
<Badge
15+
v-if="post.frontmatter.type"
16+
style="margin-left: 5px;"
17+
:text="post.frontmatter.type"
18+
type="yellow"
19+
></Badge>
1420
</h2>
1521
<article :key="`summary-${index}`" :class="$style.summary">
1622
<template v-if="post.frontmatter.summary">

theme/components/Header.vue

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@
2020
<h1
2121
v-if="frontmatter.heroText !== null"
2222
:class="[ heroImage ? '' : $style.notImg ]"
23+
:has-banner="!!frontmatter.banner"
2324
id="main-title"
24-
>{{ heroText }}</h1>
25+
>
26+
<span>{{ heroText }}</span>
27+
</h1>
28+
29+
<hr />
2530

2631
<p v-if="frontmatter.tagline !== null" :class="$style.description">{{ tagline }}</p>
2732

@@ -161,11 +166,32 @@ export default {
161166
h1 {
162167
font-size: 2rem;
163168
169+
&>span {
170+
padding: 0.1rem 0.4rem 0.1rem 0.5rem;
171+
letter-spacing: 0.1rem;
172+
}
173+
174+
&[has-banner]>span {
175+
background: $accentColor;
176+
color: #fff;
177+
}
178+
164179
&.notImg {
165180
margin-top: 8rem;
166181
}
167182
}
168183
184+
hr {
185+
height: 1px;
186+
width: 4rem;
187+
text-align: center;
188+
position: relative;
189+
background: $accentColor;
190+
opacity: 0.6;
191+
margin: 0 auto;
192+
border: 0;
193+
}
194+
169195
h1, .description, .action, .badges {
170196
margin: 2rem auto;
171197
padding: 10px;
@@ -212,7 +238,7 @@ export default {
212238
&.hasMask {
213239
z-index: 1;
214240
min-height: 350px;
215-
padding-bottom: 50px;
241+
// padding-bottom: 50px;
216242
}
217243
}
218244

theme/components/Home.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ export default {
5757

5858
<style lang="stylus" module>
5959
.home {
60-
padding: $navbarHeight 0 0;
60+
// padding: $navbarHeight 0 0;
61+
padding: 0;
6162
margin: 0px auto;
6263
display: block;
6364
width: 100%;
@@ -144,6 +145,7 @@ export default {
144145
145146
.custom[class] {
146147
padding: 0 1.2rem 2rem;
148+
word-break: break-all;
147149
}
148150
}
149151

theme/components/Page.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,8 @@ export default {
5656
padding-top: $navbarHeight;
5757
max-width: $contentWidth;
5858
}
59+
60+
.content {
61+
word-break: break-all;
62+
}
5963
</style>

0 commit comments

Comments
 (0)