-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e5c3f7b
Showing
55 changed files
with
21,707 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next | ||
|
||
# VuePress build output | ||
docs/.vuepress/dist/ | ||
.aliossrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": false, | ||
"arrowParens": "always", | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"editor.detectIndentation": false, | ||
"editor.tabSize": 2, | ||
"editor.formatOnSave": true, | ||
"eslint.autoFixOnSave": true, | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
{ | ||
"language": "vue", | ||
"autoFix": true | ||
} | ||
], | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"endOfLine": "lf" | ||
} | ||
], | ||
"prettier.semi": true, | ||
"prettier.singleQuote": true, | ||
"javascript.format.insertSpaceBeforeFunctionParenthesis": true, | ||
"vetur.format.defaultFormatter.html": "js-beautify-html", | ||
"vetur.format.defaultFormatter.js": "vscode-typescript", | ||
"vetur.format.defaultFormatterOptions": { | ||
"js-beautify-html": { | ||
"wrap_attributes": "auto" | ||
}, | ||
"prettyhtml": { | ||
"printWidth": 200, | ||
"singleQuote": false, | ||
"wrapAttributes": false, | ||
"sortAttributes": true | ||
} | ||
}, | ||
"vetur.format.defaultFormatter.ts": "vscode-typescript", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# blog | ||
Tookit's personal blog |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
module.exports = { | ||
title: 'Tookit', | ||
description: "📦 🎨 Tookit's blog", | ||
// theme: 'vuepress-theme-neptune', | ||
theme: require.resolve('../../theme-neptune'), // 使用本地主题 | ||
themeConfig: { | ||
nav: { | ||
'/': [ | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Vue', link: '/_posts/vue' } | ||
], | ||
'/zh/': [ | ||
{ text: '首页', link: '/zh' }, | ||
{ text: 'Vue', link: '/zh/_post/vue' } | ||
] | ||
}, | ||
sidebar: { | ||
'/': [ | ||
{ | ||
header: 'Categories' | ||
}, | ||
{ | ||
text: 'Vue', | ||
icon: 'mdi-vuejs', | ||
path: '/posts/categories/vue', | ||
to: '/posts/categories/vue.html' | ||
} | ||
], | ||
'/zh/': [ | ||
{ | ||
header: '分类' | ||
} | ||
// { | ||
// text: 'Blog', | ||
// path: '/blog/', | ||
// to: '/blog/', | ||
// children: [ | ||
// { | ||
// text: 'Vuepress theme with vuetify', | ||
// path: '/build-a-vuepress-theme-with-vuetify', | ||
// to: 'build-a-vuepress-theme-with-vuetify' | ||
// } | ||
// ] | ||
// } | ||
] | ||
}, | ||
valine: { | ||
appId: 'dFNEgQoCyMKnaV5FIR137JsC-gzGzoHsz', | ||
appKey: '38ehraSP02NclWAHpTIpVl77' | ||
} | ||
}, | ||
locales: { | ||
'/': { | ||
lang: 'en', | ||
name: 'English', | ||
title: 'Tookit', | ||
description: 'Tookit personal blog', | ||
flag: '/img/en.png' | ||
}, | ||
'/zh/': { | ||
lang: 'zh', | ||
name: '简体中文', | ||
title: 'Tookit', | ||
description: 'Tookit 个人站点', | ||
flag: '/img/zh.png' | ||
} | ||
}, | ||
|
||
plugins: [ | ||
[ | ||
'@vuepress/google-analytics', | ||
{ | ||
ga: 'UA-3881136-7' | ||
} | ||
] | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
home: true | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
layout: category | ||
title: category | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "Laravel" | ||
lang: en-US | ||
category: Laravel | ||
layout: Category | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
category: Laravel | ||
title: Create a rest api by laravel 8 | ||
layout: Article | ||
image: https://lh3.googleusercontent.com/DAeLGsE71e2dNbcIr51s4ZGr-Z_CnrhW-wa50u8H2vO_jJ6zYovMU-RIR7bgKYz4Q3ru_L5qmp6rHfThDj9mktyZvGwTM6i3LA5dAg=w760-h360 | ||
--- | ||
|
||
|
||
## Init Project | ||
|
||
``` javascript{4} | ||
export default { | ||
data () { | ||
return { | ||
msg: 'Highlighted!' | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Create database vma and update env | ||
|
||
|
||
## Add some awesome package | ||
|
||
- tymon/jwt-auth (JWT authenticate) | ||
- spatie/laravel-permission (ACL/Access control) | ||
- spatie/laravel-query-builder( Build generic api query) | ||
- spatie/laravel-valuestore (for general setting) | ||
|
||
``` bash | ||
composer require tymon/jwt-auth | ||
composer require spatie/laravel-permission | ||
composer require spatie/laravel-query-builder | ||
composer require spatie/laravel-valuestore | ||
|
||
``` | ||
|
||
## configure package | ||
|
||
```bash | ||
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider" | ||
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" | ||
php artisan vendor:publish --provider="Spatie\QueryBuilder\QueryBuilderServiceProvider" | ||
|
||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
category: Laravel | ||
title: Learn Laravel | ||
layout: Article | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
layout: Category | ||
category: Rust | ||
title: Rust | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "Vue" | ||
lang: en-US | ||
category: Vue | ||
date: "2019-12-12" | ||
layout: Category | ||
--- |
114 changes: 114 additions & 0 deletions
114
docs/_posts/vue/build-a-vuepress-theme-with-vuetify-ep1.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
--- | ||
title: 'Build a vuepress theme with vuetify' | ||
lang: en-US | ||
category: Vue | ||
layout: Article | ||
date: '2019-12-12' | ||
--- | ||
|
||
If we want to integrate vuetify with vuepress, we need configure vupress webpack-chain to enable load vuetiy's sass/scss file. | ||
|
||
More details please check | ||
([Vuetify quick start](https://vuetifyjs.com/en/getting-started/quick-start/)) | ||
|
||
## Requirement | ||
- sass | ||
- sass-loader | ||
- fibers | ||
|
||
## Theme Structure | ||
|
||
Just follow the offical doc, how to [Writing a them](https://vuepress.vuejs.org/theme/writing-a-theme.html) | ||
|
||
``` bash | ||
theme | ||
├── `global-components` | ||
│ └── xxx.vue | ||
├── `components` | ||
│ └── xxx.vue | ||
├── `layouts` | ||
│ ├── Layout.vue _(**Mandatory**)_ | ||
│ └── 404.vue | ||
├── `styles` | ||
│ ├── index.styl | ||
│ └── palette.styl | ||
├── `templates` | ||
│ ├── dev.html | ||
│ └── ssr.html | ||
├── `index.js` | ||
├── `enhanceApp.js` | ||
└── package.json | ||
``` | ||
## Key Point | ||
|
||
The main issue is to configure webpack-chain to load `sass/scss` file | ||
|
||
```javascript | ||
// theme/index.js | ||
const path = require('path') | ||
// Theme API. | ||
module.exports = (options, ctx) => { | ||
return { | ||
chainWebpack: config => { | ||
config.module | ||
.rule('sass') | ||
.oneOf('normal') | ||
.use('sass-loader') | ||
.loader('sass-loader') | ||
.options({ | ||
implementation: require('sass'), | ||
sassOptions: { | ||
fiber: require('fibers'), | ||
indentedSyntax: true, // optional | ||
}, | ||
}) | ||
.end() | ||
}, | ||
... | ||
} | ||
} | ||
|
||
``` | ||
|
||
## Import vuetify | ||
|
||
Import the vuetify components/directives that which we need in the theme | ||
|
||
```javascript | ||
import Vuetify, { | ||
VApp, | ||
VNavigationDrawer, | ||
... | ||
} from 'vuetify/lib' | ||
import './style/theme.sass' | ||
import { Ripple, Scroll } from 'vuetify/lib/directives' | ||
import zhHans from 'vuetify/es5/locale/zh-Hans' | ||
import en from 'vuetify/es5/locale/en' | ||
import postsMixin from '@theme/mixins/posts' | ||
|
||
export default ({ | ||
Vue, // the version of Vue being used in the VuePress app | ||
options, // the options for the root Vue instance | ||
router, // the router instance for the app | ||
siteData, // site metadata | ||
}) => { | ||
Vue.use(Vuetify, { | ||
components: { | ||
VApp, | ||
VNavigationDrawer, | ||
... | ||
}, | ||
directives: { | ||
Ripple, | ||
Scroll, | ||
}, | ||
}) | ||
options.vuetify = new Vuetify({ | ||
lang: { | ||
locales: { zhHans, en }, | ||
current: 'en', | ||
}, | ||
}) | ||
} | ||
``` | ||
|
Oops, something went wrong.