<commit_before><NAME>'s Adventures blog
===============================

==== A journey of a thousand miles begins with a single step

- Create a new post

[source.console]
----
terrence@Silencer ~/Projects/blog
22:46:40 13 $ hexo new post "Ant Colony Optimization (ACO)"
----

- Edit post markdown file in ~/Projects/blog/source/_posts/Ant-Colony-Optimization-ACO.md

- Generate / Publish new post to blog

[source.console]
----
terrence@Silencer ~/Projects/blog
23:01:29 7 $ hexo generate
----

- Start a local website which is hosting the blog

[source.console]
----
terrence@Silencer /Users/terrence/Projects/blog
22:49:41 𝜆 python -m SimpleHTTPServer 4000
Serving HTTP on 0.0.0.0 port 4000 ...
----

- Test blog go to _http://localhost:4000/blog/_

- Don't commit Search Javascript file - js/search.json.js changes into Github hosting site

[source.console]
----
terrence@Silencer ~/Projects/blog/blog
23:20:17 11 $ git diff js/search.json.js
diff --git a/js/search.json.js b/js/search.json.js
index 179a060..7224a90 100644
--- a/js/search.json.js
+++ b/js/search.json.js
@@ -21,7 +21,7 @@
     function loadData(success) {
         if (!searchData) {
             var xhr = new XMLHttpRequest();
-            xhr.open('GET', '/blog/content.json', true);
+            xhr.open('GET', '/content.json', true);
             xhr.onload = function() {
                 if (this.status >= 200 && this.status < 300) {
                     var res = JSON.parse(this.response||this.responseText);
@@ -54,7 +54,7 @@
             html = data.map(function(post) {
                 return tpl(searchTpl, {
                     title: post.title,
-                    path: 'blog/' + post.path,
+                    path: post.path,
                     date: new Date(post.date).toLocaleDateString(),
                     tags: post.tags.map(function(tag) {
                         return '<span>' + tag.name + '</span>';
@@ -111,4 +111,4 @@
         addClass(searchWrap, 'hide');
         addClass(searchMask, 'hide');
     };
-})();
+})();
\ No newline at end of file
----

- Commit changes under terrence@Silencer ~/Projects/blog directory to https://github.com/TerrenceMiao/blog master branch

[source.console]
----
terrence@Silencer ~/Projects/blog
23:23:50 16 $ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	new file:   source/_posts/Ant-Colony-Optimization-ACO.md
----

- Commit changes under terrence@Silencer ~/Projects/blog/blog directory to https://github.com/TerrenceMiao/blog gh-pages branch

terrence@Silencer ~/Projects/blog/blog
23:20:33 12 $ git status
On branch gh-pages
Your branch is up-to-date with 'origin/gh-pages'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	modified:   2017/01/13/hello-world/index.html
	modified:   2017/02/01/Perfection/index.html

  ...

	new file:   2017/06/30/Ant-Colony-Optimization-ACO/index.html
	modified:   about/index.html
	modified:   archives/2017/01/index.html
	modified:   archives/2017/02/index.html
	modified:   archives/2017/03/index.html
	new file:   archives/2017/06/index.html
	modified:   archives/2017/index.html
	modified:   archives/2017/page/2/index.html
	modified:   archives/index.html
	modified:   archives/page/2/index.html
	modified:   atom.xml
	modified:   content.json
	modified:   index.html
	modified:   page/2/index.html
	modified:   sitemap.xml

- Visit blog hosting on Github _https://terrencemiao.github.io/blog/_

References
----------
- hexo.io, a fast, simple & powerful blog framework, _https://hexo.io/_
- How To Create a Blog With Hexo, _https://ericdouglas.github.io/2016/08/21/how-to-create-a-blog-with-hexo/_
- BlueLake theme for Hexo, _https://github.com/chaooo/hexo-theme-BlueLake_
- <NAME>'s blog on GitHub, _https://terrencemiao.github.io/blog/_
<commit_msg>Add missing section header into README.adoc how to create, publish, host a blog post<commit_after><NAME>'s Adventures blog
===============================

==== A journey of a thousand miles begins with a single step

- Create a new post

[source.console]
----
terrence@Silencer ~/Projects/blog
22:46:40 13 $ hexo new post "Ant Colony Optimization (ACO)"
----

- Edit post markdown file in ~/Projects/blog/source/_posts/Ant-Colony-Optimization-ACO.md

- Generate / Publish new post to blog

[source.console]
----
terrence@Silencer ~/Projects/blog
23:01:29 7 $ hexo generate
----

- Start a local website which is hosting the blog

[source.console]
----
terrence@Silencer /Users/terrence/Projects/blog
22:49:41 𝜆 python -m SimpleHTTPServer 4000
Serving HTTP on 0.0.0.0 port 4000 ...
----

- Test blog go to _http://localhost:4000/blog/_

- Don't commit Search Javascript file - js/search.json.js changes into Github hosting site

[source.console]
----
terrence@Silencer ~/Projects/blog/blog
23:20:17 11 $ git diff js/search.json.js
diff --git a/js/search.json.js b/js/search.json.js
index 179a060..7224a90 100644
--- a/js/search.json.js
+++ b/js/search.json.js
@@ -21,7 +21,7 @@
     function loadData(success) {
         if (!searchData) {
             var xhr = new XMLHttpRequest();
-            xhr.open('GET', '/blog/content.json', true);
+            xhr.open('GET', '/content.json', true);
             xhr.onload = function() {
                 if (this.status >= 200 && this.status < 300) {
                     var res = JSON.parse(this.response||this.responseText);
@@ -54,7 +54,7 @@
             html = data.map(function(post) {
                 return tpl(searchTpl, {
                     title: post.title,
-                    path: 'blog/' + post.path,
+                    path: post.path,
                     date: new Date(post.date).toLocaleDateString(),
                     tags: post.tags.map(function(tag) {
                         return '<span>' + tag.name + '</span>';
@@ -111,4 +111,4 @@
         addClass(searchWrap, 'hide');
         addClass(searchMask, 'hide');
     };
-})();
+})();
\ No newline at end of file
----

- Commit changes under terrence@Silencer ~/Projects/blog directory to https://github.com/TerrenceMiao/blog master branch

[source.console]
----
terrence@Silencer ~/Projects/blog
23:23:50 16 $ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	new file:   source/_posts/Ant-Colony-Optimization-ACO.md
----

- Commit changes under terrence@Silencer ~/Projects/blog/blog directory to https://github.com/TerrenceMiao/blog gh-pages branch

[source.console]
----
terrence@Silencer ~/Projects/blog/blog
23:20:33 12 $ git status
On branch gh-pages
Your branch is up-to-date with 'origin/gh-pages'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	modified:   2017/01/13/hello-world/index.html
	modified:   2017/02/01/Perfection/index.html

  ...

	new file:   2017/06/30/Ant-Colony-Optimization-ACO/index.html
	modified:   about/index.html
	modified:   archives/2017/01/index.html
	modified:   archives/2017/02/index.html
	modified:   archives/2017/03/index.html
	new file:   archives/2017/06/index.html
	modified:   archives/2017/index.html
	modified:   archives/2017/page/2/index.html
	modified:   archives/index.html
	modified:   archives/page/2/index.html
	modified:   atom.xml
	modified:   content.json
	modified:   index.html
	modified:   page/2/index.html
	modified:   sitemap.xml

- Visit blog hosting on Github _https://terrencemiao.github.io/blog/_

References
----------
- hexo.io, a fast, simple & powerful blog framework, _https://hexo.io/_
- How To Create a Blog With Hexo, _https://ericdouglas.github.io/2016/08/21/how-to-create-a-blog-with-hexo/_
- BlueLake theme for Hexo, _https://github.com/chaooo/hexo-theme-BlueLake_
- <NAME>'s blog on GitHub, _https://terrencemiao.github.io/blog/_

{'fraction_non_alphanumeric': 0.15037593984962405, 'fraction_numerical': 0.04383840958328023, 'mean_word_length': 2.7194312796208533, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '592217', 'n_tokens_mistral': 2862, 'n_tokens_neox': 2576, 'n_words': 636}