blog

My blog at www.shimmy1996.com

git clone git://git.shimmy1996.com/blog.git
commit 040d5820f63d7cfc29c5c200a0b61e3e655240ae
parent e3a626fa6dd224e6e0332ce3fcbdfa3ed24acc3c
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sat, 30 Sep 2017 23:13:55 -0500

Now exporting org-mode posts to md using ox-hugo.
Adjusted terms template for tags translation to work properly.

Diffstat:
Acontent/_index.en.md | 43+++++++++++++++++++++++++++++++++++++++++++
Dcontent/_index.en.org | 38--------------------------------------
Acontent/_index.zh.md | 42++++++++++++++++++++++++++++++++++++++++++
Dcontent/_index.zh.org | 39---------------------------------------
Acontent/about.en.md | 19+++++++++++++++++++
Dcontent/about.en.org | 18------------------
Acontent/about.zh.md | 17+++++++++++++++++
Dcontent/about.zh.org | 13-------------
Dcontent/categories/_index.en.org | 3---
Dcontent/categories/_index.zh.org | 3---
Acontent/contact.en.md | 17+++++++++++++++++
Dcontent/contact.en.org | 14--------------
Acontent/contact.zh.md | 17+++++++++++++++++
Dcontent/contact.zh.org | 14--------------
Acontent/friends.en.md | 18++++++++++++++++++
Dcontent/friends.en.org | 16----------------
Acontent/friends.zh.md | 18++++++++++++++++++
Dcontent/friends.zh.org | 16----------------
Acontent/messages.en.md | 10++++++++++
Dcontent/messages.en.org | 8--------
Acontent/messages.zh.md | 10++++++++++
Dcontent/messages.zh.org | 8--------
Acontent/posts/.en.md | 7+++++++
Acontent/posts/.md | 7+++++++
Dcontent/posts/2017-09-03-get-emacs-to-work-with-fcitx.en.org | 49-------------------------------------------------
Dcontent/posts/2017-09-03-get-emacs-to-work-with-fcitx.zh.org | 48------------------------------------------------
Dcontent/posts/2017-09-25-server-setup.en.org | 264-------------------------------------------------------------------------------
Dcontent/posts/2017-09-25-server-setup.zh.org | 265-------------------------------------------------------------------------------
Acontent/posts/_index.en.md | 8++++++++
Dcontent/posts/_index.en.org | 5-----
Acontent/posts/_index.zh.md | 8++++++++
Dcontent/posts/_index.zh.org | 5-----
Acontent/posts/get-emacs-to-work-with-fcitx.en.md | 48++++++++++++++++++++++++++++++++++++++++++++++++
Acontent/posts/my-server-setups-and-whatnot.en.md | 345+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acontent/posts/my-server-setups-and-whatnot.zh.md | 7+++++++
Dcontent/tags/_index.en.org | 3---
Dcontent/tags/_index.zh.org | 3---
Mi18n/en.toml | 16+++++++++-------
Mi18n/zh.toml | 14+++++++-------
Mlayouts/_default/list.html | 3++-
Mlayouts/_default/single.html | 5+++--
Aorg/2017.org | 619+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aorg/fixed.org | 239+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
43 files changed, 1520 insertions(+), 849 deletions(-)
diff --git a/content/_index.en.md b/content/_index.en.md
@@ -0,0 +1,42 @@
++++
+title = "Home"
+draft = false
+slug = "home"
++++
+
+## Library of Trantor {#library-of-trantor}
+
+_The Plan needs to go on._
+
+<span style="color:red">Fair Warning: Site under heavy construction.</span>
+
+
+### Site Roadmap {#site-roadmap}
+
+-   [X] ~~Find new hosting location.~~ Currently using DigitalOcean.
+-   [X] Install Arch Linux on server.
+-   [X] ~~Search for WP replacement.~~ Hugo is pretty good.
+-   [X] ~~Find a suitable theme.~~ Currently using `hugo-xmin` , may consider forking it and write my own ( `soresu` ).
+-   [X] Server side config, like `post-receive` for git auto deploy.
+-   [X] Language switcher that does more than redirecting to home page.
+-   [X] Enable Disqus.
+-   [X] Support `$\LaTeX$` expressions via MathJax.
+-   [X] Copy-paste fixed page contents from old site (and translate them).
+-   [X] Enable https.
+-   [X] Backup old WP site.
+-   [X] Transfer domain to Google Domains and ensure DNS works as intended.
+-   [X] Find out how to write with `org-mode` or R markdown.
+-   [X] Configure multilingual support, including footer text, title, etc.
+-   [X] Find out how to make `emacs` work with =fcitx~.
+-   [X] Use Google's Noto Sans font and Source Code Pro for code.
+-   [X] Find a suitable icon/favicon.
+-   [X] Improve templates for posts to display tags and categories.
+-   [X] Cosmetic changes, i.e. no underlines for hyperlinks.
+-   [X] Host my own email.
+-   [ ] Deal with some nuances in using `org-mode` with `hugo` , like how to get syntax highlighting to work properly.
+-   [ ] Customizable Disqus via Disqus API.
+-   [ ] Customize `hugo new` to make it more useful, i.e. create multilingual versions directly.
+-   [ ] Restore/rewrite and translate some of the more valuable old posts.
+
+
+### Recent Posts {#recent-posts}+
\ No newline at end of file
diff --git a/content/_index.en.org b/content/_index.en.org
@@ -1,38 +0,0 @@
----
-title: "Home"
-curl: "home"
----
-
-* Library of Trantor
-/The Plan needs to go on./
-
-<span style="color:red">Fair Warning: Site under heavy construction.</span>
-
-** Site Roadmap
-
-- [x] +Find new hosting location.+ Currently using DigitalOcean.
-- [x] Install Arch Linux on server.
-- [x] +Search for WP replacement.+ Hugo is pretty good.
-- [x] +Find a suitable theme.+ Currently using ~hugo-xmin~, may consider forking it and write my own ( ~soresu~ ).
-- [x] Server side config, like ~post-receive~ for git auto deploy.
-- [x] Language switcher that does more than redirecting to home page.
-- [x] Enable Disqus.
-- [x] Support ~$\LaTeX$~ expressions via MathJax.
-- [x] Copy-paste fixed page contents from old site (and translate them).
-- [x] Enable https.
-- [x] Backup old WP site.
-- [x] Transfer domain and ensure DNS works as intended.
-- [x] Find out how to write with ~org-mode~ or R markdown.
-- [x] Configure multilingual support, including footer text, title, etc.
-- [x] Find out how to make ~emacs~ work with ~fcitx~.
-- [x] Use Google's Noto Sans font and Source Code Pro for code.
-- [x] Find a suitable icon/favicon.
-- [x] Improve templates for posts to display tags and categories. 
-- [x] Cosmetic changes, i.e. no underlines for hyperlinks. 
-- [x] Host my own email.
-- [ ] Deal with some nuances in using ~org-mode~ with ~hugo~ , like how to get syntax highlighting to work properly.
-- [ ] Customizable Disqus via Disqus API.
-- [ ] Customize ~hugo new~ to make it more useful, i.e. create multilingual versions directly.
-- [ ] Restore/rewrite and translate some of the more valuable old posts.
-
-** Recent Posts
diff --git a/content/_index.zh.md b/content/_index.zh.md
@@ -0,0 +1,41 @@
++++
+title = "主页"
+draft = false
+slug = "home"
++++
+
+## 川坨大学图书室 {#川坨大学图书室}
+
+_计划进行中_
+
+<span style="color:red">注意:本站仍处于施工中。</span>
+
+
+### 施工计划 {#施工计划}
+
+-   [X] ~~找一家新的服务器提供商~~ 目前使用 DigitalOcean 。
+-   [X] 在服务器上安装 Arch Linux 。
+-   [X] ~~搜寻WP的替代品。~~ Hugo 很不错。
+-   [X] ~~找一个合适的主题。~~ 目前使用 `hugo-xmin` ,考虑fork出来写成自己的主题( `soresu` )。
+-   [X] 完成服务器端设置,比如添加 `post-receive` 来实现 `git` 自动部署。
+-   [X] 可以切换 **当前页面** 语言版本的语言切换按钮。
+-   [X] Disqus 支持。
+-   [X] 用 MathJax 实现 `$\LaTeX$` 表达式支持。
+-   [X] 把导航页的内容搬过来并翻译。
+-   [X] https 支持。
+-   [X] 备份原WP站点。
+-   [X] 转移域名到 Google Domains ,并完成 DNS 设置。
+-   [X] 尝试使用 `org-mode` 或者 R markdown 来写博客。
+-   [X] 解决 `emacs` 不兼容 `fcitx` 的问题。
+-   [X] 设置多语言支持,添加合适的翻译字符串。
+-   [X] 使用 Google 的 Noto Sans 字体,代码则使用 Source Code Pro 。
+-   [X] 为站点和社交网站找一个合适的图标/头像。
+-   [X] 改善文章页面模板使其显示标签和分类。
+-   [X] 改善网站外观,比如隐藏超链接的下划线等。
+-   [X] 架设自己的邮箱。
+-   [ ] 解决 `org-mode` 和 `hugo` 略不兼容的地方,比如代码高亮。
+-   [ ] 尝试把 `hugo new` 变得更有用一些,比如直接创建多语言版本等。
+-   [ ] 把比较有价值的旧文章搬过来。
+
+
+### 最新日志 {#最新日志}+
\ No newline at end of file
diff --git a/content/_index.zh.org b/content/_index.zh.org
@@ -1,39 +0,0 @@
----
-title: "主页"
-curl: "home"
----
-
-* 川坨大学图书室
-/计划进行中/
-
-<span style="color:red">注意:本站仍处于施工中。</span>
-
-** 施工计划
-
-- [x] +找一家新的服务器提供商+ 目前使用DigitalOcean。
-- [x] 在服务器上安装Arch Linux。
-- [x] +搜寻WP的替代品。+ Hugo很不错。
-- [x] +找一个合适的主题。+ 目前使用 ~hugo-xmin~ ,考虑fork出来写成自己的主题( ~soresu~ )。
-- [x] 完成服务器端设置,比如添加 ~post-receive~ 来实现 ~git~ 自动部署。
-- [x] 可以切换 *当前页面* 语言版本的语言切换按钮。
-- [x] Disqus支持。
-- [x] 用MathJax实现 ~$\LaTeX$~ 表达式支持。
-- [x] 把导航页的内容搬过来并翻译。
-- [x] https支持。
-- [x] 备份原WP站点。
-- [x] 转移域名到Google Domain,并完成DNS设置。
-- [x] 尝试使用 ~org-mode~ 或者 R markdown 来写博客。
-- [x] 解决 ~emacs~ 不兼容 ~fcitx~ 的问题。
-- [x] 设置多语言支持,添加合适的翻译字符串。
-- [x] 使用Google的Noto Sans字体,代码则使用Source Code Pro。
-- [x] 为站点和社交网站找一个合适的图标/头像。
-- [x] 改善文章页面模板使其显示标签和分类。
-- [x] 改善网站外观,比如隐藏超链接的下划线等。
-- [x] 架设自己的邮箱。
-- [ ] 解决 ~org-mode~ 和 ~hugo~ 略不兼容的地方,比如代码高亮。
-- [ ] 用Disqus API实现可以自定义的评论框。
-- [ ] 尝试把 ~hugo new~ 变得更有用一些,比如直接创建多语言版本等。
-- [ ] 把比较有价值的旧文章搬过来。
-
-
-** 最新日志
diff --git a/content/about.en.md b/content/about.en.md
@@ -0,0 +1,18 @@
++++
+title = "About"
+draft = false
+slug = "about"
++++
+
+## About Me {#about-me}
+
+No longer a fan of the slow and clunky Wordpress, I switched to Hugo.
+
+Most of my social network accounts use the name `shimmy1996`.
+
+
+## About This Site {#about-this-site}
+
+Up and running since July 12th, 2014.
+
+This site is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/) (CC BY-NC-SA 4.0).+
\ No newline at end of file
diff --git a/content/about.en.org b/content/about.en.org
@@ -1,18 +0,0 @@
----
-title: "About"
-slug: "about"
----
-
-** About me:
-
-Actively searching for the ultimate answer to the universe. 
-
-No longer a fan of the slow and clunky Wordpress, I switched to Hugo.
-
-Most of my social network accounts use the name ~shimmy1996~.
-
-** About this site:
-
-Up and running since July 12th, 2014. 
-
-This site is licensed under a [[http://creativecommons.org/licenses/by-nc-sa/4.0/][Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]] (CC BY-NC-SA 4.0).
diff --git a/content/about.zh.md b/content/about.zh.md
@@ -0,0 +1,16 @@
++++
+title = "关于"
+draft = false
+slug = "about"
++++
+
+## 关于博主 {#关于博主}
+
+EE 狗,目前在德州放牛;技术渣, ~~WP~~ Hugo 新手; ACG 相关;喜欢硬件但是没有小钱钱;足迹可能遍布各大社交网站,通常名字为 `shimmy1996` ;求友链 XDD。
+
+
+## 关于本站 {#关于本站}
+
+建于2014年7月12日,用来放各种奇怪的东西。
+
+本站所有内容使用[Creative Commons 署名-非商业性-相同方式共享4.0国际许可协议](http://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh)(CC BY-NC-SA 4.0)。+
\ No newline at end of file
diff --git a/content/about.zh.org b/content/about.zh.org
@@ -1,13 +0,0 @@
----
-title: "关于"
-slug: "about"
----
-
-** 关于博主:
-
-EE狗,目前在德州放牛;技术渣, +WP+ Hugo新手;ACG相关;喜欢硬件但是没有小钱钱;足迹可能遍布各大社交网站,通常名字为 ~shimmy1996~ ;求友链XDD。
-
-** 关于本站:
-建于2014年7月12日,用来放各种奇怪的东西。
-
-本站所有内容使用[[http://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh][Creative Commons 署名-非商业性-相同方式共享4.0国际许可协议]](CC BY-NC-SA 4.0)。
diff --git a/content/categories/_index.en.org b/content/categories/_index.en.org
@@ -1,3 +0,0 @@
----
-title: "Categories"
----
diff --git a/content/categories/_index.zh.org b/content/categories/_index.zh.org
@@ -1,3 +0,0 @@
----
-title: "分类"
----
diff --git a/content/contact.en.md b/content/contact.en.md
@@ -0,0 +1,16 @@
++++
+title = "Contact"
+draft = false
+slug = "contact"
++++
+
+Congratulations for discovering the ~~secret~~ contact information hidden here!
+
+Feel free to shoot me an email.
+If you feel like it, encrypt your message with my PGP Key and you will need the key to find my email address:
+
+```sh
+5672 AC27 2669 A07A BD28  0896 ACC6 C791 312C F84D
+```
+
+You can also find me on [Telegram](https://telegram.me/shimmy1996).+
\ No newline at end of file
diff --git a/content/contact.en.org b/content/contact.en.org
@@ -1,14 +0,0 @@
----
-title: "Contact"
-slug: "contact"
----
-
-Congratulations for discovering the +secret+ contact information hidden here!
-
-Feel free to shoot me an email. 
-If you feel like it, encrypt your message with my PGP Key and you will need the key to find my email address:
-#+BEGIN_SRC 
-5672 AC27 2669 A07A BD28  0896 ACC6 C791 312C F84D
-#+END_SRC
-
-You can also find me on [[https://telegram.me/shimmy1996][Telegram]].
diff --git a/content/contact.zh.md b/content/contact.zh.md
@@ -0,0 +1,16 @@
++++
+title = "联系方式"
+draft = false
+slug = "contact"
++++
+
+恭喜你发现这个不起眼的 ~~机密~~ 链接。
+
+联系我的最佳方式是电子邮件。
+你可以使用我的PGP密匙来对邮件进行加密以及获取邮箱地址:
+
+```sh
+5672 AC27 2669 A07A BD28  0896 ACC6 C791 312C F84D
+```
+
+除此之外[Telegram](https://telegram.me/shimmy1996)也是不错的选择。+
\ No newline at end of file
diff --git a/content/contact.zh.org b/content/contact.zh.org
@@ -1,14 +0,0 @@
----
-title: "联系方式"
-slug: "contact"
----
-
-恭喜你发现这个不起眼的 +机密+ 链接。
-
-联系我的最佳方式是电子邮件。
-你可以使用我的PGP密匙来对邮件进行加密以及获取邮箱地址:
-#+BEGIN_SRC 
-5672 AC27 2669 A07A BD28  0896 ACC6 C791 312C F84D
-#+END_SRC
-
-除此之外[[https://telegram.me/shimmy1996][Telegram]]也是不错的选择。
diff --git a/content/friends.en.md b/content/friends.en.md
@@ -0,0 +1,17 @@
++++
+title = "Friends"
+draft = false
+slug = "friends"
++++
+
+<img src="/img/fixed/friends.jpg"/>
+
+Welcome to the friendly neighborhood of Library of Trantor!
+
+[Z](http://iiiid.com)
+
+[Uucky](http://uucky.me)
+
+[比尔盖子](https://biergaizi.info)
+
+[Vacuuny/A2Clef](http://a2clef.com)+
\ No newline at end of file
diff --git a/content/friends.en.org b/content/friends.en.org
@@ -1,16 +0,0 @@
----
-title: "Friends"
-slug: "friends"
----
-
-<img src="/img/fixed/friends.jpg"/>
-
-Welcome to the friendly neighborhood of Library of Trantor!
-
-[[http://iiiid.com][Z]]
-
-[[http://uucky.me][Uucky]]
-
-[[https://biergaizi.info][比尔盖子]]
-
-[[http://a2clef.com][Vacuuny/A2Clef]]
diff --git a/content/friends.zh.md b/content/friends.zh.md
@@ -0,0 +1,17 @@
++++
+title = "朋友们"
+draft = false
+slug = "friends"
++++
+
+<img src="/img/fixed/friends.jpg"/>
+
+这里会添加朋友们的站点链接!
+
+[Z](http://iiiid.com)
+
+[Uucky](http://uucky.me)
+
+[比尔盖子](https://biergaizi.info)
+
+[Vacuuny/A2Clef](http://a2clef.com)+
\ No newline at end of file
diff --git a/content/friends.zh.org b/content/friends.zh.org
@@ -1,16 +0,0 @@
----
-title: "朋友们"
-slug: "friends"
----
-
-<img src="/img/fixed/friends.jpg"/>
-
-这里会添加朋友们的站点链接!
-
-[[http://iiiid.com][Z]]
-
-[[http://uucky.me][Uucky]]
-
-[[https://biergaizi.info][比尔盖子]]
-
-[[http://a2clef.com][Vacuuny/A2Clef]]
diff --git a/content/messages.en.md b/content/messages.en.md
@@ -0,0 +1,9 @@
++++
+title = "Messages"
+draft = false
+slug = "messages"
++++
+
+Hello and welcome!
+
+In case you want fancy profile pics, just like everyone else, please register at [Disqus](https://disqus.com/).+
\ No newline at end of file
diff --git a/content/messages.en.org b/content/messages.en.org
@@ -1,8 +0,0 @@
----
-title: "Messages"
-slug: "messages"
----
-
-Hello and welcome!
-
-In case you want fancy profile pics, just like everyone else, please register at [[https://disqus.com/][Disqus]].
diff --git a/content/messages.zh.md b/content/messages.zh.md
@@ -0,0 +1,9 @@
++++
+title = "留言板"
+draft = false
+slug = "messages"
++++
+
+欢迎版聊!
+
+没有头像?请注册[Disqus](https://disqus.com)账户。+
\ No newline at end of file
diff --git a/content/messages.zh.org b/content/messages.zh.org
@@ -1,8 +0,0 @@
----
-title: "留言板"
-slug: "messages"
----
-
-欢迎版聊!
-
-没有头像?请注册[[https://disqus.com][Disqus]]账户。
diff --git a/content/posts/.en.md b/content/posts/.en.md
@@ -0,0 +1,7 @@
++++
+title = "My Server Setups and Whatnot"
+lastmod = 2017-09-30T22:14:35-05:00
+tags = ["arch-linux", "server"]
+draft = false
+slug: = "my-server-setups-and-whatnot"
++++
diff --git a/content/posts/.md b/content/posts/.md
@@ -0,0 +1,7 @@
++++
+lastmod = 2017-09-30T23:09:28-05:00
+tags = ["emacs", "fcitx"]
+draft = true
+date = 2017-09-25
+slug = "get-emacs-to-work-with-fcitx"
++++
diff --git a/content/posts/2017-09-03-get-emacs-to-work-with-fcitx.en.org b/content/posts/2017-09-03-get-emacs-to-work-with-fcitx.en.org
@@ -1,49 +0,0 @@
-+++
-title           = "Get Emacs to Work With Fcitx"
-description     = ""
-date            = 2017-09-03T23:20:27-05:00
-draft           = true
-tags            = [
-                  ]
-categories      = [
-                  ]
-slug            = "get-emacs-to-work-with-fcitx"
-+++
-
-* Enabling fcitx in emacs
-
-** fcitx-diagnose
-
-** locale settings
-export zh_cn.utf-8
-set lc_ctype=zh_cn.utf-8
-
-** fcitx plugin in emacs
-
-** disabling ctrl+space hot key
-replaced with os+space and ctrl+os
-
-* could be better
-
-do not want set lc-ctype globally
-run emacs as daemon
-
-** create new entry in .config/systemd/user/emacs.service
-
-** add environment variable
-
-** problem: does not load init file
-
-
-** setting up alias of emacsclient -nc in .zshrc
-alias e="emacsclient -nc"
-
-
-
-
-
-
-
-
-
-
diff --git a/content/posts/2017-09-03-get-emacs-to-work-with-fcitx.zh.org b/content/posts/2017-09-03-get-emacs-to-work-with-fcitx.zh.org
@@ -1,48 +0,0 @@
-+++
-title           = "在emacs里使用fcitx"
-description     = ""
-date            = 2017-09-03T23:20:27-05:00
-draft           = true
-tags            = []
-categories      = [
-                  ]
-slug            =  "get-emacs-to-work-with-fcitx"
-+++
-
-* Enabling fcitx in emacs
-
-** fcitx-diagnose
-
-** locale settings
-export zh_cn.utf-8
-set lc_ctype=zh_cn.utf-8
-
-** fcitx plugin in emacs
-
-** disabling ctrl+space hot key
-replaced with os+space and ctrl+os
-
-* could be better
-
-do not want set lc-ctype globally
-run emacs as daemon
-
-** create new entry in .config/systemd/user/emacs.service
-
-** add environment variable
-
-** problem: does not load init file
-
-
-** setting up alias of emacsclient -nc in .zshrc
-alias e="emacsclient -nc"
-
-
-
-
-
-
-
-
-
-
diff --git a/content/posts/2017-09-25-server-setup.en.org b/content/posts/2017-09-25-server-setup.en.org
@@ -1,264 +0,0 @@
-+++
-title           = "My Server Setups and Whatnot"
-date            = 2017-09-24T10:43:29-05:00
-draft           = false
-tags            = ["Arch Linux",
-		   "Server"]
-categories      = ["Site Related"]
-slug            =  "my server setups and whatnot"
-+++
-
-** Why move the blog? And to where?
-
-After putting up with the clunky WordPress blog (and Bluehost's 2003-looking admin panel for that matter) for three years, I finally decided to ditch everything I currently have and restart my blog in a more civilized manner. There was a couple of things that I was not happy about my old WordPress setup, namely:
-
-- Clunky and eats up my server storage.
-- Not as easy way to back up with tools I know.  
-- Does not come with a command line interface, which is becoming my preferred way of doing almost anything. 
-- Lacking some basic features I wanted, i.e. multilingual support. As powerful as WordPress may be in the right hands, I do not want to invest too much effort in learning CSS/js/php nor do I want to use some plugin from some sketchy WordPress plugin marketplace.  
-- These theme and plugin marketplaces creeps me out in the same way as ubuntu software center. 
-- WordPress has a lot of features I do not actually need, i.e. user permission system, which is an overkill for my personal blog site. 
-
-Picking an alternative blogging system was not too hard once I am aware of my needs: a fast and minimalist static site generator implemented in a language I know (or I found valuable to learn) with out-of-the-box multilingual support, a.k.a. =hugo=. 
-
-As for hosting services, I considered github pages and netlify to be fast and easy solutions but I want something more substantial for a personal blog, like a VPS. Besides, github pages not supporting https for custom domains is a deal breaker for me. I filtered down the list of VPS hosting providers with Arch Linux support and I ended up with DigitalOcean. Since I wanted to completely sever my connection with Bluehost, I also moved my domain name host to Google Domains. 
-  
-** Install Arch Linux
-Do note that Arch Linux is probably not the best suited server Linux distro. Use a non-rolling distro if stability is a concern. I use it only because I also run it on all my other computers. Backup the droplet often if you decided to go down this route: it hasn't happened to me yet but I've heard people complaining about Arch breaking too often. 
-
-*** Installation
-Apparently my information on DigitalOcean supporting Arch Linux is outdated, as they stopped supporting it a while back. Thankfully, it is still not to hard to bring Arch Linux to a droplet (this is how DigitalOcean refer to a server) due to the awesome project [[https://github.com/gh2o/digitalocean-debian-to-arch][digitalocean-debian-to-arch]]. All I needed to to was [[https://www.digitalocean.com/community/tutorials/how-to-create-your-first-digitalocean-droplet][set up a droplet]], =ssh= into the server, and follow the instructions:
-
-#+BEGIN_SRC sh
-# wget https://raw.githubusercontent.com/gh2o/digitalocean-debian-to-arch/debian9/install.sh -O install.sh
-# bash install.sh
-#+END_SRC
-
-*** Low Level Setup
-Once the script finishes running, I have an Arch Linux system running on my droplet with internet access. Most of the additional setups needed can be found in [[https://wiki.archlinux.org/index.php/Installation_guide][Arch Wiki]]. Since I am by no means a great tutorial writer, I suggest referring to Arch Wiki for detailed steps. The recorded commands here are just for book-keeping purposes and is by no means the best way to do things.
-
-**** System Clock
-Sync system clock and set time zone. 
-#+BEGIN_SRC sh
-# timedatectl set-ntp true
-# timedatectl settimezone <Region>/<City>
-#+END_SRC
-
-**** Base Packages
-Install/update base packages.
-#+BEGIN_SRC sh
-# pacman -S base base-devel
-#+END_SRC
-
-**** Fstab
-
-Generate =fstab=. 
-#+BEGIN_SRC sh
-# genfstab -U / >> /etc/fstab
-#+END_SRC
-
-**** Set Locale
-Uncomment =en_US.UTF-8 UTF-8= in =/etc/locale.conf= then generate locale with:
-#+BEGIN_SRC sh 
-locale-gen
-#+END_SRC
-
-Set =LANG=en_US.UTF-8= in =/etc/locale.conf=. 
-
-**** Hostname
-Edit =/etc/hosts= and add hostname of droplet:
-#+BEGIN_SRC sh
-127.0.1.1    <hostname>.localdomain <hostname>
-#+END_SRC
-
-**** Boot Loader and Initramfs
-Optimizations for intel processors:
-#+BEGIN_SRC 
-# pacman -S intel-ucode
-# grub-mkconfig -o /boot/grub/grub.cfg
-#+END_SRC
-
-Add =crc32= modules to initramfs, as otherwise the droplet fails to boot. Edit =/etc/mkinitcpio.conf= :
-#+BEGIN_SRC sh 
-MODULES= "crc32 libcrc32c crc32c_generic crc32c-intel crc32-pclmul"
-#+END_SRC
-Regenerate the initramfs image.
-#+BEGIN_SRC sh
-# mkinitcpio -p linux
-#+END_SRC
-
-**** Root Password
-You know the drill. 
-#+BEGIN_SRC sh
-# passwd
-#+END_SRC
-
-*** User Setups
-Here are some additional settings to make Arch Linux more useable.
-
-**** Creature User
-
-Obviously it is not a good idea to use root account:
-#+BEGIN_SRC sh
-# useradd -m -G wheel -s /bin/bash <username>
-# passwd <username>
-#+END_SRC
-
-**** Add User to Sudoer
-
-Edit =/etc/sudoers= and add:
-#+BEGIN_SRC sh
-<username> ALL=(ALL) ALL
-#+END_SRC
-
-**** Login As User
-We will finish the rest of the configuration using the user account. 
-#+BEGIN_SRC 
-su <username>
-#+END_SRC
-
-**** Package Manager
-I used to use =packer= as wrapper around AUR and =pacman=. However, after learning about [[https://wiki.archlinux.org/index.php/AUR_helpers#Comparison_table][inherent insecurity]] in their package building processes, I switched to a more secure AUR helper =trizen= (=pacaur= is another choice, and fun fact: there is a reddit bot that tells you to switch to =pacaur= every time =yaourt= is mentioned in a post): =trizen= prompts user to inspect =PKGBUILD=, =*.install= and other scripts before sourcing them and =trizen= is written in Perl instead of Bash. To install =trizen=, first install dependencies via =pacman= according to its [[https://aur.archlinux.org/packages/trizen/][AUR Page]], then clone its [[https://github.com/trizen/trizen][git repo]] to a local directory. Navigate to the directory containing =PKGBUILD= and run
-#+BEGIN_SRC sh
-$ makepkg
-#+END_SRC
-to make package and 
-#+BEGIN_SRC sh
-$ pacman -U trizen-*.pkg.tzr.xz
-#+END_SRC
-to install =trizen=. 
-
-**** Useful Packages
-Once package manager is in place, install packages to your heart's content! Some of my bread-and-butter packages include =emacs= (I installed the cli-only version, =emacs-nox=), =tmux= (terminal multiplexor, very useful), =zsh=, =vim= (for quick edits), and etc.
-
-** Security Related Stuff
-Now that a usable Arch Linux installation is in place, I would employ some security measures before hosting my website on it. 
-
-*** Secure Login via =ssh=
-On local machine, generate your ssh keypair:
-#+BEGIN_SRC sh
-$ ssh-keygen -t rsa
-#+END_SRC 
-
-Send your ssh keys to server:
-#+BEGIN_SRC sh
-$ ssh-copy-id <username>@<server>
-#+END_SRC 
-
-Now, on server, make the following edits to =/etc/ssh/sshd_config= :
-#+BEGIN_SRC sh
-PermitRootLogin no
-ChallengeResponseAuthentication no
-PasswordAuthentication no
-UsePAM no
-AllowUsers <username>
-#+END_SRC
-These changes will disable root login, disable password login and only allow specified user to login via ssh. 
-
-It is advisible to also change the default port (22) used for ssh connection, in the same file, specify port by (please remember this port selection):
-#+BEGIN_SRC sh
-port <non-std-port>
-#+END_SRC
-
-For these changes to take effect, restart =ssh= daemon:
-#+BEGIN_SRC sh
-$ sudo systemctl restart sshd.service
-#+END_SRC
-
-Keep this =ssh= session intact and attempt to start another =ssh= connection in local machine to see if the changes have taken effect (the original session is needed in case things are not working):
-#+BEGIN_SRC sh
-$ ssh -p <non-std-port> <username>@<server>
-#+END_SRC
-
-*** Firewall Settings
-
-I use =ufw= as my firewall and it is very easy to setup. Install =ufw= with =trizen= and enable the desired ports:
-#+BEGIN_SRC sh
-$ trizen -S ufw
-$ sudo ufw allow <port>/<protocol>
-#+END_SRC
-
-For instance, to allow =ssh= communication, allow =22/tcp= or =ssh= (if you used a non-standard port, allow =<non-std-port>/tcp=). Some other useful ports are:
-
-| Port      | Usage                               |
-|-----------+-------------------------------------|
-| =80/tcp=  | =http=                              |
-| =443/tcp= | =https=                             |
-| =143=     | imap access                         |
-| =993=     | imap over =ssl=                     |
-| =25=      | receive incoming mail               |
-| =587=     | smtp access (with or without =ssl=) |
-
-To review the added ports and enable them:
-#+BEGIN_SRC sh
-$ sudo ufw show added
-$ sudo ufw enable
-#+END_SRC
-
-Auto start up:
-#+BEGIN_SRC sh
-$ sudo systemctl enable ufw.service
-#+END_SRC
-
-*** Sync Server Time
-Sync server time with =ntp= :
-#+BEGIN_SRC sh
-$ trizen -S ntp
-$ sudo systemctl enable ntpd.service
-#+END_SRC
-
-Check time server status with:
-#+BEGIN_SRC sh
-$ ntpq -p
-#+END_SRC
-
-** Firing up the Server
-Next step would be actually preparing the server for serving contents. 
-
-*** Create Web Directory
-Create a directory for serving web contents, a common choice would be:
-#+BEGIN_SRC sh
-$ mkdir ~/public_html
-#+END_SRC
-Make sure to give this directory (including the user =home= folder) appropriate permission with =chmod= (=755= would normally work). Populate the directory with a simple =index.html= for testing if you want. 
-
-*** Instal =nginx=
-
-Install =nginx= with =trizen=, and edit =/etc/nginx/nginx.conf= to set up =http= server (the one set to =listen 80 default_server=):
-#+BEGIN_SRC 
-server_name www.<domainname> <domainname> 
-root /path/to/public_html
-#+END_SRC
-For the =server_name= line add as many as you want. You may want to put your mail server address on it as well so that you can generate a single ssl certificate for everything. After these changes are made, (re)start and enable =nginx=:
-#+BEGIN_SRC sh
-$ sudo systemctl restart nginx.service
-$ sudo systemctl enable nginx.service
-#+END_SRC
-
-*** DNS Setup
-
-The next step is to set up DNS records for our server. There are three types of records that need to be set up initially, =NS=, =A=, and =CNAME=. I also included some other useful records:
-
-| Type    | Hostname              | Value                         | Usage                                                    |
-| =NS=    | @                     | nameserver address            | specifiec name server to use                             |
-| =A=     | @                     | supplied IPv4 address         | redirects host name to IPv4 address                      |
-| =CNAME= | www (can be anything) | @                             | sets =www.<hostname>= as an alias                        |
-| =MX=    | @                     | mail server address           | specifiec mail server to use                             |
-| =CAA=   | @                     | authorizor of SSL certificate | prevents other authority from certifying SSL certificate |
-
-In my case, though I use Google Domains to host my domain, I still use DigitalOcean's name server. So I needed to setup these records on DigitalOcean and =NS= records on Google Domains. 
-
-After this step, you website should be accessible via your domain name, although it may take a few hours for the DNS record to populate. 
-
-*** SSL Certificate
-[[https://letsencrypt.org][Let's Encrypt]] is a great project and [[https://certbot.eff.org/][=certbot=]] is an awesome tool for SSL certificate generation. Kudos to the nice folks at EFF and Linux Foundation. I simply followed the instructions on [[https://certbot.eff.org/#arch-nginx][EFF site]]:
-
-#+BEGIN_SRC sh
-$ sudo pacman -S certbot-nginx
-$ sudo certbot --nginx
-#+END_SRC
-
-To provide some extra credibility to the certificate, I added an =CAA= record in my DNS settings with issue authority granted for =letsencrypt.org=. For now Let's Encrypt does not support wildcard certificate but will be [[https://letsencrypt.org/2017/07/06/wildcard-certificates-coming-jan-2018.html][January 2018]], and this is why I added a bunch of subdomains into my =nginx.config= (so that the certificate covers these subdomains as well). 
-
-** What Now?
-After a couple hours (mostly waiting for DNS records to populate), and my website is online again. With a VPS at my disposal, I also host my personal email now and I might organize my random notes pieced from various websites into a post as well. I am still trying to figure out an efficient workflow for writing multilingual post with =org-mode= in =hugo= and once I am convinced I have found an acceptable solution, I will also post it. 
diff --git a/content/posts/2017-09-25-server-setup.zh.org b/content/posts/2017-09-25-server-setup.zh.org
@@ -1,265 +0,0 @@
-+++
-title           = "新站点架设过程"
-date            = 2017-09-24T10:43:29-05:00
-draft           = false
-tags            = ["Arch Linux",
-		   "Server"]
-categories      = ["Site Related"]
-slug            =  "my server setups and whatnot"
-+++
-
-** 为何要重新建站?新站建在哪里?
-
-在忍受了笨重的 Wordpress 三年后(以及 Bluehost 充满2003年设计感的管理面板),我终于决定放弃旧站另起炉灶。我对 Wordpress 博客主要有这些不满:
-
-- 体积庞大,占用很多不必要的服务器空间。
-- 没法使用我熟悉的工具来方便地备份。
-- 没有良好的命令行界面,而命令行正在成为我做任何事情的首选工具。
-- 缺少一些我所需要的基本功能,比如多语言支持。在部分人手里 WordPress 或许极为强大,但是我不想投入时间学习 CSS/js/php ,也不想从那些源头不明的 WordPress 插件商店里下载任何东西。
-- 这些 WordPress 主题/插件商店让我想起 Ubuntu 软件中心。
-- WordPress 有很多我用不到的功能,比如用户系统。这用在个人博客上显然是杀鸡用牛刀。
-
-在我确定了自己的需求后,我很容易地就找到了替代品:一个用我所知道的编程语言(或者我愿意学习的编程语言)所实现的快而小巧并带有原生多语言支持的静态站点生成器,那就是 =hugo= 。
-
-至于站点托管服务,我本来考虑使用 github pages 或 netlify 这种简单快速的解决办法,但是考虑到是个人站点,还是 VPS 这种功能强大一些的选择比较合适。而且 github pages 不支持自定义域名的 https ,这对我来说无法接受。我列出了所有比较出名的 VPS 服务提供商,筛出支持 Arch Linux 的部分,最后选择了 DigitalOcean 。由于我想要完全切断和 Bluehost 的联系,我把自己的域名也转移到了 Google Domains 。
-  
-** 安装 Arch Linux
-注意 Arch Linux 其实并不适合用作服务器操作系统。如果一切以系统稳定性为优先,那么选择一个非滚动更新的 Linux 发行版比较合适。我在服务器上用 Arch Linux 主要是因为我在我的所有其他电脑上也都运行 Arch Linux。如果你选择使用 Arch Linux 作为服务器操作系统,最好勤于备份:虽然我还没遇到这种情况,但是常有人抱怨 Arch Linux 很容易被玩坏。
-
-*** 安装系统
-显然我得到的关于 DigitalOcean 支持 Arch Linux 的情报已经过时了,他们已经停止支持 Arch Linux 有一阵子了。好在有 [[https://github.com/gh2o/digitalocean-debian-to-arch][digitalocean-debian-to-arch]] ,使得在水滴( droplet , DigitalOcean 对每个服务器的称呼)上安装 Arch Linux 并不困难。我只需要 [[https://www.digitalocean.com/community/tutorials/how-to-create-your-first-digitalocean-droplet][新建一个 droplet]] ,通过 =ssh= 登录服务器,并执行:
-
-#+BEGIN_SRC sh
-# wget https://raw.githubusercontent.com/gh2o/digitalocean-debian-to-arch/debian9/install.sh -O install.sh
-# bash install.sh
-#+END_SRC
-
-*** 系统设置
-上述安装完成后,我的 droplet 上就有了带有网络的 Arch Linux 。绝大部分的额外设置都可以在 [[https://wiki.archlinux.org/index.php/Installation_guide][Arch Wiki]] 找到。我并没有想把这篇日志写成完整的教程,所以细节部分最好参考 Arch Wiki。记录在这篇日志里的指令只是做个人记录之用。
-
-**** 系统时钟
-同步系统时钟并设置时区。
-#+BEGIN_SRC sh
-# timedatectl set-ntp true
-# timedatectl settimezone <Region>/<City>
-#+END_SRC
-
-**** 安装基础软件包
-安装/升级 =base= 和 =base-devel= 软件包。
-#+BEGIN_SRC sh
-# pacman -S base base-devel
-#+END_SRC
-
-**** Fstab
-
-生成 =fstab= 。
-#+BEGIN_SRC sh
-# genfstab -U / >> /etc/fstab
-#+END_SRC
-
-**** 设置系统语言环境
-在 =/etc/locale.conf= 里去掉 =en_US.UTF-8 UTF-8= 的注释,然后运行:
-#+BEGIN_SRC sh 
-locale-gen
-#+END_SRC
-
-在 =/etc/locale.conf= 里设置 =LANG=en_US.UTF-8= 。
-
-**** 主机名
-编辑 =/etc/hosts= 以加入水滴的主机名:
-#+BEGIN_SRC sh
-127.0.1.1    <hostname>.localdomain <hostname>
-#+END_SRC
-
-**** 引导加载程序和 Initramfs
-针对英特尔处理器的优化:
-#+BEGIN_SRC 
-# pacman -S intel-ucode
-# grub-mkconfig -o /boot/grub/grub.cfg
-#+END_SRC
-
-在 initramfs 里加入 =crc32= 模组,不然可能导致水滴无法启动。编辑 =/etc/mkinitcpio.conf= :
-#+BEGIN_SRC sh 
-MODULES= "crc32 libcrc32c crc32c_generic crc32c-intel crc32-pclmul"
-#+END_SRC
-
-重新生成 initramfs 镜像。
-#+BEGIN_SRC sh
-# mkinitcpio -p linux
-#+END_SRC
-
-**** Root 用户密码
-你懂的。
-#+BEGIN_SRC sh
-# passwd
-#+END_SRC
-
-*** 用户设置
-这是一些让 Arch Linux 使用起来更加友好的设置。
-
-**** 创建用户帐号
-显然只使用 root 帐号不是什么好主意:
-#+BEGIN_SRC sh
-# useradd -m -G wheel -s /bin/bash <username>
-# passwd <username>
-#+END_SRC
-
-**** 把用户加入 Sudoer
-编辑 =/etc/sudoers= 并加入:
-#+BEGIN_SRC sh
-<username> ALL=(ALL) ALL
-#+END_SRC
-
-**** 以用户身份登录
-剩下的设置都会以用户身份执行:
-#+BEGIN_SRC 
-# su <username>
-#+END_SRC
-
-**** 软件包管理器
-我一开始使用 =packer= 来同时使用 =pacman= 和安装 AUR 软件包。但是在我了解到其软件安装过程有 [[https://wiki.archlinux.org/index.php/AUR_helpers#Comparison_table][诸多安全隐患]] 后,我开始改用 =trizen= ( =pacaur= 是另一个较为稳妥的选择,而且在 reddit 上有一个机器人会在所有提到 =yaourt= 的帖子下面安利 =pacaur= ): =trizen= 会提示用户在安装前检查 =PKGBUILD= , =*.install= 以及其他代码,而且 =trizen= 是用 Perl 而不是 Bash 写的。想要安装 =trizen= ,先根据 [[https://aur.archlinux.org/packages/trizen/][AUR 页面]] 通过 =pacman= 安装 =trizen= 所依赖的软件包,然后克隆其 [[https://github.com/trizen/trizen][git 仓库]] 到本地。进入包含 =PKGBUILD= 的文件夹并运行:
-#+BEGIN_SRC sh
-$ makepkg
-#+END_SRC
-来编译软件包,
-#+BEGIN_SRC sh
-$ pacman -U trizen-*.pkg.tzr.xz
-#+END_SRC
-来安装 =trizen=. 
-
-**** 常用软件包
-在设置完软件包管理器后,就可以大肆安装各种软件了!我的一些必备软件包括 =emacs= (在服务器上我只安装了命令行版本, =emacs-nox=), =tmux= (可以使用同一个命令行窗口来同时运行多个指令,非常有用), =zsh= , =vim= (作快速编辑之用)。
-
-** 安全相关
-Arch Linux 安装完成之后,我在把网站搬进去之前进行了一些安全方面的设置。
-
-*** 使用 =ssh= 安全登录
-在本地机器上生成 ssh 密匙:
-#+BEGIN_SRC sh
-$ ssh-keygen -t rsa
-#+END_SRC 
-
-把 ssh 密匙发送到服务器:
-#+BEGIN_SRC sh
-$ ssh-copy-id <username>@<server>
-#+END_SRC 
-
-接下来再服务器上编辑 =/etc/ssh/sshd_config= :
-#+BEGIN_SRC sh
-PermitRootLogin no
-ChallengeResponseAuthentication no
-PasswordAuthentication no
-UsePAM no
-AllowUsers <username>
-#+END_SRC
-这些改动会禁止 root 账户登录,禁止使用密码登录,并只允许特定用户通过 ssh 登录。
-
-除此之外,把用于 ssh 的端口(默认为22)改掉也是一个很棒的安全措施。继续编辑同一个文件(请记牢所选择的端口):
-#+BEGIN_SRC sh
-port <non-std-port>
-#+END_SRC
-
-为了让这些改动生效,重启 =ssh= 进程:
-#+BEGIN_SRC sh
-$ sudo systemctl restart sshd.service
-#+END_SRC
-
-接下来保留目前的 =ssh= 链接不变并在一个新窗口内尝试建立新链接以确认一切正常(保留原有链接以防设置出错):
-#+BEGIN_SRC sh
-$ ssh -p <non-std-port> <username>@<server>
-#+END_SRC
-
-*** 防火墙设置
-
- =ufw= 作为防火墙非常方便易用。使用 =trizen= 来安装 =ufw= 并开放允许连接的端口:
-#+BEGIN_SRC sh
-$ trizen -S ufw
-$ sudo ufw allow <port>/<protocol>
-#+END_SRC
-
-如果想要允许 =ssh= 链接,开放 =22/tcp= 或 =ssh= (如果你改掉了默认端口,开放 =<non-std-port>/tcp= )。其他一些常用的端口有:
-
-| Port      | Usage                         |
-|-----------+-------------------------------|
-| =80/tcp=  | =http=                        |
-| =443/tcp= | =https=                       |
-| =143=     | imap 通信                     |
-| =993=     | imap =ssl= 通信               |
-| =25=      | 收取外界来的邮件              |
-| =587=     | smtp 通信 (不论有无 =ssl= ) |
-
-回顾已开放的端口并开启防火墙:
-#+BEGIN_SRC sh
-$ sudo ufw show added
-$ sudo ufw enable
-#+END_SRC
-
-设置自动启动:
-#+BEGIN_SRC sh
-$ sudo systemctl enable ufw.service
-#+END_SRC
-
-*** 同步服务器时间
-使用 =ntp= 同步服务器时间:
-#+BEGIN_SRC sh
-$ trizen -S ntp
-$ sudo systemctl enable ntpd.service
-#+END_SRC
-
-检查时间服务器的状态:
-#+BEGIN_SRC sh
-$ ntpq -p
-#+END_SRC
-
-** 正式启动服务器
-在完成以上设置后,就可以为服务器托管网站做准备了。
-
-*** 建立网页文件夹
-创建一个网页文件夹来放网页文件,一个比较普遍的选择是:
-#+BEGIN_SRC sh
-$ mkdir ~/public_html
-#+END_SRC
-
-确认该文件夹(以及用户的 =home= 文件夹)有合适的权限设置。权限设置可以用 =chmod= 修改(一般设成 =755= 就好)。可以在网页文件夹中放一个简单的 =index.html= 来方便测试。
-
-*** 安装 =nginx=
-
-用 =trizen= 安装 =nginx= ,并编辑 =/etc/nginx/nginx.conf= 来设立 =http= 服务器(带有 =listen 80 default_server= 设置的部分):
-#+BEGIN_SRC 
-server_name www.<domainname> <domainname> 
-root /path/to/public_html
-#+END_SRC
-
-在 =server_name= 这一行可以多列一些网址。如果你想一并架设邮箱服务器的话,一并将邮箱服务器地址列入网址就免去了生成额外的 ssl 证书的麻烦。在这些设置完成后,(重新)开始 =nginx= 并将其设为开机启动:
-#+BEGIN_SRC sh
-$ sudo systemctl restart nginx.service
-$ sudo systemctl enable nginx.service
-#+END_SRC
-
-*** DNS 设置
-
-下一步是为服务器完成 DNS 记录的设置。一开始必须设置的记录有三种: =NS= , =A= ,和 =CNAME= 。我记下了一些比较常用的记录:
-
-| 记录种类 | 主机名              | 数值                  | 用法                              |
-| =NS=     | @                      | DNS 服务器的地址  | 确认用于解析域名的服务器 |
-| =A=      | @                      | 水滴的 IPv4 地址   | 将主机名重定向到 IP 地址  |
-| =CNAME=  | www (可以是任何东西) | @                       | 将 =www.<hostname>= 设为主机名的 |
-| =MX=     | @                      | 邮箱服务器地址   | 指定邮箱服务器               |
-| =CAA=    | @                      | 标明 SSL 证书的授权机构 | 阻止其他授权机构为本站发行 SSL 证书 |
-
-我的域名托管在 Google Domains ,但我的网站用的是 DigitalOcean 的 DNS ,所以我需要在 DigitalOcean 上完成设置并在 Google Domains 里加入 =NS= 记录。
-
-在完成这些设置后,我就可以通过我的域名访问所架设的网站了,不过 DNS 记录通常需要数小时才会完全生效。
-
-*** SSL 证书
-[[https://letsencrypt.org][Let's Encrypt]] 是个非常棒的项目。使用 [[https://certbot.eff.org/][=certbot=]] 这个工具就可以很方便的生成 SSL 证书。这里向 EFF 和 Linux 基金会的人们致以谢意。生成证书只需要运行 [[https://certbot.eff.org/#arch-nginx][EFF 网站]] 上所记载的命令即可:
-
-#+BEGIN_SRC sh
-$ sudo pacman -S certbot-nginx
-$ sudo certbot --nginx
-#+END_SRC
-
-为了给证书增加一点可信度,我还在 DNS 记录中加了一条 =CAA= 记录,标明 =letsencrypt.org= 是唯一允许给本站 SSL 证书授权的机构。目前 Let's Encrypt 还不支持通配符证书,不过会在 [[https://letsencrypt.org/2017/07/06/wildcard-certificates-coming-jan-2018.html][2018年1月]] 添加这一支持。由于没有通配符证书,我只好在 =nginx.config= 里加上所有二级域名(这样生成证书的才能够为这些域名提供验证)。
-
-** 下一步?
-在鼓捣了几个小时后(其实大部分时间是在等 DNS 记录扩散),我的新站就上线了。既然选择了运行 VPS,我打算好好发挥它的潜能并架设了自己的电子邮箱。我正在考虑把架设邮箱过程中从各个网站七拼八凑其来的命令行笔记也整理成一篇日志。目前我仍在试图寻找使用 =org-mode= 在 =hugo= 里写多语言日志的最优工作流程。当我确信已经找到一套可以接受的解决方案的时候我会一并写成日志。 
diff --git a/content/posts/_index.en.md b/content/posts/_index.en.md
@@ -0,0 +1,7 @@
++++
+title = "Posts"
+lastmod = 2017-09-30T22:41:37-05:00
+draft = false
++++
+
+In case you want to view by [tags](/en/tags/) or [categories](/en/categories).+
\ No newline at end of file
diff --git a/content/posts/_index.en.org b/content/posts/_index.en.org
@@ -1,5 +0,0 @@
----
-title: "Posts"
----
-
-In case you want to view by [[/en/tags/][tags]] or [[/en/categories][categories]].
diff --git a/content/posts/_index.zh.md b/content/posts/_index.zh.md
@@ -0,0 +1,7 @@
++++
+title = "归档"
+lastmod = 2017-09-30T22:41:37-05:00
+draft = false
++++
+
+你也可以通过[标签](/zh/tags/)或[分类](/zh/categories)来浏览日志。+
\ No newline at end of file
diff --git a/content/posts/_index.zh.org b/content/posts/_index.zh.org
@@ -1,5 +0,0 @@
----
-title: "归档"
----
-
-你也可以通过[[/zh/tags/][标签]]或[[/zh/categories][分类]]来浏览日志。
diff --git a/content/posts/get-emacs-to-work-with-fcitx.en.md b/content/posts/get-emacs-to-work-with-fcitx.en.md
@@ -0,0 +1,47 @@
++++
+title = "Get emacs To Work With fcitx"
+lastmod = 2017-09-30T23:12:21-05:00
+tags = ["emacs", "fcitx"]
+draft = true
+date = 2017-09-25
+slug = "get-emacs-to-work-with-fcitx"
++++
+
+## Enabling fcitx in emacs {#enabling-fcitx-in-emacs}
+
+
+### fcitx-diagnose {#fcitx-diagnose}
+
+
+### locale settings {#locale-settings}
+
+export zh<sub>cn.utf</sub>-8
+set lc<sub>ctype</sub>=zh<sub>cn.utf</sub>-8
+
+
+### fcitx plugin in emacs {#fcitx-plugin-in-emacs}
+
+
+### disabling ctrl+space hot key {#disabling-ctrl-space-hot-key}
+
+replaced with os+space and ctrl+os
+
+
+## could be better {#could-be-better}
+
+do not want set lc-ctype globally
+run emacs as daemon
+
+
+### create new entry in .config/systemd/user/emacs.service {#create-new-entry-in-dot-config-systemd-user-emacs-dot-service}
+
+
+### add environment variable {#add-environment-variable}
+
+
+### problem: does not load init file {#problem-does-not-load-init-file}
+
+
+### setting up alias of emacsclient -nc in .zshrc {#setting-up-alias-of-emacsclient-nc-in-dot-zshrc}
+
+alias e="emacsclient -nc"+
\ No newline at end of file
diff --git a/content/posts/my-server-setups-and-whatnot.en.md b/content/posts/my-server-setups-and-whatnot.en.md
@@ -0,0 +1,344 @@
++++
+title = "Get emacs To Work With fcitx"
+lastmod = 2017-09-30T23:07:56-05:00
+tags = ["emacs", "fcitx"]
+draft = true
+date = 2017-09-25
+slug = "get-emacs-to-work-with-fcitx"
++++
+
+## Why move the blog? And to where? {#why-move-the-blog-and-to-where}
+
+After putting up with the clunky WordPress blog (and Bluehost's 2003-looking admin panel for that matter) for three years, I finally decided to ditch everything I currently have and restart my blog in a more civilized manner. There was a couple of things that I was not happy about my old WordPress setup, namely:
+
+-   Clunky and eats up my server storage.
+-   Not as easy way to back up with tools I know.
+-   Does not come with a command line interface, which is becoming my preferred way of doing almost anything.
+-   Lacking some basic features I wanted, i.e. multilingual support. As powerful as WordPress may be in the right hands, I do not want to invest too much effort in learning CSS/js/php nor do I want to use some plugin from some sketchy WordPress plugin marketplace.
+-   These theme and plugin marketplaces creeps me out in the same way as ubuntu software center.
+-   WordPress has a lot of features I do not actually need, i.e. user permission system, which is an overkill for my personal blog site.
+
+Picking an alternative blogging system was not too hard once I am aware of my needs: a fast and minimalist static site generator implemented in a language I know (or I found valuable to learn) with out-of-the-box multilingual support, a.k.a. `hugo`.
+
+As for hosting services, I considered github pages and netlify to be fast and easy solutions but I want something more substantial for a personal blog, like a VPS. Besides, github pages not supporting https for custom domains is a deal breaker for me. I filtered down the list of VPS hosting providers with Arch Linux support and I ended up with DigitalOcean. Since I wanted to completely sever my connection with Bluehost, I also moved my domain name host to Google Domains.
+
+
+## Install Arch Linux {#install-arch-linux}
+
+Do note that Arch Linux is probably not the best suited server Linux distro. Use a non-rolling distro if stability is a concern. I use it only because I also run it on all my other computers. Backup the droplet often if you decided to go down this route: it hasn't happened to me yet but I've heard people complaining about Arch breaking too often.
+
+
+### Installation {#installation}
+
+Apparently my information on DigitalOcean supporting Arch Linux is outdated, as they stopped supporting it a while back. Thankfully, it is still not to hard to bring Arch Linux to a droplet (this is how DigitalOcean refer to a server) due to the awesome project [digitalocean-debian-to-arch](https://github.com/gh2o/digitalocean-debian-to-arch). All I needed to to was [set up a droplet](https://www.digitalocean.com/community/tutorials/how-to-create-your-first-digitalocean-droplet), `ssh` into the server, and follow the instructions:
+
+```sh
+# wget https://raw.githubusercontent.com/gh2o/digitalocean-debian-to-arch/debian9/install.sh -O install.sh
+# bash install.sh
+```
+
+
+### Low Level Setup {#low-level-setup}
+
+Once the script finishes running, I have an Arch Linux system running on my droplet with internet access. Most of the additional setups needed can be found in [Arch Wiki](https://wiki.archlinux.org/index.php/Installation_guide). Since I am by no means a great tutorial writer, I suggest referring to Arch Wiki for detailed steps. The recorded commands here are just for book-keeping purposes and is by no means the best way to do things.
+
+
+#### System Clock {#system-clock}
+
+Sync system clock and set time zone.
+
+```sh
+# timedatectl set-ntp true
+# timedatectl settimezone <Region>/<City>
+```
+
+
+#### Base Packages {#base-packages}
+
+Install/update base packages.
+
+```sh
+# pacman -S base base-devel
+```
+
+
+#### Fstab {#fstab}
+
+Generate `fstab`.
+
+```sh
+# genfstab -U / >> /etc/fstab
+```
+
+
+#### Set Locale {#set-locale}
+
+Uncomment `en_US.UTF-8 UTF-8` in `/etc/locale.conf` then generate locale with:
+
+```sh
+locale-gen
+```
+
+Set `LANG=en_US.UTF-8` in `/etc/locale.conf`.
+
+
+#### Hostname {#hostname}
+
+Edit `/etc/hosts` and add hostname of droplet:
+
+```sh
+127.0.1.1    <hostname>.localdomain <hostname>
+```
+
+
+#### Boot Loader and Initramfs {#boot-loader-and-initramfs}
+
+Optimizations for intel processors:
+
+```sh
+# pacman -S intel-ucode
+# grub-mkconfig -o /boot/grub/grub.cfg
+```
+
+Add `crc32` modules to initramfs, as otherwise the droplet fails to boot. Edit `/etc/mkinitcpio.conf` :
+
+```sh
+MODULES= "crc32 libcrc32c crc32c_generic crc32c-intel crc32-pclmul"
+```
+
+Regenerate the initramfs image.
+
+```sh
+# mkinitcpio -p linux
+```
+
+
+#### Root Password {#root-password}
+
+You know the drill.
+
+```sh
+# passwd
+```
+
+
+### User Setups {#user-setups}
+
+Here are some additional settings to make Arch Linux more useable.
+
+
+#### Creature User {#creature-user}
+
+Obviously it is not a good idea to use root account:
+
+```sh
+# useradd -m -G wheel -s /bin/bash <username>
+# passwd <username>
+```
+
+
+#### Add User to Sudoer {#add-user-to-sudoer}
+
+Edit `/etc/sudoers` and add:
+
+```sh
+<username> ALL=(ALL) ALL
+```
+
+
+#### Login As User {#login-as-user}
+
+We will finish the rest of the configuration using the user account.
+
+```sh
+# su <username>
+```
+
+
+#### Package Manager {#package-manager}
+
+I used to use `packer` as wrapper around AUR and `pacman`. However, after learning about [inherent insecurity](https://wiki.archlinux.org/index.php/AUR_helpers#Comparison_table) in their package building processes, I switched to a more secure AUR helper `trizen` (`pacaur` is another choice, and fun fact: there is a reddit bot that tells you to switch to `pacaur` every time `yaourt` is mentioned in a post): `trizen` prompts user to inspect `PKGBUILD`, `*.install` and other scripts before sourcing them and `trizen` is written in Perl instead of Bash. To install `trizen`, first install dependencies via `pacman` according to its [AUR Page](https://aur.archlinux.org/packages/trizen/), then clone its [git repo](https://github.com/trizen/trizen) to a local directory. Navigate to the directory containing `PKGBUILD` and run
+
+```sh
+$ makepkg
+```
+
+to make package and
+
+```sh
+$ pacman -U trizen-*.pkg.tzr.xz
+```
+
+to install `trizen`.
+
+
+#### Useful Packages {#useful-packages}
+
+Once package manager is in place, install packages to your heart's content! Some of my bread-and-butter packages include `emacs` (I installed the cli-only version, `emacs-nox`), `tmux` (terminal multiplexor, very useful), `zsh`, `vim` (for quick edits), and etc.
+
+
+## Security Related Stuff {#security-related-stuff}
+
+Now that a usable Arch Linux installation is in place, I would employ some security measures before hosting my website on it.
+
+
+### Secure Login via `ssh` {#secure-login-via-ssh}
+
+On local machine, generate your ssh keypair:
+
+```sh
+$ ssh-keygen -t rsa
+```
+
+Send your ssh keys to server:
+
+```sh
+$ ssh-copy-id <username>@<server>
+```
+
+Now, on server, make the following edits to `/etc/ssh/sshd_config` :
+
+```sh
+PermitRootLogin no
+ChallengeResponseAuthentication no
+PasswordAuthentication no
+UsePAM no
+AllowUsers <username>
+```
+
+These changes will disable root login, disable password login and only allow specified user to login via ssh.
+
+It is advisible to also change the default port (22) used for ssh connection, in the same file, specify port by (please remember this port selection):
+
+```sh
+port <non-std-port>
+```
+
+For these changes to take effect, restart `ssh` daemon:
+
+```sh
+$ sudo systemctl restart sshd.service
+```
+
+Keep this `ssh` session intact and attempt to start another `ssh` connection in local machine to see if the changes have taken effect (the original session is needed in case things are not working):
+
+```sh
+$ ssh -p <non-std-port> <username>@<server>
+```
+
+
+### Firewall Settings {#firewall-settings}
+
+I use `ufw` as my firewall and it is very easy to setup. Install `ufw` with `trizen` and enable the desired ports:
+
+```sh
+$ trizen -S ufw
+$ sudo ufw allow <port>/<protocol>
+```
+
+For instance, to allow `ssh` communication, allow `22/tcp` or `ssh` (if you used a non-standard port, allow `<non-std-port>/tcp`). Some other useful ports are:
+
+| Port      | Usage                               |
+|-----------|-------------------------------------|
+| `80/tcp`  | `http`                              |
+| `443/tcp` | `https`                             |
+| `143`     | imap access                         |
+| `993`     | imap over `ssl`                     |
+| `25`      | receive incoming mail               |
+| `587`     | smtp access (with or without `ssl`) |
+
+To review the added ports and enable them:
+
+```sh
+$ sudo ufw show added
+$ sudo ufw enable
+```
+
+Auto start up:
+
+```sh
+$ sudo systemctl enable ufw.service
+```
+
+
+### Sync Server Time {#sync-server-time}
+
+Sync server time with `ntp` :
+
+```sh
+$ trizen -S ntp
+$ sudo systemctl enable ntpd.service
+```
+
+Check time server status with:
+
+```sh
+$ ntpq -p
+```
+
+
+## Firing up the Server {#firing-up-the-server}
+
+Next step would be actually preparing the server for serving contents.
+
+
+### Create Web Directory {#create-web-directory}
+
+Create a directory for serving web contents, a common choice would be:
+
+```sh
+$ mkdir ~/public_html
+```
+
+Make sure to give this directory (including the user `home` folder) appropriate permission with `chmod` (`755` would normally work). Populate the directory with a simple `index.html` for testing if you want.
+
+
+### Instal `nginx` {#instal-nginx}
+
+Install `nginx` with `trizen`, and edit `/etc/nginx/nginx.conf` to set up `http` server (the one set to `listen 80 default_server`):
+
+```sh
+server_name www.<domainname> <domainname>
+root /path/to/public_html
+```
+
+For the `server_name` line add as many as you want. You may want to put your mail server address on it as well so that you can generate a single ssl certificate for everything. After these changes are made, (re)start and enable `nginx`:
+
+```sh
+$ sudo systemctl restart nginx.service
+$ sudo systemctl enable nginx.service
+```
+
+
+### DNS Setup {#dns-setup}
+
+The next step is to set up DNS records for our server. There are three types of records that need to be set up initially, `NS`, `A`, and `CNAME`. I also included some other useful records:
+
+| Type    | Hostname              | Value                         | Usage                                                    |
+|---------|-----------------------|-------------------------------|----------------------------------------------------------|
+| `NS`    | @                     | nameserver address            | specifiec name server to use                             |
+| `A`     | @                     | supplied IPv4 address         | redirects host name to IPv4 address                      |
+| `CNAME` | www (can be anything) | @                             | sets `www.<hostname>` as an alias                        |
+| `MX`    | @                     | mail server address           | specifiec mail server to use                             |
+| `CAA`   | @                     | authorizor of SSL certificate | prevents other authority from certifying SSL certificate |
+
+In my case, though I use Google Domains to host my domain, I still use DigitalOcean's name server. So I needed to setup these records on DigitalOcean and `NS` records on Google Domains.
+
+After this step, you website should be accessible via your domain name, although it may take a few hours for the DNS record to populate.
+
+
+### SSL Certificate {#ssl-certificate}
+
+[Let's Encrypt](https://letsencrypt.org) is a great project and [`certbot`](https://certbot.eff.org/) is an awesome tool for SSL certificate generation. Kudos to the nice folks at EFF and Linux Foundation. I simply followed the instructions on [EFF site](https://certbot.eff.org/#arch-nginx):
+
+```sh
+$ sudo pacman -S certbot-nginx
+$ sudo certbot --nginx
+```
+
+To provide some extra credibility to the certificate, I added an `CAA` record in my DNS settings with issue authority granted for `letsencrypt.org`. For now Let's Encrypt does not support wildcard certificate but will be [January 2018](https://letsencrypt.org/2017/07/06/wildcard-certificates-coming-jan-2018.html), and this is why I added a bunch of subdomains into my `nginx.config` (so that the certificate covers these subdomains as well).
+
+
+## What Now? {#what-now}
+
+After a couple hours (mostly waiting for DNS records to populate), and my website is online again. With a VPS at my disposal, I also host my personal email now and I might organize my random notes pieced from various websites into a post as well. I am still trying to figure out an efficient workflow for writing multilingual post with `org-mode` in `hugo` and once I am convinced I have found an acceptable solution, I will also post it.+
\ No newline at end of file
diff --git a/content/posts/my-server-setups-and-whatnot.zh.md b/content/posts/my-server-setups-and-whatnot.zh.md
@@ -0,0 +1,7 @@
++++
+lastmod = 2017-09-30T23:07:34-05:00
+tags = ["emacs", "fcitx"]
+draft = true
+date = 2017-09-25
+slug = "get-emacs-to-work-with-fcitx"
++++
diff --git a/content/tags/_index.en.org b/content/tags/_index.en.org
@@ -1,3 +0,0 @@
----
-title: "Tags"
----
diff --git a/content/tags/_index.zh.org b/content/tags/_index.zh.org
@@ -1,3 +0,0 @@
----
-title: "标签"
----
diff --git a/i18n/en.toml b/i18n/en.toml
@@ -10,16 +10,18 @@ other = "Tags"
 [Categories]
 other = "Categories"
 
+# Translation for categories
+[site-related]
+other = "Site Related"
+
 # Translation for tags
-[Hugo]
+[hugo]
 other = "hugo"
 
-[Arch\ Linux]
+[arch-linux]
 other = "Arch Linux"
 
-[Server]
-other = "server"
+[server]
+other = "Server"
+
 
-# Translation for categories
-[Site\ Related]
-other = "Site Related"
diff --git a/i18n/zh.toml b/i18n/zh.toml
@@ -10,16 +10,17 @@ other = "标签"
 [Categories]
 other = "分类"
 
+# Translation for categories
+[site-related]
+other = "站点相关"
+
 # Translation for tags
-[Hugo]
+[hugo]
 other = "hugo"
 
-[Arch\ Linux]
+[arch-linux]
 other = "Arch Linux"
 
-[Server]
+[server]
 other = "服务器"
 
-# Translation for categories
-[Site\ Related]
-other = "站点相关"-
\ No newline at end of file
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
@@ -1,7 +1,8 @@
 {{ partial "header.html" . }}
 
 {{if not .IsHome }}
-  {{$title := i18n .Title}}
+  {{$title := lower .Title}}
+  {{$title := i18n $title}}
   {{ if eq $title ""}}
     <h1>{{ .Title }}</h1>
   {{ else }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -5,8 +5,9 @@
 {{ if .Params.date }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
 <p class="terms">
   {{ range $i := (slice "categories" "tags") }}
-  {{ with ($.Param $i) }}
-  {{ i18n ($i | title) }}: {{ range $k := . }}<a href="{{ relURL (print "/" $.Site.Language.Lang "/" $i "/" $k | urlize) }}">{{i18n $k}}</a> {{ end }}
+  {{ with ($.Param $i) }} 
+  {{ i18n ($i | title) }} | {{ range $k := . }}<a href="{{ relURL (print "/" $.Site.Language.Lang "/" $i "/" $k | urlize) }}">{{i18n $k}} </a> | {{ end }}
+  <br />
   {{ end }}
   {{ end }}
 </p>
diff --git a/org/2017.org b/org/2017.org
@@ -0,0 +1,619 @@
+#+HUGO_BASE_DIR: ../
+#+HUGO_SECTION: ./posts
+
+#+HUGO_AUTO_SET_LASTMOD: t
+
+* Index Page
+:PROPERTIES:
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER:
+:END:
+
+** en
+:PROPERTIES:
+:EXPORT_TITLE: Posts
+:EXPORT_FILE_NAME: _index.en.md
+:END:
+
+In case you want to view by [[/en/tags/][tags]] or [[/en/categories][categories]].
+
+** zh
+:PROPERTIES:
+:EXPORT_TITLE: 归档
+:EXPORT_FILE_NAME: _index.zh.md
+:END:
+
+你也可以通过[[/zh/tags/][标签]]或[[/zh/categories][分类]]来浏览日志。
+
+
+* Site Related                                                   :@site_related:
+Site related posts.
+
+** DONE My Server Setups and Whatnot                             :arch_linux:server:
+:PROPERTIES:
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :date 2017-09-25 :slug my-server-setups-and-whatnot 
+:END:
+
+*** DONE en
+:PROPERTIES:
+:EXPORT_TITLE: My Server Setups and Whatnot
+:EXPORT_FILE_NAME: my-server-setups-and-whatnot.en.md
+:END:
+
+**** Why move the blog? And to where?
+
+After putting up with the clunky WordPress blog (and Bluehost's 2003-looking admin panel for that matter) for three years, I finally decided to ditch everything I currently have and restart my blog in a more civilized manner. There was a couple of things that I was not happy about my old WordPress setup, namely:
+
+- Clunky and eats up my server storage.
+- Not as easy way to back up with tools I know.  
+- Does not come with a command line interface, which is becoming my preferred way of doing almost anything. 
+- Lacking some basic features I wanted, i.e. multilingual support. As powerful as WordPress may be in the right hands, I do not want to invest too much effort in learning CSS/js/php nor do I want to use some plugin from some sketchy WordPress plugin marketplace.  
+- These theme and plugin marketplaces creeps me out in the same way as ubuntu software center. 
+- WordPress has a lot of features I do not actually need, i.e. user permission system, which is an overkill for my personal blog site. 
+
+Picking an alternative blogging system was not too hard once I am aware of my needs: a fast and minimalist static site generator implemented in a language I know (or I found valuable to learn) with out-of-the-box multilingual support, a.k.a. =hugo=. 
+
+As for hosting services, I considered github pages and netlify to be fast and easy solutions but I want something more substantial for a personal blog, like a VPS. Besides, github pages not supporting https for custom domains is a deal breaker for me. I filtered down the list of VPS hosting providers with Arch Linux support and I ended up with DigitalOcean. Since I wanted to completely sever my connection with Bluehost, I also moved my domain name host to Google Domains. 
+  
+**** Install Arch Linux
+Do note that Arch Linux is probably not the best suited server Linux distro. Use a non-rolling distro if stability is a concern. I use it only because I also run it on all my other computers. Backup the droplet often if you decided to go down this route: it hasn't happened to me yet but I've heard people complaining about Arch breaking too often. 
+
+***** Installation
+Apparently my information on DigitalOcean supporting Arch Linux is outdated, as they stopped supporting it a while back. Thankfully, it is still not to hard to bring Arch Linux to a droplet (this is how DigitalOcean refer to a server) due to the awesome project [[https://github.com/gh2o/digitalocean-debian-to-arch][digitalocean-debian-to-arch]]. All I needed to to was [[https://www.digitalocean.com/community/tutorials/how-to-create-your-first-digitalocean-droplet][set up a droplet]], =ssh= into the server, and follow the instructions:
+
+#+BEGIN_SRC sh
+# wget https://raw.githubusercontent.com/gh2o/digitalocean-debian-to-arch/debian9/install.sh -O install.sh
+# bash install.sh
+#+END_SRC
+
+***** Low Level Setup
+Once the script finishes running, I have an Arch Linux system running on my droplet with internet access. Most of the additional setups needed can be found in [[https://wiki.archlinux.org/index.php/Installation_guide][Arch Wiki]]. Since I am by no means a great tutorial writer, I suggest referring to Arch Wiki for detailed steps. The recorded commands here are just for book-keeping purposes and is by no means the best way to do things.
+
+****** System Clock
+Sync system clock and set time zone. 
+#+BEGIN_SRC sh
+# timedatectl set-ntp true
+# timedatectl settimezone <Region>/<City>
+#+END_SRC
+
+****** Base Packages
+Install/update base packages.
+#+BEGIN_SRC sh
+# pacman -S base base-devel
+#+END_SRC
+
+****** Fstab
+
+Generate =fstab=. 
+#+BEGIN_SRC sh
+# genfstab -U / >> /etc/fstab
+#+END_SRC
+
+****** Set Locale
+Uncomment =en_US.UTF-8 UTF-8= in =/etc/locale.conf= then generate locale with:
+#+BEGIN_SRC sh 
+locale-gen
+#+END_SRC
+
+Set =LANG=en_US.UTF-8= in =/etc/locale.conf=. 
+
+****** Hostname
+Edit =/etc/hosts= and add hostname of droplet:
+#+BEGIN_SRC sh
+127.0.1.1    <hostname>.localdomain <hostname>
+#+END_SRC
+
+****** Boot Loader and Initramfs
+Optimizations for intel processors:
+#+BEGIN_SRC sh
+# pacman -S intel-ucode
+# grub-mkconfig -o /boot/grub/grub.cfg
+#+END_SRC
+
+Add =crc32= modules to initramfs, as otherwise the droplet fails to boot. Edit =/etc/mkinitcpio.conf= :
+#+BEGIN_SRC sh 
+MODULES= "crc32 libcrc32c crc32c_generic crc32c-intel crc32-pclmul"
+#+END_SRC
+Regenerate the initramfs image.
+#+BEGIN_SRC sh
+# mkinitcpio -p linux
+#+END_SRC
+
+****** Root Password
+You know the drill. 
+#+BEGIN_SRC sh
+# passwd
+#+END_SRC
+
+***** User Setups
+Here are some additional settings to make Arch Linux more useable.
+
+****** Creature User
+
+Obviously it is not a good idea to use root account:
+#+BEGIN_SRC sh
+# useradd -m -G wheel -s /bin/bash <username>
+# passwd <username>
+#+END_SRC
+
+****** Add User to Sudoer
+
+Edit =/etc/sudoers= and add:
+#+BEGIN_SRC sh
+<username> ALL=(ALL) ALL
+#+END_SRC
+
+****** Login As User
+We will finish the rest of the configuration using the user account. 
+#+BEGIN_SRC sh
+# su <username>
+#+END_SRC
+
+****** Package Manager
+I used to use =packer= as wrapper around AUR and =pacman=. However, after learning about [[https://wiki.archlinux.org/index.php/AUR_helpers#Comparison_table][inherent insecurity]] in their package building processes, I switched to a more secure AUR helper =trizen= (=pacaur= is another choice, and fun fact: there is a reddit bot that tells you to switch to =pacaur= every time =yaourt= is mentioned in a post): =trizen= prompts user to inspect =PKGBUILD=, =*.install= and other scripts before sourcing them and =trizen= is written in Perl instead of Bash. To install =trizen=, first install dependencies via =pacman= according to its [[https://aur.archlinux.org/packages/trizen/][AUR Page]], then clone its [[https://github.com/trizen/trizen][git repo]] to a local directory. Navigate to the directory containing =PKGBUILD= and run
+#+BEGIN_SRC sh
+$ makepkg
+#+END_SRC
+to make package and 
+#+BEGIN_SRC sh
+$ pacman -U trizen-*.pkg.tzr.xz
+#+END_SRC
+to install =trizen=. 
+
+****** Useful Packages
+Once package manager is in place, install packages to your heart's content! Some of my bread-and-butter packages include =emacs= (I installed the cli-only version, =emacs-nox=), =tmux= (terminal multiplexor, very useful), =zsh=, =vim= (for quick edits), and etc.
+
+**** Security Related Stuff
+Now that a usable Arch Linux installation is in place, I would employ some security measures before hosting my website on it. 
+
+***** Secure Login via =ssh=
+On local machine, generate your ssh keypair:
+#+BEGIN_SRC sh
+$ ssh-keygen -t rsa
+#+END_SRC 
+
+Send your ssh keys to server:
+#+BEGIN_SRC sh
+$ ssh-copy-id <username>@<server>
+#+END_SRC 
+
+Now, on server, make the following edits to =/etc/ssh/sshd_config= :
+#+BEGIN_SRC sh
+PermitRootLogin no
+ChallengeResponseAuthentication no
+PasswordAuthentication no
+UsePAM no
+AllowUsers <username>
+#+END_SRC
+These changes will disable root login, disable password login and only allow specified user to login via ssh. 
+
+It is advisible to also change the default port (22) used for ssh connection, in the same file, specify port by (please remember this port selection):
+#+BEGIN_SRC sh
+port <non-std-port>
+#+END_SRC
+
+For these changes to take effect, restart =ssh= daemon:
+#+BEGIN_SRC sh
+$ sudo systemctl restart sshd.service
+#+END_SRC
+
+Keep this =ssh= session intact and attempt to start another =ssh= connection in local machine to see if the changes have taken effect (the original session is needed in case things are not working):
+#+BEGIN_SRC sh
+$ ssh -p <non-std-port> <username>@<server>
+#+END_SRC
+
+***** Firewall Settings
+
+I use =ufw= as my firewall and it is very easy to setup. Install =ufw= with =trizen= and enable the desired ports:
+#+BEGIN_SRC sh
+$ trizen -S ufw
+$ sudo ufw allow <port>/<protocol>
+#+END_SRC
+
+For instance, to allow =ssh= communication, allow =22/tcp= or =ssh= (if you used a non-standard port, allow =<non-std-port>/tcp=). Some other useful ports are:
+
+| Port      | Usage                               |
+|-----------+-------------------------------------|
+| =80/tcp=  | =http=                              |
+| =443/tcp= | =https=                             |
+| =143=     | imap access                         |
+| =993=     | imap over =ssl=                     |
+| =25=      | receive incoming mail               |
+| =587=     | smtp access (with or without =ssl=) |
+
+To review the added ports and enable them:
+#+BEGIN_SRC sh
+$ sudo ufw show added
+$ sudo ufw enable
+#+END_SRC
+
+Auto start up:
+#+BEGIN_SRC sh
+$ sudo systemctl enable ufw.service
+#+END_SRC
+
+***** Sync Server Time
+Sync server time with =ntp= :
+#+BEGIN_SRC sh
+$ trizen -S ntp
+$ sudo systemctl enable ntpd.service
+#+END_SRC
+
+Check time server status with:
+#+BEGIN_SRC sh
+$ ntpq -p
+#+END_SRC
+
+**** Firing up the Server
+Next step would be actually preparing the server for serving contents. 
+
+***** Create Web Directory
+Create a directory for serving web contents, a common choice would be:
+#+BEGIN_SRC sh
+$ mkdir ~/public_html
+#+END_SRC
+Make sure to give this directory (including the user =home= folder) appropriate permission with =chmod= (=755= would normally work). Populate the directory with a simple =index.html= for testing if you want. 
+
+***** Instal =nginx=
+
+Install =nginx= with =trizen=, and edit =/etc/nginx/nginx.conf= to set up =http= server (the one set to =listen 80 default_server=):
+#+BEGIN_SRC sh
+server_name www.<domainname> <domainname> 
+root /path/to/public_html
+#+END_SRC
+For the =server_name= line add as many as you want. You may want to put your mail server address on it as well so that you can generate a single ssl certificate for everything. After these changes are made, (re)start and enable =nginx=:
+#+BEGIN_SRC sh
+$ sudo systemctl restart nginx.service
+$ sudo systemctl enable nginx.service
+#+END_SRC
+
+***** DNS Setup
+
+The next step is to set up DNS records for our server. There are three types of records that need to be set up initially, =NS=, =A=, and =CNAME=. I also included some other useful records:
+
+| Type    | Hostname              | Value                         | Usage                                                    |
+|---------+-----------------------+-------------------------------+----------------------------------------------------------|
+| =NS=    | @                     | nameserver address            | specifiec name server to use                             |
+| =A=     | @                     | supplied IPv4 address         | redirects host name to IPv4 address                      |
+| =CNAME= | www (can be anything) | @                             | sets =www.<hostname>= as an alias                        |
+| =MX=    | @                     | mail server address           | specifiec mail server to use                             |
+| =CAA=   | @                     | authorizor of SSL certificate | prevents other authority from certifying SSL certificate |
+
+In my case, though I use Google Domains to host my domain, I still use DigitalOcean's name server. So I needed to setup these records on DigitalOcean and =NS= records on Google Domains. 
+
+After this step, you website should be accessible via your domain name, although it may take a few hours for the DNS record to populate. 
+
+***** SSL Certificate
+[[https://letsencrypt.org][Let's Encrypt]] is a great project and [[https://certbot.eff.org/][=certbot=]] is an awesome tool for SSL certificate generation. Kudos to the nice folks at EFF and Linux Foundation. I simply followed the instructions on [[https://certbot.eff.org/#arch-nginx][EFF site]]:
+
+#+BEGIN_SRC sh
+$ sudo pacman -S certbot-nginx
+$ sudo certbot --nginx
+#+END_SRC
+
+To provide some extra credibility to the certificate, I added an =CAA= record in my DNS settings with issue authority granted for =letsencrypt.org=. For now Let's Encrypt does not support wildcard certificate but will be [[https://letsencrypt.org/2017/07/06/wildcard-certificates-coming-jan-2018.html][January 2018]], and this is why I added a bunch of subdomains into my =nginx.config= (so that the certificate covers these subdomains as well). 
+
+**** What Now?
+After a couple hours (mostly waiting for DNS records to populate), and my website is online again. With a VPS at my disposal, I also host my personal email now and I might organize my random notes pieced from various websites into a post as well. I am still trying to figure out an efficient workflow for writing multilingual post with =org-mode= in =hugo= and once I am convinced I have found an acceptable solution, I will also post it. 
+
+*** DONE zh
+:PROPERTIES:
+:EXPORT_TITLE: 新站点架设过程
+:EXPORT_FILE_NAME: my-server-setups-and-whatnot.zh.md
+:END:
+
+**** 为何要重新建站?新站建在哪里?
+
+在忍受了笨重的 Wordpress 三年后(以及 Bluehost 充满2003年设计感的管理面板),我终于决定放弃旧站另起炉灶。我对 Wordpress 博客主要有这些不满:
+
+- 体积庞大,占用很多不必要的服务器空间。
+- 没法使用我熟悉的工具来方便地备份。
+- 没有良好的命令行界面,而命令行正在成为我做任何事情的首选工具。
+- 缺少一些我所需要的基本功能,比如多语言支持。在部分人手里 WordPress 或许极为强大,但是我不想投入时间学习 CSS/js/php ,也不想从那些源头不明的 WordPress 插件商店里下载任何东西。
+- 这些 WordPress 主题/插件商店让我想起 Ubuntu 软件中心。
+- WordPress 有很多我用不到的功能,比如用户系统。这用在个人博客上显然是杀鸡用牛刀。
+
+在我确定了自己的需求后,我很容易地就找到了替代品:一个用我所知道的编程语言(或者我愿意学习的编程语言)所实现的快而小巧并带有原生多语言支持的静态站点生成器,那就是 =hugo= 。
+
+至于站点托管服务,我本来考虑使用 github pages 或 netlify 这种简单快速的解决办法,但是考虑到是个人站点,还是 VPS 这种功能强大一些的选择比较合适。而且 github pages 不支持自定义域名的 https ,这对我来说无法接受。我列出了所有比较出名的 VPS 服务提供商,筛出支持 Arch Linux 的部分,最后选择了 DigitalOcean 。由于我想要完全切断和 Bluehost 的联系,我把自己的域名也转移到了 Google Domains 。
+  
+**** 安装 Arch Linux
+注意 Arch Linux 其实并不适合用作服务器操作系统。如果一切以系统稳定性为优先,那么选择一个非滚动更新的 Linux 发行版比较合适。我在服务器上用 Arch Linux 主要是因为我在我的所有其他电脑上也都运行 Arch Linux。如果你选择使用 Arch Linux 作为服务器操作系统,最好勤于备份:虽然我还没遇到这种情况,但是常有人抱怨 Arch Linux 很容易被玩坏。
+
+***** 安装系统
+显然我得到的关于 DigitalOcean 支持 Arch Linux 的情报已经过时了,他们已经停止支持 Arch Linux 有一阵子了。好在有 [[https://github.com/gh2o/digitalocean-debian-to-arch][digitalocean-debian-to-arch]] ,使得在水滴( droplet , DigitalOcean 对每个服务器的称呼)上安装 Arch Linux 并不困难。我只需要 [[https://www.digitalocean.com/community/tutorials/how-to-create-your-first-digitalocean-droplet][新建一个 droplet]] ,通过 =ssh= 登录服务器,并执行:
+
+#+BEGIN_SRC sh
+# wget https://raw.githubusercontent.com/gh2o/digitalocean-debian-to-arch/debian9/install.sh -O install.sh
+# bash install.sh
+#+END_SRC
+
+***** 系统设置
+上述安装完成后,我的 droplet 上就有了带有网络的 Arch Linux 。绝大部分的额外设置都可以在 [[https://wiki.archlinux.org/index.php/Installation_guide][Arch Wiki]] 找到。我并没有想把这篇日志写成完整的教程,所以细节部分最好参考 Arch Wiki。记录在这篇日志里的指令只是做个人记录之用。
+
+****** 系统时钟
+同步系统时钟并设置时区。
+#+BEGIN_SRC sh
+# timedatectl set-ntp true
+# timedatectl settimezone <Region>/<City>
+#+END_SRC
+
+****** 安装基础软件包
+安装/升级 =base= 和 =base-devel= 软件包。
+#+BEGIN_SRC sh
+# pacman -S base base-devel
+#+END_SRC
+
+****** Fstab
+
+生成 =fstab= 。
+#+BEGIN_SRC sh
+# genfstab -U / >> /etc/fstab
+#+END_SRC
+
+****** 设置系统语言环境
+在 =/etc/locale.conf= 里去掉 =en_US.UTF-8 UTF-8= 的注释,然后运行:
+#+BEGIN_SRC sh 
+locale-gen
+#+END_SRC
+
+在 =/etc/locale.conf= 里设置 =LANG=en_US.UTF-8= 。
+
+****** 主机名
+编辑 =/etc/hosts= 以加入水滴的主机名:
+#+BEGIN_SRC sh
+127.0.1.1    <hostname>.localdomain <hostname>
+#+END_SRC
+
+****** 引导加载程序和 Initramfs
+针对英特尔处理器的优化:
+#+BEGIN_SRC sh 
+# pacman -S intel-ucode
+# grub-mkconfig -o /boot/grub/grub.cfg
+#+END_SRC
+
+在 initramfs 里加入 =crc32= 模组,不然可能导致水滴无法启动。编辑 =/etc/mkinitcpio.conf= :
+#+BEGIN_SRC sh 
+MODULES= "crc32 libcrc32c crc32c_generic crc32c-intel crc32-pclmul"
+#+END_SRC
+
+重新生成 initramfs 镜像。
+#+BEGIN_SRC sh
+# mkinitcpio -p linux
+#+END_SRC
+
+****** Root 用户密码
+你懂的。
+#+BEGIN_SRC sh
+# passwd
+#+END_SRC
+
+***** 用户设置
+这是一些让 Arch Linux 使用起来更加友好的设置。
+
+****** 创建用户帐号
+显然只使用 root 帐号不是什么好主意:
+#+BEGIN_SRC sh
+# useradd -m -G wheel -s /bin/bash <username>
+# passwd <username>
+#+END_SRC
+
+****** 把用户加入 Sudoer
+编辑 =/etc/sudoers= 并加入:
+#+BEGIN_SRC sh
+<username> ALL=(ALL) ALL
+#+END_SRC
+
+****** 以用户身份登录
+剩下的设置都会以用户身份执行:
+#+BEGIN_SRC sh
+# su <username>
+#+END_SRC
+
+****** 软件包管理器
+我一开始使用 =packer= 来同时使用 =pacman= 和安装 AUR 软件包。但是在我了解到其软件安装过程有 [[https://wiki.archlinux.org/index.php/AUR_helpers#Comparison_table][诸多安全隐患]] 后,我开始改用 =trizen= ( =pacaur= 是另一个较为稳妥的选择,而且在 reddit 上有一个机器人会在所有提到 =yaourt= 的帖子下面安利 =pacaur= ): =trizen= 会提示用户在安装前检查 =PKGBUILD= , =*.install= 以及其他代码,而且 =trizen= 是用 Perl 而不是 Bash 写的。想要安装 =trizen= ,先根据 [[https://aur.archlinux.org/packages/trizen/][AUR 页面]] 通过 =pacman= 安装 =trizen= 所依赖的软件包,然后克隆其 [[https://github.com/trizen/trizen][git 仓库]] 到本地。进入包含 =PKGBUILD= 的文件夹并运行:
+#+BEGIN_SRC sh
+$ makepkg
+#+END_SRC
+来编译软件包,
+#+BEGIN_SRC sh
+$ pacman -U trizen-*.pkg.tzr.xz
+#+END_SRC
+来安装 =trizen=. 
+
+****** 常用软件包
+在设置完软件包管理器后,就可以大肆安装各种软件了!我的一些必备软件包括 =emacs= (在服务器上我只安装了命令行版本, =emacs-nox=), =tmux= (可以使用同一个命令行窗口来同时运行多个指令,非常有用), =zsh= , =vim= (作快速编辑之用)。
+
+**** 安全相关
+Arch Linux 安装完成之后,我在把网站搬进去之前进行了一些安全方面的设置。
+
+***** 使用 =ssh= 安全登录
+在本地机器上生成 ssh 密匙:
+#+BEGIN_SRC sh
+$ ssh-keygen -t rsa
+#+END_SRC 
+
+把 ssh 密匙发送到服务器:
+#+BEGIN_SRC sh
+$ ssh-copy-id <username>@<server>
+#+END_SRC 
+
+接下来再服务器上编辑 =/etc/ssh/sshd_config= :
+#+BEGIN_SRC sh
+PermitRootLogin no
+ChallengeResponseAuthentication no
+PasswordAuthentication no
+UsePAM no
+AllowUsers <username>
+#+END_SRC
+这些改动会禁止 root 账户登录,禁止使用密码登录,并只允许特定用户通过 ssh 登录。
+
+除此之外,把用于 ssh 的端口(默认为22)改掉也是一个很棒的安全措施。继续编辑同一个文件(请记牢所选择的端口):
+#+BEGIN_SRC sh
+port <non-std-port>
+#+END_SRC
+
+为了让这些改动生效,重启 =ssh= 进程:
+#+BEGIN_SRC sh
+$ sudo systemctl restart sshd.service
+#+END_SRC
+
+接下来保留目前的 =ssh= 链接不变并在一个新窗口内尝试建立新链接以确认一切正常(保留原有链接以防设置出错):
+#+BEGIN_SRC sh
+$ ssh -p <non-std-port> <username>@<server>
+#+END_SRC
+
+***** 防火墙设置
+
+ =ufw= 作为防火墙非常方便易用。使用 =trizen= 来安装 =ufw= 并开放允许连接的端口:
+#+BEGIN_SRC sh
+$ trizen -S ufw
+$ sudo ufw allow <port>/<protocol>
+#+END_SRC
+
+如果想要允许 =ssh= 链接,开放 =22/tcp= 或 =ssh= (如果你改掉了默认端口,开放 =<non-std-port>/tcp= )。其他一些常用的端口有:
+
+| Port      | Usage                         |
+|-----------+-------------------------------|
+| =80/tcp=  | =http=                        |
+| =443/tcp= | =https=                       |
+| =143=     | imap 通信                     |
+| =993=     | imap =ssl= 通信               |
+| =25=      | 收取外界来的邮件              |
+| =587=     | smtp 通信 (不论有无 =ssl= ) |
+
+回顾已开放的端口并开启防火墙:
+#+BEGIN_SRC sh
+$ sudo ufw show added
+$ sudo ufw enable
+#+END_SRC
+
+设置自动启动:
+#+BEGIN_SRC sh
+$ sudo systemctl enable ufw.service
+#+END_SRC
+
+***** 同步服务器时间
+使用 =ntp= 同步服务器时间:
+#+BEGIN_SRC sh
+$ trizen -S ntp
+$ sudo systemctl enable ntpd.service
+#+END_SRC
+
+检查时间服务器的状态:
+#+BEGIN_SRC sh
+$ ntpq -p
+#+END_SRC
+
+**** 正式启动服务器
+在完成以上设置后,就可以为服务器托管网站做准备了。
+
+***** 建立网页文件夹
+创建一个网页文件夹来放网页文件,一个比较普遍的选择是:
+#+BEGIN_SRC sh
+$ mkdir ~/public_html
+#+END_SRC
+
+确认该文件夹(以及用户的 =home= 文件夹)有合适的权限设置。权限设置可以用 =chmod= 修改(一般设成 =755= 就好)。可以在网页文件夹中放一个简单的 =index.html= 来方便测试。
+
+***** 安装 =nginx=
+
+用 =trizen= 安装 =nginx= ,并编辑 =/etc/nginx/nginx.conf= 来设立 =http= 服务器(带有 =listen 80 default_server= 设置的部分):
+#+BEGIN_SRC sh
+server_name www.<domainname> <domainname> 
+root /path/to/public_html
+#+END_SRC
+
+在 =server_name= 这一行可以多列一些网址。如果你想一并架设邮箱服务器的话,一并将邮箱服务器地址列入网址就免去了生成额外的 ssl 证书的麻烦。在这些设置完成后,(重新)开始 =nginx= 并将其设为开机启动:
+#+BEGIN_SRC sh
+$ sudo systemctl restart nginx.service
+$ sudo systemctl enable nginx.service
+#+END_SRC
+
+***** DNS 设置
+
+下一步是为服务器完成 DNS 记录的设置。一开始必须设置的记录有三种: =NS= , =A= ,和 =CNAME= 。我记下了一些比较常用的记录:
+
+| 记录种类 | 主机名              | 数值                  | 用法                              |
+| =NS=     | @                      | DNS 服务器的地址  | 确认用于解析域名的服务器 |
+| =A=      | @                      | 水滴的 IPv4 地址   | 将主机名重定向到 IP 地址  |
+| =CNAME=  | www (可以是任何东西) | @                       | 将 =www.<hostname>= 设为主机名的 |
+| =MX=     | @                      | 邮箱服务器地址   | 指定邮箱服务器               |
+| =CAA=    | @                      | 标明 SSL 证书的授权机构 | 阻止其他授权机构为本站发行 SSL 证书 |
+
+我的域名托管在 Google Domains ,但我的网站用的是 DigitalOcean 的 DNS ,所以我需要在 DigitalOcean 上完成设置并在 Google Domains 里加入 =NS= 记录。
+
+在完成这些设置后,我就可以通过我的域名访问所架设的网站了,不过 DNS 记录通常需要数小时才会完全生效。
+
+***** SSL 证书
+[[https://letsencrypt.org][Let's Encrypt]] 是个非常棒的项目。使用 [[https://certbot.eff.org/][=certbot=]] 这个工具就可以很方便的生成 SSL 证书。这里向 EFF 和 Linux 基金会的人们致以谢意。生成证书只需要运行 [[https://certbot.eff.org/#arch-nginx][EFF 网站]] 上所记载的命令即可:
+
+#+BEGIN_SRC sh
+$ sudo pacman -S certbot-nginx
+$ sudo certbot --nginx
+#+END_SRC
+
+为了给证书增加一点可信度,我还在 DNS 记录中加了一条 =CAA= 记录,标明 =letsencrypt.org= 是唯一允许给本站 SSL 证书授权的机构。目前 Let's Encrypt 还不支持通配符证书,不过会在 [[https://letsencrypt.org/2017/07/06/wildcard-certificates-coming-jan-2018.html][2018年1月]] 添加这一支持。由于没有通配符证书,我只好在 =nginx.config= 里加上所有二级域名(这样生成证书的才能够为这些域名提供验证)。
+
+**** 下一步?
+在鼓捣了几个小时后(其实大部分时间是在等 DNS 记录扩散),我的新站就上线了。既然选择了运行 VPS,我打算好好发挥它的潜能并架设了自己的电子邮箱。我正在考虑把架设邮箱过程中从各个网站七拼八凑其来的命令行笔记也整理成一篇日志。目前我仍在试图寻找使用 =org-mode= 在 =hugo= 里写多语言日志的最优工作流程。当我确信已经找到一套可以接受的解决方案的时候我会一并写成日志。 
+
+
+
+* Emacs                                                          :@emacs
+
+** TODO Get =emacs= To Work With =fcitx=                        :emacs:fcitx:
+:PROPERTIES:
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :date 2017-09-25 :slug get-emacs-to-work-with-fcitx
+:END:
+
+*** TODO en
+:PROPERTIES:
+:EXPORT_TITLE: Get =emacs= To Work With =fcitx=
+:EXPORT_FILE_NAME: get-emacs-to-work-with-fcitx.en.md
+:END:
+
+**** Enabling fcitx in emacs
+
+***** fcitx-diagnose
+
+***** locale settings
+export zh_cn.utf-8
+set lc_ctype=zh_cn.utf-8
+
+***** fcitx plugin in emacs
+
+***** disabling ctrl+space hot key
+replaced with os+space and ctrl+os
+
+
+**** could be better
+
+do not want set lc-ctype globally
+run emacs as daemon
+
+***** create new entry in .config/systemd/user/emacs.service
+
+***** add environment variable
+
+***** problem: does not load init file
+
+
+***** setting up alias of emacsclient -nc in .zshrc
+alias e="emacsclient -nc"
+
+*** TODO zh
+:PROPERTIES:
+:EXPORT_TITLE: 
+:EXPORT_FILE_NAME: 
+:END:
+
+
+* Footnotes
+* COMMENT Local Variables                                              :ARCHIVE:
+
+
+# Local Variables:
+# fill-column: 70
+# eval: (auto-fill-mode 1)
+# eval: (add-hook 'after-save-hook #'org-hugo-export-subtree-to-md-after-save :append :local)
+# End:
diff --git a/org/fixed.org b/org/fixed.org
@@ -0,0 +1,239 @@
+#+HUGO_BASE_DIR: ../
+#+HUGO_SECTION: ./
+
+* Homepage
+:PROPERTIES:
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :slug home
+:END:
+
+** en
+:PROPERTIES:
+:EXPORT_TITLE: Home
+:EXPORT_FILE_NAME: _index.en.md
+:END:
+
+*** Library of Trantor
+/The Plan needs to go on./
+
+<span style="color:red">Fair Warning: Site under heavy construction.</span>
+
+**** Site Roadmap
+- [X] +Find new hosting location.+ Currently using DigitalOcean.
+- [X] Install Arch Linux on server.
+- [X] +Search for WP replacement.+ Hugo is pretty good.
+- [X] +Find a suitable theme.+ Currently using =hugo-xmin= , may consider forking it and write my own ( =soresu= ).
+- [X] Server side config, like =post-receive= for git auto deploy.
+- [X] Language switcher that does more than redirecting to home page.
+- [X] Enable Disqus.
+- [X] Support =$\LaTeX$= expressions via MathJax.
+- [X] Copy-paste fixed page contents from old site (and translate them).
+- [X] Enable https.
+- [X] Backup old WP site.
+- [X] Transfer domain to Google Domains and ensure DNS works as intended.
+- [X] Find out how to write with =org-mode= or R markdown.
+- [X] Configure multilingual support, including footer text, title, etc.
+- [X] Find out how to make =emacs= work with =fcitx~.
+- [X] Use Google's Noto Sans font and Source Code Pro for code.
+- [X] Find a suitable icon/favicon.
+- [X] Improve templates for posts to display tags and categories. 
+- [X] Cosmetic changes, i.e. no underlines for hyperlinks. 
+- [X] Host my own email.
+- [ ] Deal with some nuances in using =org-mode= with =hugo= , like how to get syntax highlighting to work properly.
+- [ ] Customizable Disqus via Disqus API.
+- [ ] Customize =hugo new= to make it more useful, i.e. create multilingual versions directly.
+- [ ] Restore/rewrite and translate some of the more valuable old posts.
+
+**** Recent Posts
+
+** zh
+:PROPERTIES:
+:EXPORT_TITLE: 主页
+:EXPORT_FILE_NAME: _index.zh.md
+:END:
+
+*** 川坨大学图书室
+/计划进行中/
+
+<span style="color:red">注意:本站仍处于施工中。</span>
+
+**** 施工计划
+- [X] +找一家新的服务器提供商+ 目前使用 DigitalOcean 。
+- [X] 在服务器上安装 Arch Linux 。
+- [X] +搜寻WP的替代品。+ Hugo 很不错。
+- [X] +找一个合适的主题。+ 目前使用 =hugo-xmin= ,考虑fork出来写成自己的主题( =soresu= )。
+- [X] 完成服务器端设置,比如添加 =post-receive= 来实现 =git= 自动部署。
+- [X] 可以切换 *当前页面* 语言版本的语言切换按钮。
+- [X] Disqus 支持。
+- [X] 用 MathJax 实现 =$\LaTeX$= 表达式支持。
+- [X] 把导航页的内容搬过来并翻译。
+- [X] https 支持。
+- [X] 备份原WP站点。
+- [X] 转移域名到 Google Domains ,并完成 DNS 设置。
+- [X] 尝试使用 =org-mode= 或者 R markdown 来写博客。
+- [X] 解决 =emacs= 不兼容 =fcitx= 的问题。
+- [X] 设置多语言支持,添加合适的翻译字符串。
+- [X] 使用 Google 的 Noto Sans 字体,代码则使用 Source Code Pro 。
+- [X] 为站点和社交网站找一个合适的图标/头像。
+- [X] 改善文章页面模板使其显示标签和分类。
+- [X] 改善网站外观,比如隐藏超链接的下划线等。
+- [X] 架设自己的邮箱。
+- [ ] 解决 =org-mode= 和 =hugo= 略不兼容的地方,比如代码高亮。
+- [ ] 尝试把 =hugo new= 变得更有用一些,比如直接创建多语言版本等。
+- [ ] 把比较有价值的旧文章搬过来。
+
+**** 最新日志
+
+
+* About
+:PROPERTIES:
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :slug about
+:END:
+
+** en
+:PROPERTIES:
+:EXPORT_TITLE: About
+:EXPORT_FILE_NAME: about.en.md
+:END:
+
+*** About Me
+No longer a fan of the slow and clunky Wordpress, I switched to Hugo.
+
+Most of my social network accounts use the name =shimmy1996=.
+
+*** About This Site
+
+Up and running since July 12th, 2014. 
+
+This site is licensed under a [[http://creativecommons.org/licenses/by-nc-sa/4.0/][Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]] (CC BY-NC-SA 4.0).
+
+** zh
+:PROPERTIES:
+:EXPORT_TITLE: 关于
+:EXPORT_FILE_NAME: about.zh.md
+:END:
+
+*** 关于博主
+EE 狗,目前在德州放牛;技术渣, +WP+ Hugo 新手; ACG 相关;喜欢硬件但是没有小钱钱;足迹可能遍布各大社交网站,通常名字为 =shimmy1996= ;求友链 XDD。
+
+*** 关于本站
+建于2014年7月12日,用来放各种奇怪的东西。
+
+本站所有内容使用[[http://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh][Creative Commons 署名-非商业性-相同方式共享4.0国际许可协议]](CC BY-NC-SA 4.0)。
+
+
+* Contact
+:PROPERTIES:
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :slug contact
+:END:
+
+** en
+:PROPERTIES:
+:EXPORT_TITLE: Contact
+:EXPORT_FILE_NAME: contact.en.md
+:END:
+
+Congratulations for discovering the +secret+ contact information hidden here!
+
+Feel free to shoot me an email. 
+If you feel like it, encrypt your message with my PGP Key and you will need the key to find my email address:
+#+BEGIN_SRC sh
+5672 AC27 2669 A07A BD28  0896 ACC6 C791 312C F84D
+#+END_SRC
+
+You can also find me on [[https://telegram.me/shimmy1996][Telegram]].
+
+** zh
+:PROPERTIES:
+:EXPORT_TITLE: 联系方式
+:EXPORT_FILE_NAME: contact.zh.md
+:END:
+
+恭喜你发现这个不起眼的 +机密+ 链接。
+
+联系我的最佳方式是电子邮件。
+你可以使用我的PGP密匙来对邮件进行加密以及获取邮箱地址:
+#+BEGIN_SRC sh
+5672 AC27 2669 A07A BD28  0896 ACC6 C791 312C F84D
+#+END_SRC
+
+除此之外[[https://telegram.me/shimmy1996][Telegram]]也是不错的选择。
+
+
+* Friends
+:PROPERTIES:
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :slug friends
+:END:
+
+** en
+:PROPERTIES:
+:EXPORT_TITLE: Friends
+:EXPORT_FILE_NAME: friends.en.md
+:END:
+
+<img src="/img/fixed/friends.jpg"/>
+
+Welcome to the friendly neighborhood of Library of Trantor!
+
+[[http://iiiid.com][Z]]
+
+[[http://uucky.me][Uucky]]
+
+[[https://biergaizi.info][比尔盖子]]
+
+[[http://a2clef.com][Vacuuny/A2Clef]]
+
+** zh
+:PROPERTIES:
+:EXPORT_TITLE: 朋友们
+:EXPORT_FILE_NAME: friends.zh.md
+:END:
+
+<img src="/img/fixed/friends.jpg"/>
+
+这里会添加朋友们的站点链接!
+
+[[http://iiiid.com][Z]]
+
+[[http://uucky.me][Uucky]]
+
+[[https://biergaizi.info][比尔盖子]]
+
+[[http://a2clef.com][Vacuuny/A2Clef]]
+
+
+* Messages
+:PROPERTIES:
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :slug messages
+:END:
+
+** en
+:PROPERTIES:
+:EXPORT_TITLE: Messages
+:EXPORT_FILE_NAME: messages.en.md
+:END:
+
+Hello and welcome!
+
+In case you want fancy profile pics, just like everyone else, please register at [[https://disqus.com/][Disqus]].
+
+** zh
+:PROPERTIES:
+:EXPORT_TITLE: 留言板
+:EXPORT_FILE_NAME: messages.zh.md
+:END:
+
+欢迎版聊!
+
+没有头像?请注册[[https://disqus.com][Disqus]]账户。
+
+
+* Footnotes
+
+
+* COMMENT Local Variables                                           :ARCHIVE:
+
+# Local Variables:
+# fill-column: 70
+# eval: (auto-fill-mode 1)
+# eval: (add-hook 'after-save-hook #'org-hugo-export-subtree-to-md-after-save :append :local)
+# End: