Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加网站访问计数 #16

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 32 additions & 125 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,125 +1,32 @@
> This HuWeihuang theme created by [HuWeihuang](http://www.huweihuang.com/) modified from the original Porter [YuHsuan](https://github.com/YenYuHsuan/hexo-theme-beantech)
>
> This theme has been published to the [hexo theme list](https://hexo.io/themes/).

# Live Demo

Hu Weihuang Blog : [www.huweihuang.com](http://www.huweihuang.com/)

![Theme_HuWeihuang](http://ozilwgpje.bkt.clouddn.com/blog.jpg)

# Copyright Notice

**You can free to use this theme, but you need to keep the following copyright notice on the website.**

<img src="https://res.cloudinary.com/dqxtn0ick/image/upload/v1537879475/header/copyright.png" width="55%">

# Install Hexo

Install Node.js and Git

```shell
#For Mac
brew install node
brew install git
```

Install hexo

```shell
npm install hexo-cli -g

#For more:https://hexo.io/zh-cn/index.html
```

# Theme Usage

## Init

```bash
git clone https://github.com/huweihuang/hexo-theme-huweihuang.git ./hexo-huweihuang
cd hexo-huweihuang
npm install
```

## Modify
Modify `_config.yml` file with your own info.
Especially the section:
### Deployment
Replace to your own repo!
```yml
deploy:
type: git
repo: https://github.com/<yourAccount>/<repo>
branch: <your-branch>
```

### Sidebar settings
Copy your avatar image to `<root>/img/` and modify the `_config.yml`:
```yml
sidebar: true # whether or not using Sidebar.
sidebar-about-description: "<your description>"
sidebar-avatar: img/<your avatar path>
```
and activate your personal widget you like
```yml
widgets: # here are widget you can use, you can comment out
- featured-tags
- short-about
- recent-posts
- friends-blog
- archive
- category
```
if you want to add sidebar widget, please add at `layout/_widget`.
### Signature Setup
Copy your signature image to `<root>/img/signature` and modify the `_config.yml`:
```yml
signature: true # show signature
signature-img: img/signature/<your-signature-ID>
```
### Go to top icon Setup
My icon is using iron man, you can change to your own icon at `css/image`.

### Post tag
You can decide to show post tags or not.
```yml
home_posts_tag: true
```
![tag](https://raw.githubusercontent.com/huweihuang/hexo-theme-huweihuang/master/source/img/article/tag.png)
### Markdown render
My markdown render engine plugin is [hexo-renderer-markdown-it](https://github.com/celsomiranda/hexo-renderer-markdown-it).
```yml
# Markdown-it config
## Docs: https://github.com/celsomiranda/hexo-renderer-markdown-it/wiki
markdown:
render:
html: true
xhtmlOut: false
breaks: true
linkify: true
typographer: true
quotes: '“”‘’'
```
and if you want to change the header anchor 'ℬ', you can go to `layout/post.ejs` to change it.
```javascript
async("https://cdn.bootcss.com/anchor-js/1.1.1/anchor.min.js",function(){
anchors.options = {
visible: 'hover',
placement: 'left',
icon: ℬ // this is the header anchor "unicode" icon
};
```

## Hexo Basics
Some hexo command:
```bash
hexo new post "<post name>" # you can change post to another layout if you want
hexo clean && hexo generate # generate the static file
hexo server # run hexo in local environment
hexo deploy # hexo will push the static files automatically into the specific branch(gh-pages) of your repo!
```

# Have fun ^_^
Please <a class="github-button" href="https://github.com/huweihuang/hexo-theme-huweihuang" data-icon="octicon-star" aria-label="Star huweihuang/hexo-theme-huweihuang on GitHub">Star</a> this Project if you like it! <a class="github-button" href="https://github.com/huweihuang" aria-label="Follow @huweihuang on GitHub">Follow</a> would also be appreciated!
Peace!
> This theme created by [Liaocan](http://liaocan.top/) modified from the original Porter [HuWeihuang](http://www.huweihuang.com/)

> 效果请访问我的主页 [Liaocan](http://liaocan.top/) 查看

[![个人博客网站](https://img-blog.csdnimg.cn/20190425190917556.png)](http://liaocan.top/)


## 扩展的功能

- 网站访问计数和文章访问计数

- 复制文章添加版权申明

- 文章置顶和置顶标签

- 点击文字效果

- 今日诗词

- 标签云动画效果


## 修复的bug

- 归档文章名过长超出边界

- toc文章导航锚点中文跳转失效

- 导航菜单nav每次生成顺序会变动



32 changes: 31 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ signature: false #show signature
signature-img: img/signature/BeanTechSign-white.png



# 设置nav排序
nav_menu: [
{
title: "About",
href: "/about/"
},
{
title: "Archives",
href: "/archive/"
}
,
{
title: "Tags",
href: "/tags/"
}
]


# SNS settings
# RSS: false
# weibo_username: Demonbaneen
Expand Down Expand Up @@ -83,7 +102,7 @@ show_count: true

## Featured Tags
featured-tags: true # whether or not using Feature-Tags
featured-condition-size: 1 # A tag will be featured if the size of it is more than this condition value
featured-condition-size: 0 # A tag will be featured if the size of it is more than this condition value


## Friends
Expand Down Expand Up @@ -209,6 +228,11 @@ reward_comment: 赞赏一下
wechatpay: wechatpay_url
alipay: alipay_url


# busuanzi
busuanzi: true


# Share
# Reference: https://github.com/overtrue/share.js
share: true
Expand All @@ -229,3 +253,9 @@ deploy:
repository: https://github.com/huweihuang/hexo-theme-huweihuang
branch: gh-pages
message: Update CNAME


# Support for LiveRe comments system.
# You can get your uid from https://livere.com/insight/myCode (General web site)
# 换成自己的 来必力uid 即可
# livere_uid: MTAy4MC80MT4g2NC8xODQxMA==
2 changes: 1 addition & 1 deletion db.json

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions node_modules/hexo-generator-index/lib/generator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions source/_posts/hexo-theme-huweihuang.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ toc_nav_num: true
date: 2017-09-18 10:51:24
subtitle: "This is hexo theme Demo."
header-img: "/img/article_header/article_header.png"
top: 9
tags:
- Hexo
catagories:
Expand Down
23 changes: 23 additions & 0 deletions source/_posts/knowledge_graph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "基于D3.js绘图组件的后端架构师技术栈图谱树-测试中文锚点和置顶功能"
catalog: true
toc_nav_num: true
date: 2019-04-16 21:04:25
subtitle: ""
header-img: "/img/article_header/article_header.png"
tags:
- 前端
catagories:
- 前端

---
> 基于D3.js绘图组件的后端架构师技术栈图谱树

## 组件效果
![在这里插入图片描述](https://img-blog.csdnimg.cn/20190416210018110.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L25xbXlzYmQ=,size_16,color_FFFFFF,t_70)
## GitHub项目传送门
https://github.com/nqmysb/knowledge_graph


## 效果预览地址
https://liaocan.top/knowledge_graph/
9 changes: 9 additions & 0 deletions themes/huweihuang/layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@
frameborder="0" scrolling="0" width="91px" height="20px"
src="https://ghbtns.com/github-btn.html?user=huweihuang&repo=hexo-theme-huweihuang&type=star&count=true" >
</iframe>
<br />
<!--总访问量统计-->
<% if(config['busuanzi']) { %>
<span id="busuanzi_container_site_pv" style="margin-left: 3px;">
总访问量<span id="busuanzi_value_site_pv"></span>次
</span>
<% } %>
<!--总访问量统计-->

</p>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions themes/huweihuang/layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,9 @@

<!-- ga & ba script hoook -->
<script></script>

<!--不蒜子-->
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>


</head>
Loading