Skip to content

There are many original articles, help youself and learn what you want.

License

Notifications You must be signed in to change notification settings

phantomVK/phantomvk.github.io

Repository files navigation

Jekyll

Jekyll 主题来自Hux Blog,修改源码并增加新功能。

功能及配置

一、Fork or Clone

Fork 本工程到您的 GithubClone 到本地:

$ git clone https://github.com/phantomVK/phantomvk.github.io.git

然后把项目文件夹名修改形如:GithubUsername.github.io

二、修改配置参数

打开配置文件_config.yml,按照以下示例把Jekyll_Templet改为Github username

# Site settings
title: Jekyll_Templet
SEOTitle: Jekyll_Templet
header-img: img/home.jpg
email: Jekyll_Templet@gmail.com
description: ""
keyword: ""
#url: "http://"       # your host, for absolute URL
#baseurl: "/"         # for example, '/blog' if your blog hosted on 'host/blog'

三、文章编写

_draft存有文章模板2016-10-01-demo.markdown

---
layout:     post
title:      ""
subtitle:   ""
date:       2016-10-01
author:     "Jekyll_Templet"
header-img: "img/main_img.jpg"
catalog:    true
tags:
    - tags
---

四、侧边栏

1. 头像和描述

用于配置是否打开侧边栏、自我描述和头像功能。

# Sidebar settings
sidebar: true                        # whether or not using Sidebar.
sidebar-about-description: ""
sidebar-avatar: /img/avatar.jpg      # use absolute URL, seeing it's used in both `/` and `/about/`

2. 打赏二维码

侧边栏添加二维码功能,如下设置支付二维码图片路径,图片分辨率建议275*275,格式jpg

sidebar-wechat-pay: /img/wechat.jpg
sidebar-alipay-pay: /img/alipay.jpg

设置是否显示侧边栏二维码,可单独打开微信支付或支付宝支付。

# Pay Tags
pay-tags: false   # false为关闭,true为打开
pay-tags-wechat: false
pay-tags-alipay: false

3. 友情链接

全部注释可关闭友情链接功能,已知关闭此功能将导致文章阅读区域滚动卡顿。

# Friends
friends: [
    {
        title: "Foo Blog",
        href: "http://foo.github.io/"
    },
    {
        title: "Bar Blog",
        href: "http://bar.github.io"
    }
]

4. 链接

仅需输入链接对应用户名:

# SNS settings
RSS: false
#zhihu_username: username
#github_username:
#weibo_username:     
#twitter_username:   
#facebook_username:  
#linkedin_username:  firstname-lastname-idxxxx

五、文章归档

增加文章归档功能,自动按照月份归档文章,具体展示请参考phantomVK - Archive

六、Google analytics

使用新版 Google analytics,并避免本地预览流量对统计结果的干扰。

{% if site.url contains 'localhost' %}
{% else%}
{% if site.ga_track_id %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_track_id }}"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '{{ site.ga_track_id }}');
</script>
{% endif %}
{% endif %}

License

MIT License Copyright (c) 2013-2016 Blackrock Digital LLC.
Apache License 2.0 Copyright(c) 2015-2016 Huxpro  
Apache License 2.0 Copyright(c) 2016-2019 phantomVK

About

There are many original articles, help youself and learn what you want.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published