vuepress博客代码
This commit is contained in:
commit
2f39b17eea
|
|
@ -0,0 +1,3 @@
|
||||||
|
node_modules/
|
||||||
|
yarn.lock
|
||||||
|
yarn.error
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
module.exports = {
|
||||||
|
title: "vuepress-theme-reco",
|
||||||
|
description: 'A simple and beautiful vuepress blog theme .',
|
||||||
|
dest: 'public',
|
||||||
|
head: [
|
||||||
|
['link', { rel: 'icon', href: '/favicon.ico' }],
|
||||||
|
['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }]
|
||||||
|
],
|
||||||
|
theme: 'reco',
|
||||||
|
themeConfig: {
|
||||||
|
nav: [
|
||||||
|
{ text: 'Home', link: '/', icon: 'reco-home' },
|
||||||
|
{ text: 'TimeLine', link: '/timeline/', icon: 'reco-date' },
|
||||||
|
{ text: 'Docs',
|
||||||
|
icon: 'reco-message',
|
||||||
|
items: [
|
||||||
|
{ text: 'vuepress-reco', link: '/docs/theme-reco/' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ text: 'Contact',
|
||||||
|
icon: 'reco-message',
|
||||||
|
items: [
|
||||||
|
{ text: 'GitHub', link: 'https://github.com/recoluan', icon: 'reco-github' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
sidebar: {
|
||||||
|
'/docs/theme-reco/': [
|
||||||
|
'',
|
||||||
|
'theme',
|
||||||
|
'plugin',
|
||||||
|
'api'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
type: 'blog',
|
||||||
|
// 博客设置
|
||||||
|
blogConfig: {
|
||||||
|
category: {
|
||||||
|
location: 2, // 在导航栏菜单中所占的位置,默认2
|
||||||
|
text: 'Category' // 默认 “分类”
|
||||||
|
},
|
||||||
|
tag: {
|
||||||
|
location: 3, // 在导航栏菜单中所占的位置,默认3
|
||||||
|
text: 'Tag' // 默认 “标签”
|
||||||
|
}
|
||||||
|
},
|
||||||
|
friendLink: [
|
||||||
|
{
|
||||||
|
title: '午后南杂',
|
||||||
|
desc: 'Enjoy when you can, and endure when you must.',
|
||||||
|
email: '1156743527@qq.com',
|
||||||
|
link: 'https://www.recoluan.com'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'vuepress-theme-reco',
|
||||||
|
desc: 'A simple and beautiful vuepress Blog & Doc theme.',
|
||||||
|
avatar: "https://vuepress-theme-reco.recoluan.com/icon_vuepress_reco.png",
|
||||||
|
link: 'https://vuepress-theme-reco.recoluan.com'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
logo: '/logo.png',
|
||||||
|
// 搜索设置
|
||||||
|
search: true,
|
||||||
|
searchMaxSuggestions: 10,
|
||||||
|
// 自动形成侧边导航
|
||||||
|
// sidebar: 'auto',
|
||||||
|
// 最后更新时间
|
||||||
|
lastUpdated: 'Last Updated',
|
||||||
|
// 作者
|
||||||
|
author: 'reco_luan',
|
||||||
|
// 作者头像
|
||||||
|
authorAvatar: '/avatar.png',
|
||||||
|
// 备案号
|
||||||
|
record: 'xxxx',
|
||||||
|
// 项目开始时间
|
||||||
|
startYear: '2017'
|
||||||
|
/**
|
||||||
|
* 密钥 (if your blog is private)
|
||||||
|
*/
|
||||||
|
|
||||||
|
// keyPage: {
|
||||||
|
// keys: ['your password'],
|
||||||
|
// color: '#42b983',
|
||||||
|
// lineColor: '#42b983'
|
||||||
|
// },
|
||||||
|
|
||||||
|
/**
|
||||||
|
* valine 设置 (if you need valine comment )
|
||||||
|
*/
|
||||||
|
|
||||||
|
// valineConfig: {
|
||||||
|
// appId: '...',// your appId
|
||||||
|
// appKey: '...', // your appKey
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
markdown: {
|
||||||
|
lineNumbers: true
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 159 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
|
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
home: true
|
||||||
|
heroText: vuepress-theme-reco
|
||||||
|
tagline: A simple and beautiful vuepress blog theme.
|
||||||
|
# heroImage: /hero.png
|
||||||
|
# heroImageStyle: {
|
||||||
|
# maxWidth: '600px',
|
||||||
|
# width: '100%',
|
||||||
|
# display: block,
|
||||||
|
# margin: '9rem auto 2rem',
|
||||||
|
# background: '#fff',
|
||||||
|
# borderRadius: '1rem',
|
||||||
|
# }
|
||||||
|
bgImageStyle: {
|
||||||
|
height: '450px'
|
||||||
|
}
|
||||||
|
isShowTitleInHome: false
|
||||||
|
actionText: Guide
|
||||||
|
actionLink: /views/other/guide
|
||||||
|
features:
|
||||||
|
- title: Yesterday
|
||||||
|
details: 开发一款看着开心、写着顺手的 vuepress 博客主题
|
||||||
|
- title: Today
|
||||||
|
details: 希望帮助更多的人花更多的时间在内容创作上,而不是博客搭建上
|
||||||
|
- title: Tomorrow
|
||||||
|
details: 希望更多的爱好者能够参与进来,帮助这个主题更好的成长
|
||||||
|
---
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
title: first page in category1
|
||||||
|
date: 2018-12-15
|
||||||
|
tags:
|
||||||
|
- tag1
|
||||||
|
categories:
|
||||||
|
- category1
|
||||||
|
---
|
||||||
|
|
||||||
|
first page in category1
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
title: second page in category1
|
||||||
|
date: 2019-09-21
|
||||||
|
tags:
|
||||||
|
- tag2
|
||||||
|
categories:
|
||||||
|
- category1
|
||||||
|
---
|
||||||
|
|
||||||
|
second page in category1
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
title: first page in category2
|
||||||
|
date: 2016-12-15
|
||||||
|
tags:
|
||||||
|
- tag3
|
||||||
|
categories:
|
||||||
|
- category2
|
||||||
|
---
|
||||||
|
|
||||||
|
first page in category2
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
title: second page in category2
|
||||||
|
date: 2017-09-21
|
||||||
|
tags:
|
||||||
|
- tag4
|
||||||
|
categories:
|
||||||
|
- category2
|
||||||
|
---
|
||||||
|
|
||||||
|
second page in category2
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
---
|
||||||
|
title: vuepress-theme-reco
|
||||||
|
date: 2019-04-09
|
||||||
|
---
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
::: tip 介绍
|
||||||
|
1. 这是一个vuepress主题,旨在添加博客所需的分类、TAB墙、分页、评论等能;<br>
|
||||||
|
2. 主题追求极简,根据 vuepress 的默认主题修改而成,官方的主题配置仍然适用;<br>
|
||||||
|
3. 你可以打开 [午后南杂](http://recoluan.gitlab.io) 来查看效果。
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Use
|
||||||
|
|
||||||
|
**Build**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# or
|
||||||
|
|
||||||
|
yarn build
|
||||||
|
```
|
||||||
|
|
||||||
|
**Server**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# or
|
||||||
|
|
||||||
|
yarn dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Play Together
|
||||||
|
|
||||||
|
### 0.x
|
||||||
|
|
||||||
|
`vuepress-theme-reco@0.x` 是基于 `vuepress@0.x` 的博客主题。
|
||||||
|
|
||||||
|
`vuepress@0.x` 功能比较简单,只适合书写简单的文档,但好在支持主题自定义,而个人又希望能够用它来书写博客,原因就是它足够的简洁,毫无疑问,这也符合很多程序员的观念,也就是在这种情况下,`vuepress-theme-reco@0.x` 的第一个版本经过一个通宵而产生。
|
||||||
|
|
||||||
|
主题开源不久,很多朋友通过各种联系方式,给到很多好的意见和建议,所以我个人也在积极地更新。
|
||||||
|
|
||||||
|
因为我是一名前端开发工程师,开发的过程中,总是想着能不能加入一些炫酷的效果,有很多次都是添加上又去掉,反反复复,最后都是被 **简洁** 的这个原则阻止掉,毕竟,现在我是将它当作一个产品来看待,并不是一个技术或者是技巧的尝试项目。
|
||||||
|
|
||||||
|
### 1.x
|
||||||
|
|
||||||
|
随着不断有用户过来询问:为什么 `vuepress-theme-reco@0.x` 不能在 `vuepress@1.x` 上使用?本来只是打算对 `vuepress-theme-reco@0.x` 进行简单的bug修复的我,终究还是忍不住,开始了 `vuepress-theme-reco@1.x` 的开发。又是在一个寂静的凌晨两点半(晚上就是出活快),我默默地开始了。
|
||||||
|
|
||||||
|
主题升级的关键也就是 `@vuepress/plugin-blog` 这款官方插件,它不需要再去麻烦地过滤数据,将分类和标签的相关信息直接存在 `$categories` 和 `$tags` 这两个全局变量中。借助于 `@vuepress/plugin-blog`,分类和标签功能更容易实现,但也有了一些局限。接下来两三天的时间,都是在进行功能的迁移和一些bug的修复。
|
||||||
|
|
||||||
|
`vuepress-theme-reco@0.x` 的开发中,更加深刻地明白了模块化和组件化编程的重要性,如果当初没有把一些功能进行封装,而是直接简单的复制,这次升级也不会这么顺利。模块拆分的越细,使用就会越灵活。
|
||||||
|
|
||||||
|
### CLI
|
||||||
|
|
||||||
|
还是衷心地希望能有更多的朋友参与进来,更快地去完善它。接下来时间允许的情况下,我会开源一款自动生成博客的脚手架,略过配置步骤,直接书写优质内容,这也是我后来逐渐形成的一种信念,就是希望能让这款主题,功能越完善,使用越来越简单。
|
||||||
|
|
||||||
|
## License
|
||||||
|
[MIT](https://github.com/recoluan/vuepress-theme-reco/blob/master/LICENSE)
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: theme-reco
|
||||||
|
date: 2020-05-29
|
||||||
|
---
|
||||||
|
|
||||||
|
This is theme-reco.
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: api
|
||||||
|
date: 2020-05-29
|
||||||
|
---
|
||||||
|
|
||||||
|
This is api.
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: plugin
|
||||||
|
date: 2020-05-28
|
||||||
|
---
|
||||||
|
|
||||||
|
This is plugin.
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: theme
|
||||||
|
date: 2020-05-27
|
||||||
|
---
|
||||||
|
|
||||||
|
This is theme.
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"name": "vuepress-theme-reco-demo",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": "reco_luan",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vuepress dev . --open --host \"localhost\"",
|
||||||
|
"build": "vuepress build ."
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"vuepress": "1.9.7",
|
||||||
|
"vuepress-theme-reco": "1.6.17"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue