add Japanese language
Thanks to kokeiro, now we have a Japanese language support for this theme!
new features: keyboard shortcuts for pagination
I add a Jquery keyboard shortcuts for pagination in the gh-pages branch
.
You can press “J” or “left arrow key” to see the older post and press “K” or “right arrow key” to see the newer post.
Highlighting the code
NOTICE:
The ‘pygments’ highlighter is currently unsupported on GitHub Pages. I use ‘rouge’ for highlighting instead. If some of you receive the email of ‘Page build warning’ from GitHub, to suppress this warning, change the ‘highlighter’ value to ‘rouge’ in your ‘_config.yml’.
I use Pygments as syntax highlighter for this theme.
To generate a sysntax highligted code, the grammar is:
## please remove the space between { }and %
{ % highlight R % }
a=1:10
for(i in a){
print(i)
}
{ % endhighlight % }
We can see the result as here:
a=1:10
for(i in a){
print(i)
}
To install pygments, try:
pip install pygments
## Ubuntu/Debain
sudo apt-get install python-pygments
## Fedora
yum/dnf install python-pygments
## Arch
pacman -S python-pygments
Freshman21 has already include the highlighte style.
If you don’t like it. Just remove it and generate you own highlight style.
## change default to another style name
pygmentize -f html -a .highlight -S default > ./sass/_syntax-highlighting.scss
Update at 20160121
This theme know support using triple backticks
``` to write code blocks.
```r
a=read.table("test.txt")
head(a)
```
It looks like:
a=read.table("test.txt")
head(a)
If you want to use triple backticks,
Please install Rouge by this command
gem install kramdown rouge
.
Reference: Syntax Highlighting in Jekyll With Rouge
MIT license
Warning
This repository is under MIT License.
Please do not remove the License when you fork or modify the repository.
The MIT License (MIT)
Copyright (c) 2014 Lijia Yu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
When you make attribute to this theme, here is the right way to update License.
Copyright for portions of project
Fooare held by [Lijia Yu, 2014] as part of projectFreshman21. All other copyright for projectFooare held by [your name, year].
- People who modify this repository and remove my MIT License will be listed at here. Because some of them really make me uncomfortable.
Error: invalid CP949 character
In _layout.scss file, < q > tag is used as a quotation mark. When apply this tag, it will display as “『』” on the page. One user report that on Windows it may cause a Error “invalid CPC949 character” when generate the site. A fast way to avoid this problem, please delete the lines of < q > tags in the _layout.scss file.
### DELETE THE CODE BELOW IN _layout.scss FILE###
/**
* New style for quotation.
*/
q:before {
content: '『';
color: #DD1144;
font-weight:bold;
}
q:after {
content:'』';
color: #DD1144;
font-weight:bold;
}