- Notifications
You must be signed in to change notification settings - Fork2k
Gaohaoyang/gaohaoyang.github.io
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
First of all, let's see previews.
Index page show 5 posts excerpt as a default. Readers can click article title or read more button to see full post. There are recent posts area, categories area and tags area at the right part of the index page. You can also add an area at this part, if you change the fileindex.html
.
Archive post according to the year.
Show posts according to the category.
Show posts according to the tags.
The user can collect their favorite article links withmarkdown
syntax.
I useMasonry to rewrite the waterfall responsive layout. Better interactive experience.
The user can write some introduction about theirselves and their site withmarkdown
syntax.
This theme supports bothdisqus and多说评论 duoshuo comments. It's very easy to config your comments module.
The only thing you need do is to change theshort_name
in the file_config.yml
. As follows.
# comments# two ways to comment, only choose one, and use your own short nameduoshuo_shortname:#xxxdisqus_shortname:xxx
The post contents is fixed at the right side while page is scrolling. There will be a scroll bar on contents while it is outside the window height.
While the jekyll is update to 3.x.x, you can use github flavored markdown to write code.
More info to seesyntax-highlighter-changed.
You can see the white shadow on the current item in the navbar. I call this light shadow.
Of course, I have done a very good mobile adaptation.
Welcome to use this blog theme, but please keep the theme author info at footer. Theme designed byHyG.
This theme supports Google Analytics and Baidu Statistics, you can just config the id in the file_config.yml
, as follows.
# statistic analysis 统计代码# 百度统计 id,将统计代码替换为自己的百度统计id,即# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";# xxxxx字符串baidu_tongji_id:xxxxxxxxxxxxgoogle_analytics_id:UA-xxxxxxxx# google 分析追踪id
Welcome everyone to use this theme, this part shows introduction to use.
This step and Step 5 mainly talk to you how to launch blog at local. If you don't want to launch at local, you can ignore these 2 steps. But I still strongly suggest to do this. Ensure there is nothing wrong before pushing to the github.
The Windows users can directly useRubyInstaller to install ruby environment. Follow the prompts while installing.
Install jekyll commands:
gem install jekyll
For more details, you can view the jekyll official website.https://jekyllrb.com/
There may be something wrong at mac OS X El Capitan, you can see the solution athttps://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011.
If you are interesting in jekyll, you can see the jekyll source code athttps://github.com/jekyll/jekyll.
You can clone, download or fork this repo.
Mainly change the parameters at file_config.yml
and use your ownfavicon.ico
.
Shows at site header part.
# Site settingstitle:HyGbrief-intro:Front-end Dev Engineerbaseurl:""# the subpath of your site, e.g. /blogurl:"http://gaohaoyang.github.io"# the base hostname & protocol for your site
Mainly shows at the footer of the site.
# other linkstwitter_username:gaohaoyang126facebook_username:gaohaoyang.watergithub_username:Gaohaoyangemail:gaohaoyang126@126.comweibo_username:3115521whzhihu_username:gaohaoyanglinkedIn_username:gaohaoyangdribbble_username:description_footer:本站记录我前端之旅的沿途风景!
Get your ownshort_name
:
Visithttps://disqus.com/ orhttp://duoshuo.com/. And follow the prompts at the site.
# comments# two ways to comment, only choose one, and use your own short nameduoshuo_shortname:#hygblogdisqus_shortname:xxxx
When you done, you can also see the comments info at disqus or duoshuo admin console.
Get Google Analytics id or Baidu Statistics id:
Visithttps://www.google.com/analytics/ orhttp://tongji.baidu.com/. And follow the prompts at the site.
Of course, if you don't want any statistical and analysis info, you can type nothing at id position.
# statistic analysis 统计代码# 百度统计 id,将统计代码替换为自己的百度统计id,即# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";# xxxxx字符串baidu_tongji_id:cf850xxxxxxxxxxxxxxxxgoogle_analytics_id:UA-7xxxxxx-4# google 分析追踪id
When you done, you can see UV, PV, location etc. info at your own Google Analytics or Baidu Statistic console.
You can write posts at folder_posts
. At the beginning of the post, you should declare layout、title、date、categories、tags、author(optional) info、mathjax(optional,clickhere for more detail aboutMathjax
).
---layout: posttitle: "对这个 jekyll 博客主题的改版和重构"date: 2016-03-12 11:40:18 +0800categories: jekylltags: jekyll 端口 markdown Foxit RubyGems HTML CSSauthor: Haoyang Gaomathjax: true---
These follow code is for making contents.
* content{:toc}
You can use 4 wraps as a excerpt separator. The words before separator as excerpt show in the index page. When you enter the post page, you can read full article.
The wraps config is in the file_config.yml
, as follows:
# excerptexcerpt_separator:"\n\n\n\n"
You should use markdown syntax to write article, just like write readme in github.
You can use 3 ``` to write code block.
use command:
jekyll s
Terminal shows:
Configuration file: E:/GitWorkSpace/blog/_config.yml Source: E:/GitWorkSpace/blog Destination: E:/GitWorkSpace/blog/_site Incremental build: disabled. Enable with --incremental Generating... done in 6.33 seconds. Please add the following to your Gemfile to avoid polling for changes: gem 'wdm', '>= 0.1.0' if Gem.win_platform? Auto-regeneration: enabled for 'E:/GitWorkSpace/blog'Configuration file: E:/GitWorkSpace/blog/_config.yml Server address: http://127.0.0.1:4000/ Server running... press ctrl-c to stop.
Visit localhost:4000 to see your blog!!!
If there is nothing wrong, push code to your github!
You can also donate me for a coffee, and I'll do better. Thanks.
PayPal | Wechat Pay | Alipay |
---|---|---|
Donate via PayPal |
[+]
Add next post and previous post link in post page.[^]
Change the sort of font-family to avoid full-width half-width characters mistake.[^]
Fix bug in tags cloud when division by zero.#26,#28,#30
[^]
Optimized code, Extracting common code tocomments.html
[+]
Add Google Analysis and Baidu Statistics[+]
Update README, add usage[+]
Addfavicon.ico
[^]
Fix bug at contents[^]
Change the content scroll bar CSS style(Only forwebkit
browser kernel)[^]
Change tag a color at demo page[+]
Add busuanzi counter, show the views count at footer[+]
Add back to top button
[^]
Rewrite all codes based on jekyll 3.1.2[+]
Add excerpt at index page[+]
Add recently post, categories and tags cloud at index page[+]
Add light shadow at navbar[+]
Add archives, categories, tags page[+]
Add collections page[+]
Add comments plugin with disqus or duoshuo[+]
Mobile Adaptation[+]
Fix post contents to the right side while scrolling page[+]
Fix footer at the bottom when page height is smaller than window height[^]
Use github flavored markdown to write code block(Fenced code blocks)[^]
Rewrite the demo page with Masonry[-]
Remove jQuery and BootStrap
About my old blog theme, I won't maintain any more. And I put the code atGaohaoyang/old-blog.
About
blog & blog theme🤘
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.