diff --git a/.gitignore b/.gitignore index 3c3629e..76efb07 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +.vscode diff --git a/README.md b/README.md index 9109362..c0ca7c6 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,10 @@ git clone https://github.com/HCLonely/hexo-theme-webstack themes/webstack ## Configuration +Copy the `_config.yml` file in the `themes/webstack/` directory to the `rootDir/source/_data/` directory and rename it to `webstack.yml`. + +Configure it by editing `webstack.yml`. + ### favicon > Website icon. @@ -57,7 +61,7 @@ logo: Examples: ```yml -flag: +flag: icon: flag-cn name: Chinese ``` @@ -158,7 +162,7 @@ type: 'about' Examples: ```yml aboutPage: - website: + website: head: 关于本站 html: '

本站是hexo主题hexo-theme-webstack的demo站。

' webmaster: @@ -170,6 +174,42 @@ aboutPage: html: '

本站是HCLonely基于WebStackPage项目做的一款Hexo主题。

' ``` +### busuanzi + +> Website statistics by busuanzi. + +- enable: Whether to enable this feature. +- position: The number of visits is displayed, `footer` is displayed in the footer, and `sidebar` is displayed in the sidebar. +- pv: The number of visits displayed by the traffic, `$pv` will be replaced by the number of visits. +- uv: The number of visitors displayed, `$uv` will be replaced by the number of visitors. + +Examples: +```yml +busuanzi: + enable: true + position: sidebar + pv: 本站总访问量$pv + uv: 本站总访客数$uv +``` + +### custom + +> Customize `html` content. + +- head: Content inserted into the `` tag. +- body: Content inserted before the `` tag. + +Examples: +```yml +custom: + head: |- # The following content is inserted into the tag, you can set up multiple lines, pay attention to at least four spaces at the beginning of each line. + + + body: |- # Insert the following content before the tag, you can set multiple lines, pay attention to at least four spaces at the beginning of each line. +
custom text
+ +``` + ## config > [Main] Website content settings diff --git a/README_CN.md b/README_CN.md index dac02e9..1ce054e 100644 --- a/README_CN.md +++ b/README_CN.md @@ -12,6 +12,10 @@ git clone https://github.com/HCLonely/hexo-theme-webstack themes/webstack ## 配置 +将`themes/webstack/`目录内的`_config.yml`文件复制到`博客根目录/source/_data/`目录内,并重命名为`webstack.yml`. + +通过编辑`webstack.yml`进行配置。 + ### favicon > 网站图标 @@ -55,7 +59,7 @@ logo: 示例: ```yml -flag: +flag: icon: flag-cn name: Chinese ``` @@ -156,7 +160,7 @@ type: 'about' 示例: ```yml aboutPage: - website: + website: head: 关于本站 html: '

本站是hexo主题hexo-theme-webstack的demo站。

' webmaster: @@ -168,6 +172,42 @@ aboutPage: html: '

本站是HCLonely基于WebStackPage项目做的一款Hexo主题。

' ``` +### busuanzi + +> 不蒜子统计 + +- enable: 是否启用不蒜子统计 +- position: 访问量显示位置, `footer`显示在页脚, `sidebar`显示在侧边栏 +- pv: 访问量显示的内容, `$pv`会被替换为访问量 +- uv: 访客数显示的内容, `$uv`会被替换为访客数 + +示例: +```yml +busuanzi: + enable: true + position: sidebar + pv: 本站总访问量$pv + uv: 本站总访客数$uv +``` + +### custom + +> 自定义`html`内容 + +- head: 插入到``标签内的内容 +- body: 插入到``标签之前的内容 + +示例: +```yml +custom: + head: |- # 以下内容插入到标签内,可设置多行,注意每行开头至少四个空格 + + + body: |- # 以下内容插入到标签之前,可设置多行,注意每行开头至少四个空格 +
custom text
+ +``` + ## config > [主要]网站内容设置 @@ -224,6 +264,6 @@ hotTools: description: 面向开源及私有软件项目的托管平台。 ``` -以上两种方式任选一种即可,建议使用第二种。 +> 以上两种方式任选一种即可,建议使用第二种。 [配置详情](https://blog.hclonely.com/posts/3cd4fb34/) diff --git a/_config.yml b/_config.yml index 7d05bc0..e2cbce3 100644 --- a/_config.yml +++ b/_config.yml @@ -79,7 +79,23 @@ aboutPage: since: 2020 +busuanzi: + enable: true + position: sidebar # 'footer','sidebar' + pv: 本站总访问量$pv + uv: 本站总访客数$uv + +custom: + head: |- # 以下内容插入到标签内,可设置多行,注意每行开头至少四个空格 + + + body: |- # 以下内容插入到标签之前,可设置多行,注意每行开头至少四个空格 + + + js: + header: /js/header.js + footer: /js/footer.js jquery: /js/jquery-1.11.1.min.js bootstrap: /js/bootstrap.min.js TweenMax: /js/TweenMax.min.js @@ -93,6 +109,7 @@ js: respond: /js/respond.min.js css: + hclonely: /css/hclonely.css fonts: //fonts.loli.net/css?family=Arimo:400,700,400italic linecons: /css/fonts/linecons/css/linecons.min.css fontawesome: /css/fonts/fontawesome/css/all.min.css diff --git a/layout/common/footer.ejs b/layout/common/footer.ejs index 36d0192..e4da55b 100644 --- a/layout/common/footer.ejs +++ b/layout/common/footer.ejs @@ -1,11 +1,17 @@