Skip to content

Commit 9937407

Browse files
committedJan 17, 2020
rebuild to change sited
1 parent 28d02b3 commit 9937407

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed
 

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ TODOs.md
77
.idea
88
.vscode
99
dist
10-
private-config.js
10+
/private-config.js

‎coner.png

-34.8 KB
Binary file not shown.

‎config.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
module.exports = {
1+
const chalk = require("chalk");
2+
3+
let config = {
24
gitalk: {},
35
ga: ""
4-
};
6+
}
7+
8+
try{
9+
config = require('./private-config')
10+
}catch (e) {
11+
console.log(chalk.red('You are not owner of this project'));
12+
console.log(chalk.red('If you want use gitalk or google analysis,write configuration options in project-path/private-config.js '));
13+
}
14+
15+
module.exports = config;

‎docs/.vuepress/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
const CONFIG = require("../../private-config");
1+
const CONFIG = require("../../config");
22
module.exports = {
33
title: "CSS Tricks",
44
description: "some CSS tricks, 一些常用的 CSS 样式, 一点 CSS 技巧",
55
dest: "./dist",
6+
base: "/css_tricks/",
67
head: [
78
["link", { rel: "icon", href: "/images/favicon.png" }],
89
["meta", { name: "theme-color", content: "#00adb5" }],

‎docs/.vuepress/plugins/comment/initComment.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const CONFIG = require("../../../../private-config");
1+
const CONFIG = require("../../../../config");
22

33
export default function initComment() {
44
// if (location.host.indexOf("localhost") !== -1) {
@@ -12,7 +12,7 @@ export default function initComment() {
1212
body.appendChild(script);
1313
script.onload = () => {
1414
const commentConfig = Object.assign(CONFIG.gitalk, {
15-
id: window.location.pathname
15+
id: `/css_tricks/${location.pathname}`,
1616
});
1717
const gitalk = new Gitalk(commentConfig);
1818
gitalk.render("gitalk-container");

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@vuepress/plugin-back-to-top": "^1.0.0-rc.1",
2929
"@vuepress/plugin-google-analytics": "^1.0.0-rc.1",
3030
"@vuepress/plugin-nprogress": "^1.0.0-rc.1",
31+
"chalk": "^3.0.0",
3132
"element-ui": "^2.9.1",
3233
"gh-pages": "^2.0.1",
3334
"gitalk": "^1.5.0",

0 commit comments

Comments
 (0)
Please sign in to comment.