2.0 version
Today, I update the theme with some new features. Welcome to use freshman21 2.0 version(gh-pages branch).
gh-pages branch new features :
- Google search
- Google analytics
- Read more mode
- Open Graph META Tags
- Microdata(schema.org)
- back to top button
- font awesome icon
master branch new features :
- Open Graph META Tags
- Microdata(schema.org)
The main difference between master and gh-pages: only one Javascript (Mathjax) be included in master branch.
Master branch is a more purified html+css framework than gh-pages branch.
Clone master branch:
` git clone https://github.com/yulijia/freshman21.git -b master –single-branch`
Clone gh-pages branch:
git clone https://github.com/yulijia/freshman21.git -b gh-pages --single-branch
update
There are three versions.
- master branch: the simplest template, original version. No js.
Fix bugs
Thanks to @imrickysu!
typo in tags.md
Change site.url
to site.baseurl
can make it work at localhost
From now on, I only post articles at gh-pages branch.
A small change
I made a small change in the gh-pages branch, add google analytics script.
The main JS
script was in the _include
folder, and this JS file was included in head.html
.
In _config.yml
file, I add the Google analytics key.
To fork the version with google analytics, please try this command:
git clone --branch gh-pages https://github.com/yulijia/freshman21.git
Attention: Only gh-pages branch has google analytics and this article.
How to create post summary
We can make a summary of post, and show it in the home page.
How to only show a part of posts?
Method 1. In index.html file, set \{\{ post.content | strip_html | truncatewords: 50 \}\}
, produces a more consistent excerpt. It gets the first 50 words and strips any formatting.