修复bug

This commit is contained in:
xugaoyi 2020-05-14 17:03:57 +08:00
parent 6505994162
commit 7c4ae0ea28
11 changed files with 85 additions and 179 deletions

143
README.MD
View File

@ -16,75 +16,21 @@
[Evan's blog](https://xugaoyi.com/) | [效果图](https://xugaoyi.com/pages/d557b9a89a215d2e) | [指南 (必读)](https://github.com/xugaoyi/vuepress-theme-vdoing/issues/350)
温馨提示目前并非稳定版因此功能和文档可能会有调整。欢迎star持续关注一定会有惊喜哟🎉
> <https://b.xugaoyi.com/> ←此版本正在开发和测试中,源码未发布,敬请期待!
## 初衷
这个主题的初衷是打造一个 `结构化` 与 `碎片化` 并存的个人`知识库`。[详情](https://github.com/xugaoyi/vuepress-theme-vdoing/issues/339)
如果你有什么建议欢迎提**Issues**,喜欢这个项目的欢迎点个**Star**持续关注。
[使用文档](https://xugaoyi.github.io/vuepress-theme-vdoing-doc/) | [Evan's blog](https://xugaoyi.com/)
## 介绍
1. 根据 [VuePress](https://vuepress.vuejs.org/zh/) 的默认主题修改而成,仍以官方配置为主,追求`简洁`同时又不失`美观`。
2. 这是一个兼具 `知识管理` & `博客文章` & `技术文档` 的主题。
3. 一个`结构化的知识库`,形成一本本像书一样清晰易读的知识库。同时博客功能提供一种`碎片化`形态。
4. 添加方便管理学习笔记和技术文档的 `自动生成结构化侧边栏`、`自动生成front matter`、`目录页`、`扩展的搜索框插件`、`面包屑`、`快捷翻页按钮` 等,让你快速定位到任何你想要找的内容
<details>
<summary>查看文档</summary>
<ul>
<li><b>自动生成结构化侧边栏</b> 让你拥有一个结构清晰的侧边栏,无需手动配置。<br/>
<a href="https://github.com/xugaoyi/vuepress-theme-vdoing/issues/113">构建结构化站点的核心配置和约定</a>
</li>
<li><b>自动生成front matter</b> 助你专注于写作,你无需给每个.md文件都手写front matter。<br/>
<a href="https://github.com/xugaoyi/vuepress-theme-vdoing/issues/324">自动生成front matter</a>
</li>
<li>简单的<b>目录页</b>配置,查看 <a href="https://github.com/xugaoyi/vuepress-theme-vdoing/issues/330">目录页配置</a>
</li>
<li>
可以添加第三方搜索链接的<a href="https://github.com/xugaoyi/vuepress-plugin-thirdparty-search">扩展的搜索框插件</a>,提高搬砖效率。
</li>
<li>
<b>面包屑</b>和<b>快捷翻页按钮</b>内置于主题,无需配置。(面包屑数据依赖于自动生成的结构化侧边栏)
</li>
</ul>
</details>
1. 这个主题的初衷是打造一个好用的程序员`知识管理工具`
2. 一个`结构化`的知识库,让你的知识海洋像一本本书一样清晰易读。
3. 博客功能提供一种知识的`碎片化`形态,并支持个性化博客配置。
4. `简洁高效`,以 Markdown 为中心的项目结构,内置自动化工具,以更少的配置完成更多的事。配合多维索引快速定位每个知识点。
5. 添加博客相关的 `文章信息栏(作者与创建时间)`、`最近更新栏` 、`博主信息栏`、`页脚版权栏`、`时间轴+分类页`、`评论插件`等。
<details>
<summary>查看文档</summary>
<ul>
<li>
文章信息栏(作者与创建时间)、最近更新栏、博主信息栏和页脚版权栏等在
<a href="https://github.com/xugaoyi/vuepress-theme-vdoing/issues/343">config.js配置</a>
</li>
<li>
<a href="https://github.com/xugaoyi/vuepress-theme-vdoing/issues/331">时间轴+分类 页面配置</a>
</li>
<li>
<a href="https://github.com/dongyuanxin/vuepress-plugin-comment">评论栏插件</a>
</li>
</ul>
</details>
6. 首页样式美化
## 这个主题可以做什么?
* 案例1[知识库兼博客站](https://xugaoyi.com/)
* 案例2仅知识库(暂无案例)
* 案例3[仅博客站](https://xugaoyi.github.io/vdoing-demo-blog/)
* 案例4[文档站](https://xugaoyi.github.io/vuepress-theme-vdoing-doc/)
[首页配置](https://github.com/xugaoyi/vuepress-theme-vdoing/issues/338)
7. 多种颜色模式供用户选择:`跟随系统`、`浅色模式`、`深色模式`、`阅读模式`
[palette.styl主题调色板使用说明](https://github.com/xugaoyi/vuepress-theme-vdoing/issues/345)
8. 提高搬砖效率的辅助工具: [批量操作front matter工具](https://github.com/xugaoyi/vuepress-theme-vdoing/issues/351)
## 快速上手
@ -102,73 +48,10 @@ npm install # or yarn install
npm run dev # or yarn dev
```
## 插件
推荐几款插件
1. 对*前端程序员*很友好`Demo演示模块插件`很方便的在博客中插入demo同时可以查看demo源码跳转到codepen在线编辑。
[vuepress-plugin-demo-block](https://www.npmjs.com/package/vuepress-plugin-demo-block)
2. 代码块一键复制插件
[vuepress-plugin-one-click-copy](https://www.npmjs.com/package/vuepress-plugin-one-click-copy)
3. 可以添加第三方搜索链接的搜索框插件
[vuepress-plugin-thirdparty-search](https://github.com/xugaoyi/vuepress-plugin-thirdparty-search)
4. 百度推送和统计插件
[vuepress-plugin-baidu-autopush](https://www.npmjs.com/package/vuepress-plugin-baidu-autopush)
[vuepress-plugin-baidu-tongji](https://www.npmjs.com/package/vuepress-plugin-baidu-tongji)
5. 更多插件查看官方[Awesome VuePress](https://github.com/vuepressjs/awesome-vuepress)
## 部署
内置 `deploy.sh` 和 [GitHub Actions](https://github.com/features/actions) 两种`自动部署`脚本,一键发布到 GitHub Pages 或 国内访问速度更快的Coding Pages。
[自动部署到 github 或 coding](https://github.com/xugaoyi/vuepress-theme-vdoing/issues/325)
## 其他
1. 评论模块的搭建
[使用Gitalk实现静态博客无后台评论系统](https://xugaoyi.com/pages/1da0bf9a988eafe5/)
2. 自定义域名及解析,[详情](https://github.com/xugaoyi/vuepress-theme-vdoing/issues/326)
3. SEO相关
```js
// config.js
module.exports = {
description: '填写网站描述', // 以 <meta> 标签渲染到页面html中
head: [ // 注入到页面<head> 中的标签,[tagName, { attrName: attrValue }]
['meta', { name: 'keywords', content: '填写关键字'}]
]
}
```
4. 图床
[GitHub + jsDelivr + TinyPNG+ PicGo 打造稳定快速、高效免费图床](https://xugaoyi.com/pages/a5f73af5185fdf0a/)
5. 结合GitHub Actions开发的每天定时百度推送加快收录
[GitHub Actions 定时运行代码:每天定时百度链接推送](https://xugaoyi.com/pages/f44d2f9ad04ab8d3/)
6. 在线编辑和新增文章的方法,[详情](https://github.com/xugaoyi/vuepress-theme-vdoing/issues/327)
## 支持
如果你觉得这个项目帮助到了你可以为作者贡献一杯82年的雪碧🍸。你任何形式的支持都是对我的肯定我会坚持初心把这个项目做得更好。
你任何形式的支持都是对我的肯定,我会坚持初心把这个项目做得更好。当然,你的支持力度越大我会越开心,哈哈😀~~
如果你觉得这个项目对你有帮助,可以给作者打赏一杯咖啡☕
| Wechat | Alipay |
| :---: | :---: |
| <img src="https://cdn.jsdelivr.net/gh/xugaoyi/image_store/blog/20200410113708.jpg" alt="Wechat QRcode" width=180>| <img src="https://cdn.jsdelivr.net/gh/xugaoyi/image_store/blog/20200410113707.jpg" alt="Alipay QRcode" width=180> |

View File

@ -26,15 +26,15 @@ git commit -m "${msg}"
git push -f $githubUrl master:gh-pages # 推送到github
# deploy to coding
# echo 'www.xugaoyi.com\nxugaoyi.com' > CNAME # 自定义域名
# if [ -z "$CODING_TOKEN" ]; then # -z 字符串 长度为0则为true$CODING_TOKEN来自于github仓库`Settings/Secrets`设置的私密环境变量
# codingUrl=git@e.coding.net:xgy/xgy.git
# else
# codingUrl=https://HmuzsGrGQX:${CODING_TOKEN}@e.coding.net/xgy/xgy.git
# fi
# git add -A
# git commit -m "${msg}"
# git push -f $codingUrl master # 推送到coding
echo 'www.xugaoyi.com\nxugaoyi.com' > CNAME # 自定义域名
if [ -z "$CODING_TOKEN" ]; then # -z 字符串 长度为0则为true$CODING_TOKEN来自于github仓库`Settings/Secrets`设置的私密环境变量
codingUrl=git@e.coding.net:xgy/xgy.git
else
codingUrl=https://HmuzsGrGQX:${CODING_TOKEN}@e.coding.net/xgy/xgy.git
fi
git add -A
git commit -m "${msg}"
git push -f $codingUrl master # 推送到coding
cd - # 退回开始所在目录
rm -rf docs/.vuepress/dist

View File

@ -34,31 +34,29 @@ module.exports = {
editLinkText: '编辑',
// 以下配置是Vdoing主题改动的和新增的配置
sidebar: 'structuring', // 侧边栏 'structuring' | { mode: 'structuring', collapsable: Boolean} | 'auto' | 自定义 温馨提示:目录页数据依赖于结构化的侧边栏数据,如果你不设置为'structuring',将无法使用目录页
// sidebarOpen: false, // 初始状态是否打开侧边栏默认true
// updateBar: { // 最近更新栏
// showToArticle: true, // 显示到文章页底部默认true
// moreArticle: '/archives' // “更多文章”跳转的页面,默认'/archives'
// },
// titleBadge: false, // 文章标题前的图标是否显示默认true
// titleBadgeIcons: [ // 文章标题前图标的地址,默认主题内置图标
// '图标地址1',
// '图标地址2'
// ],
// category: false, // 是否打开分类功能默认true。 如打开会做的事情有1. 自动生成的frontmatter包含分类字段 2.页面中显示与分类相关的信息和模块 3.自动生成分类页面(在@pages文件夹。如关闭则反之。
// tag: false, // 是否打开标签功能默认true。 如打开会做的事情有1. 自动生成的frontmatter包含标签字段 2.页面中显示与标签相关的信息和模块 3.自动生成标签页面(在@pages文件夹。如关闭则反之。
// archive: false, // 是否打开归档功能默认true。 如打开会做的事情有1.自动生成归档页面(在@pages文件夹。如关闭则反之。
// categoryText: '随笔', // 碎片化文章_posts文件夹的文章预设生成的分类值默认'随笔'
// bodyBgImg: [
// 'https://cdn.jsdelivr.net/gh/xugaoyi/image_store/blog/20200507175828.jpeg',
// 'https://cdn.jsdelivr.net/gh/xugaoyi/image_store/blog/20200507175845.jpeg',
// 'https://cdn.jsdelivr.net/gh/xugaoyi/image_store/blog/20200507175846.jpeg'
// ], // body背景大图默认无。 单张图片 String || 多张图片 Array, 多张图片时每隔15秒换一张。
// titleBadge: false, // 文章标题前的图标是否显示默认true
// titleBadgeIcons: [ // 文章标题前图标的地址,默认主题内置图标
// '图标地址1',
// '图标地址2'
// ],
sidebar: 'structuring', // 侧边栏 'structuring' | { mode: 'structuring', collapsable: Boolean} | 'auto' | 自定义 温馨提示:目录页数据依赖于结构化的侧边栏数据,如果你不设置为'structuring',将无法使用目录页
// sidebarOpen: false, // 初始状态是否打开侧边栏默认true
// updateBar: { // 最近更新栏
// showToArticle: true, // 显示到文章页底部默认true
// moreArticle: '/archives' // “更多文章”跳转的页面,默认'/archives'
// },
// categoryText: '随笔', // 碎片化文章_posts文件夹的文章预设生成的分类值默认'随笔'
// category: false, // 是否打开分类功能默认true。 如打开会做的事情有1. 自动生成的frontmatter包含分类字段 2.页面中显示与分类相关的信息和模块 3.自动生成分类页面(在@pages文件夹。如关闭则反之。
// tag: false, // 是否打开标签功能默认true。 如打开会做的事情有1. 自动生成的frontmatter包含标签字段 2.页面中显示与标签相关的信息和模块 3.自动生成标签页面(在@pages文件夹。如关闭则反之。
// archive: false, // 是否打开归档功能默认true。 如打开会做的事情有1.自动生成归档页面(在@pages文件夹。如关闭则反之。
author: { // 文章默认的作者信息可在md文件中单独配置此信息 String | {name: String, href: String}
name: 'Evan Xu', // 必需
href: 'https://github.com/xugaoyi' // 可选的

View File

@ -5,7 +5,7 @@ module.exports = [
link: '/web/', //目录页vdoing主题新增的配置项有二级导航时可以点击一级导航跳到目录页
items: [
{text: '前端文章', items: [
{text: 'JavaScript', link: '/pages/8143cc480faf9a11/'},
{text: 'JavaScript', link: '/pages/8143cc480faf9a11/'}, // 注意link结尾有斜杠和没有斜杠的区别
{text: 'Vue', link: '/pages/802a1ca6f7b71c59/'},
]},
{text: '学习笔记', items:[

View File

@ -4,6 +4,8 @@
//***vdoing-***//
// //
// $bannerTextColor = #fff // 首页banner区()
// $accentColor = #11A8CD
// $arrowBgColor = #ccc
// $badgeTipColor = #42b983
@ -14,48 +16,47 @@
// $navbarHeight = 3.6rem
// $sidebarWidth = 18rem
// $contentWidth = 860px
// $homePageWidth = 1080px
// $homePageWidth = 1100px
// $rightMenuWidth = 230px //
// //
// $lineNumbersWrapperWidth = 2.5rem
// //
// $cardLayout = 1200px //
// //
// .theme-mode-light
// --bg: #fff
// --badyBg: #f4f4f4
// --mainBg: rgba(255,255,255,1)
// --sidebarBg: rgba(255,255,255,.8)
// --blurBg: rgba(255,255,255,.9)
// --textColor: #004050
// --textLightenColor: #0085AD
// --sidebarBg: rgba(255,255,255,.85)
// --pageBg: rgba(220,220,220,0.2)
// --borderColor: rgba(0,0,0,.15)
// --codeBgColor: #f6f6f6
// --codeBg: #f6f6f6
// --codeColor: #525252
// codeThemeLight()
// //
// .theme-mode-dark
// --bg: rgb(30,30,34)
// --textColor: rgb(150,150,154)
// --badyBg: rgb(39,39,43)
// --mainBg: rgba(30,30,34,1)
// --sidebarBg: rgba(30,30,34,.8)
// --blurBg: rgba(30,30,34,.8)
// --textColor: rgb(140,140,150)
// --textLightenColor: #0085AD
// --sidebarBg: rgba(120,120,120,.1)
// --pageBg: rgba(120,120,120,.1)
// --borderColor: #2C2C3A
// --codeBgColor: #252526
// --codeBg: #252526
// --codeColor: #fff
// codeThemeDark()
// //
// .theme-mode-read
// --bg: #f5f5d5
// --badyBg: rgb(240,240,208)
// --mainBg: rgba(245,245,213,1)
// --sidebarBg: rgba(245,245,213,.8)
// --blurBg: rgba(245,245,213,.9)
// --textColor: #004050
// --textLightenColor: #0085AD
// --sidebarBg: #f5f5d5
// --pageBg: rgba(220,220,220,0.1)
// --borderColor: rgba(0,0,0,.15)
// --codeBgColor: #282c34
// --codeBg: #282c34
// --codeColor: #fff
// codeThemeDark()

View File

@ -1 +1,11 @@
---
title: CSS-function汇总
date: 2020-05-12 09:36:44
permalink: /pages/3da0d7
categories:
- 页面
- CSS
tags:
-
---
![](https://cdn.jsdelivr.net/gh/xugaoyi/image_store/blog/20200512161232.jpg)

View File

@ -11,6 +11,7 @@
"license": "MIT",
"devDependencies": {
"inquirer": "^7.1.0",
"json2yaml": "^1.1.0",
"moment": "^2.25.3",
"vuepress": "^1.4.1",
"vuepress-plugin-baidu-autopush": "^1.0.1",

View File

@ -56,7 +56,7 @@ export default {
getPageInfo() {
const pageInfo = this.$page
const { relativePath } = pageInfo
const { catalogue } = this.$themeConfig.sidebar
const { sidebar } = this.$themeConfig
//
const relativePathArr = relativePath.split('/')
@ -64,7 +64,8 @@ export default {
const classify1 = classifyArr.length > 1 ? classifyArr[1] : classifyArr[0] //
const classify2 = relativePathArr.length > 2 ? relativePathArr[1].split('.')[1] : undefined//
const cataloguePermalink = catalogue ? catalogue[classify1] : undefined//
const cataloguePermalink = sidebar && sidebar.catalogue ? sidebar.catalogue[classify1] : undefined//
const author = this.$frontmatter.author || this.$themeConfig.author //
let date = (pageInfo.frontmatter.date || '').split(' ')[0] //

View File

@ -388,6 +388,7 @@ export default {
padding-bottom 0
p
opacity 0.8
padding 0 .8rem
.feature:hover
.feature-img
animation-play-state: running
@ -421,6 +422,9 @@ export default {
font-weight 500
border-bottom none
padding-bottom 0
p
opacity 0.8
padding 0 .8rem
.docs-wrapper
position absolute
bottom 25px

View File

@ -1,6 +1,6 @@
{
"name": "vuepress-theme-vdoing",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.6",
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
"author": {
"name": "gaoyi(Evan) Xu"

View File

@ -178,6 +178,14 @@ h1, h2, h3, h4, h5, h6
&:hover .header-anchor
opacity: 1
// h1
p,pre,.custom-block
{$contentClass}:not(.custom) > &
&:first-child
margin-top 2rem
h1
font-size 1.8rem
{$contentClass}:not(.custom) > & // h1