Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 70d02c9

Browse files
committed
chore: add zh example
1 parent c3d8065 commit 70d02c9

9 files changed

+176
-0
lines changed

Diff for: examples/zh/.vuepress/config.js

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
module.exports = {
2+
title: 'Billyyyyy3320',
3+
/**
4+
* https://vuepress.vuejs.org/guide/i18n.html#site-level-i18n-config
5+
*/
6+
locales: {
7+
'/': {
8+
lang: 'zh-TW', // Will be set as the lang attribute on <html> and the global computed : `$lang`
9+
}
10+
},
11+
plugins: [
12+
[require('../../../lib/node'), {
13+
directories: [
14+
{
15+
id: 'post',
16+
dirname: '_posts',
17+
path: '/',
18+
title: '貼文', // Entry and pagination page titles for current classifier
19+
pagination: {
20+
getPaginationPageTitle (pageNumber) {
21+
return `第 ${pageNumber} 頁 | 貼文`
22+
}
23+
},
24+
25+
},
26+
],
27+
frontmatters: [
28+
{
29+
id: "tag",
30+
keys: ['tag'],
31+
path: '/tag/',
32+
title: '標籤', // Entry, scope and pagination page titles for current classifier
33+
pagination: {
34+
getPaginationPageTitle (pageNumber, key) {
35+
return `第 ${pageNumber} 頁 - ${key} | 標籤`
36+
}
37+
},
38+
},
39+
],
40+
globalPagination: {
41+
lengthPerPage: 2,
42+
prevText: '上一頁',
43+
nextText: '下一頁'
44+
},
45+
/**
46+
* vuepress-plugin-disqus-comment will use $lang as default
47+
*/
48+
comment: {
49+
service: 'disqus',
50+
shortname: 'vuepress-plugin-blog',
51+
// language:'zh-TW'
52+
},
53+
/**
54+
* See all available options: https://vuepress-plugin-mailchimp.billyyyyy3320.com/#config
55+
*/
56+
newsletter: {
57+
endpoint: "https://billyyyyy3320.us4.list-manage.com/subscribe/post?u=4905113ee00d8210c2004e038&amp;id=bd18d40138",
58+
title:'電子報',
59+
content:'若想收到我的最新文章通知,請輸入您的 E-mail',
60+
submitText:'訂閱'
61+
},
62+
}],
63+
],
64+
}
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<ul id="default-layout">
3+
<li v-for="item in $frontmatterKey.list">
4+
<router-link class="page-link" :to="item.path">{{ item.name }}</router-link>
5+
</li>
6+
</ul>
7+
</template>

Diff for: examples/zh/.vuepress/theme/layouts/GlobalLayout.vue

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<template>
2+
<div id="global-layout">
3+
<header style="background-color: #DDD">
4+
<router-link to="/">主頁</router-link
5+
<router-link to="/tag/">標籤</router-link>
6+
</header>
7+
<DefaultGlobalLayout />
8+
<footer style="background-color: #DDD">本站使用 VuePress 建置</footer>
9+
</div>
10+
</template>
11+
12+
<script>
13+
import GlobalLayout from '@app/components/GlobalLayout.vue';
14+
15+
export default {
16+
components: { DefaultGlobalLayout: GlobalLayout },
17+
};
18+
</script>

Diff for: examples/zh/.vuepress/theme/layouts/Layout.vue

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<div>
3+
<ul id="default-layout">
4+
<li v-for="page in $pagination.pages">
5+
<router-link class="page-link" :to="page.path">{{
6+
page.title
7+
}}</router-link>
8+
</li>
9+
</ul>
10+
<Pagination v-if="$pagination.length > 1" />
11+
</div>
12+
</template>
13+
14+
<script>
15+
import { Pagination } from '../../../../../lib/client/components.js';
16+
17+
export default {
18+
components: { Pagination },
19+
};
20+
</script>

Diff for: examples/zh/.vuepress/theme/layouts/Post.vue

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<template>
2+
<div>
3+
<Content />
4+
<SimpleNewsletter v-if="$service.email.enabled" />
5+
<Comment />
6+
</div>
7+
</template>
8+
9+
<script>
10+
import { Comment } from '../../../../../lib/client/components.js';
11+
12+
export default {
13+
components: { Comment },
14+
};
15+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
date: 2019-7-21
3+
tag:
4+
- JavaScript
5+
---
6+
7+
# 打造多檔案結構的`json-server`
8+
9+
10+
## 前言
11+
12+
先附上[範例](https://github.com/newsbielt703/json-server-mulitple-files-sample)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
date: 2019-8-15
3+
tag:
4+
- Git
5+
---
6+
7+
# 為什麼我愛用`git rebase`
8+
9+
10+
這篇文章是要分享我使用的原因與時機還有似乎很多人不知道的`git push --force-with-lease`。已經很多文章在講`git rebase`了,但很多都沒有提到應該要跟`git push --force-with-lease`一起使用。
11+
12+
在開始之前,如果你重來沒用過`rebase`[請服用](https://git-scm.com/docs/git-rebase)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
date: 2019-9-8
3+
tag:
4+
- Vue
5+
- VuePress
6+
- JavaScript
7+
---
8+
9+
# 透過插件 API 來深入了解 VuePress
10+
11+
12+
## 插件 ???
13+
14+
`Pluggable`是 VuePress 1.x 的最重大改變。VP 提供給開發者許多 API 來打造他們的插件,VP 本身的許多功能也是依靠插件化實現的。此外,`.vuepress/config.js``theme/index.js` 其實也都被視為插件。
15+
16+
我有天閃過一個想法,如果我了解了所有插件 API 的執行順序以及他到底做了什麼,或許這是一個特殊的方法來了解 VP 運作的來龍去脈。
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
date: 2020-1-1
3+
tag:
4+
- Npm
5+
- JavaScript
6+
---
7+
8+
# 創建 npm package 的注意事項
9+
10+
新年第一天來回顧我去年製作 npm package 犯的傻事,以下將列出三點可能會對你有幫助的注意事項。
11+
12+

0 commit comments

Comments
 (0)