blog

My blog at www.shimmy1996.com

git clone git://git.shimmy1996.com/blog.git
commit a3da62734054d466a3e32784023e03c3135068e7
parent 517c777b2ca2a27ef90000b490293d722b6233f7
Author: Shimmy Xu <shimmy.america@gmail.com>
Date:   Sun, 27 Aug 2017 17:13:34 -0700

Switched themes, somewhat working multilanguage support.

Diffstat:
M.gitignore | 4++--
Mconfig.toml | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
Acontent/_index.en.md | 34++++++++++++++++++++++++++++++++++
Acontent/_index.zh.md | 31+++++++++++++++++++++++++++++++
4 files changed, 126 insertions(+), 8 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,2 +1,2 @@
 public
-themes/nofancy-
\ No newline at end of file
+themes/*+
\ No newline at end of file
diff --git a/config.toml b/config.toml
@@ -1,14 +1,21 @@
 baseURL                 = "http://138.68.49.31/"
 copyright               = "Mine! Mine! Mine!"
-title                   = "Trantor Library" 
+title                   = "Library of Trantor" 
 newContentEditor        = "emacs"
-theme                   = "nofancy"
-pygmentsStyle           = "native"
+theme                   = "hugo-xmin"
+pygmentsStyle           = "monokai"
 disqusshortname         = "shimmy1996"
-
+preserveTaxonomyNames = true
+footnotereturnlinkcontents = "↩"
 DefaultContentLanguage  = "en"
+DefaultContentLanguageInSubdir = true
+
+[permalinks]
+    post = "/post/:year/:month/:day/:slug/"
 
 [params]
+    description = "The greatest library ever."
+    footer = "&copy; [Shimmy Xu](http://shimmy1996.com) 2017 | [Github](https://github.com/shimmy1996) | [Twitter](https://twitter.com/shimmy1996) | [Subscribe](index.xml)"
 
 [author]
 name                    = "Shimmy Xu"
@@ -22,6 +29,30 @@ subtitle                = "The Plan is going on."
 [Languages.en.navigation]
 about                   = "About"
 
+[[Languages.en.menu.main]]
+    name = "Home"
+    url = "/"
+    weight = 1
+[[Languages.en.menu.main]]
+    name = "About"
+    url = "/en/about/"
+    weight = 2
+[[Languages.en.menu.main]]
+    name = "Post"
+    url = "/en/post/"
+    weight = 3
+[[Languages.en.menu.main]]
+    name = "Tags"
+    url = "/en/tags/"
+    weight = 4
+[[Languages.en.menu.main]]
+    name = "Categories"
+    url = "/en/categories/"
+    weight = 5
+[[Languages.en.menu.main]]
+    name = "ZH"
+    url = "/zh/"
+    weight = 6
 
 [Languages.zh]
 title                   = "川坨图书室"
@@ -30,5 +61,27 @@ subtitle                = "计划进行中。"
 [Languages.zh.navigation]
 about                   = "关于"
 
-
-
+[[Languages.zh.menu.main]]
+    name = "AZh"
+    url = "/"
+    weight = 1
+[[Languages.zh.menu.main]]
+    name = "About"
+    url = "/zh/about/"
+    weight = 2
+[[Languages.zh.menu.main]]
+    name = "Post"
+    url = "/zh/post/"
+    weight = 3
+[[Languages.zh.menu.main]]
+    name = "Tags"
+    url = "/zh/tags/"
+    weight = 4
+[[Languages.zh.menu.main]]
+    name = "Categories"
+    url = "/zh/categories/"
+    weight = 5
+[[Languages.zh.menu.main]]
+    name = "EN"
+    url = "/en/"
+    weight = 6
diff --git a/content/_index.en.md b/content/_index.en.md
@@ -0,0 +1,33 @@
+---
+title: Home
+---
+
+[<img src="https://simpleicons.org/icons/github.svg" style="max-width:15%;min-width:40px;float:right;" alt="Github repo" />](https://github.com/shimmy1996)
+
+# Trantor Library
+
+## _The Plan needs to go on._
+
+```
+       5 ./layouts/404.html
+      18 ./layouts/_default/list.html
+      12 ./layouts/_default/single.html
+      16 ./layouts/_default/terms.html
+       0 ./layouts/partials/foot_custom.html
+       9 ./layouts/partials/footer.html
+       0 ./layouts/partials/head_custom.html
+      20 ./layouts/partials/header.html
+       7 ./static/css/fonts.css
+      50 ./static/css/style.css
+     137 total
+```
+
+I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.
+
+Although it is a minimal theme, it is actually fully functional. It supports pages (including the home page), blog posts, a navigation menu, categories, tags, and RSS. With [a little bit customization](https://github.com/yihui/hugo-xmin/blob/master/exampleSite/layouts/partials/foot_custom.html), it can easily support LaTeX math expressions, e.g.,
+
+`$${\sqrt {n}}\left(\left({\frac {1}{n}}\sum _{i=1}^{n}X_{i}\right)-\mu \right)\ {\xrightarrow {d}}\ N\left(0,\sigma ^{2}\right)$$`
+
+All pages not under the root directory of the website are listed below. You can also visit the list page of a single section, e.g., [posts](/post/), or [notes](/note/). See the [About](/about/) page for the usage of this theme.
+
+## Recent Posts+
\ No newline at end of file
diff --git a/content/_index.zh.md b/content/_index.zh.md
@@ -0,0 +1,31 @@
+---
+title: Home
+---
+
+[<img src="https://simpleicons.org/icons/github.svg" style="max-width:15%;min-width:40px;float:right;" alt="Github repo" />](https://github.com/shimmy1996)
+
+# Trantor Library in Chinese
+
+## _The Plan needs to go on._
+
+```
+       5 ./layouts/404.html
+      18 ./layouts/_default/list.html
+      12 ./layouts/_default/single.html
+      16 ./layouts/_default/terms.html
+       0 ./layouts/partials/foot_custom.html
+       9 ./layouts/partials/footer.html
+       0 ./layouts/partials/head_custom.html
+      20 ./layouts/partials/header.html
+       7 ./static/css/fonts.css
+      50 ./static/css/style.css
+     137 total
+```
+
+I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.
+
+Although it is a minimal theme, it is actually fully functional. It supports pages (including the home page), blog posts, a navigation menu, categories, tags, and RSS. With [a little bit customization](https://github.com/yihui/hugo-xmin/blob/master/exampleSite/layouts/partials/foot_custom.html), it can easily support LaTeX math expressions, e.g.,
+
+`$${\sqrt {n}}\left(\left({\frac {1}{n}}\sum _{i=1}^{n}X_{i}\right)-\mu \right)\ {\xrightarrow {d}}\ N\left(0,\sigma ^{2}\right)$$`
+
+All pages not under the root directory of the website are listed below. You can also visit the list page of a single section, e.g., [posts](/post/), or [notes](/note/). See the [About](/about/) page for the usage of this theme.