Github Pages Tips:
Github Pages always complie jekyll with--safe
option that will
disable plugins but some plugin can work with Github Pages.
List of Jekyll Plguins that working on Github > Pages
To avoid this --safe
option to be powerful jekyll, you need to build your jelyll somewhere else and commit your static page to main
or gh-page
branch.
We can automate build jekyll with Travis-CI
that store your jekyll file in jekyll
branch when push to github that
will trig to Travis to build and deploy static page back to your main
branch to publish your contents. you should read previous blog about
jekyll and travis
หลักการง่ายๆ คือทำให้ตัวเองเป็นที่รู้จัก หากคุณเก่งอยู่บ้านคนเดียวโดยที่คนอื่นไม่รู้ก็ยากที่จะมีใครมาจ้างคุณไปทำงาน
Sometime, you download file from Internet specially file that in local language which not encode with UTF-8 that unreadable on OSX. Your should guess what encode that file using and convert it in to UTF-8.
# convert tis-620 to utf-8 encoding
$iconv -f tis-620 -t utf-8 source.xml > destination.xml
Example. Thai language on Windows system normally encode with TIS-620 when open it in OSX that will display with some symbol char that unreadable. You should convert that file from tis-620 to utf-8 which make it readable on osx.
Github Pages Tips:
Github Pages always complie jekyll with--safe
option that will
disable plugins but some plugin can work with Github Pages.
List of Jekyll Plguins that working on Github > Pages
Easy ways: using excerpt option of > jekyll
Customized excerpt separator in > Jekyll
Just using truncate
they not checking html tag that make your site look
terrible and Github Pages not support custom ruby script that place in
_plugins
. The better way is using split with custom tags.
Replace `` in index.html
in jekyll directory with
{% if post.content contains "<!-- more -->" %}
{{ post.content | split:"<!-- more -->" | first % }}
<div style="text-align:right;">
<a href="{{ post.url }}" style="color:#000;"> Read More </a>
</div>
{% else %}
{{ post.content }}
{% endif %}
Most of example come from problem in Linux Shell - Hackerrank Text Processing Commands
Trip:
sed
in OSX may not working as example. You should trygsed
.
gsed
can install via brew and callgsed
instead ofsed
$ cat in
1234 5678 9101 1234
2999 5178 9101 2234
$ sed -re 's/([0-9]{4}\s){3}/**** **** **** /' in
**** **** **** 1234
**** **** **** 2234