Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--README.md124
-rw-r--r--README.zh.md168
-rw-r--r--assets/css/_page/_post.scss2
-rw-r--r--exampleSite/config.toml256
-rw-r--r--exampleSite/content/about.md74
-rw-r--r--exampleSite/content/posts/LoveIt-Preview.md25
-rw-r--r--exampleSite/content/posts/creating-a-new-theme.md1151
-rw-r--r--exampleSite/content/posts/goisforlovers.fr.md352
-rw-r--r--exampleSite/content/posts/goisforlovers.md347
-rw-r--r--exampleSite/content/posts/hugoisforlovers.md92
-rw-r--r--exampleSite/content/posts/migrate-from-jekyll.md161
-rwxr-xr-xexampleSite/content/projects/migrate-from-jekyll.md151
-rw-r--r--exampleSite/netlify.toml10
-rw-r--r--exampleSite/static/android-chrome-192x192.pngbin35507 -> 15832 bytes
-rw-r--r--exampleSite/static/android-chrome-512x512.pngbin162465 -> 48161 bytes
-rw-r--r--exampleSite/static/apple-touch-icon.pngbin32318 -> 10397 bytes
-rw-r--r--exampleSite/static/browserconfig.xml2
-rw-r--r--exampleSite/static/cover.pngbin199614 -> 0 bytes
-rw-r--r--exampleSite/static/favicon-16x16.pngbin1202 -> 1166 bytes
-rw-r--r--exampleSite/static/favicon-32x32.pngbin2422 -> 2088 bytes
-rw-r--r--exampleSite/static/favicon.icobin12014 -> 15086 bytes
-rw-r--r--exampleSite/static/images/Apple-Devices-Preview.pngbin0 -> 230071 bytes
-rw-r--r--exampleSite/static/images/avatar.pngbin0 -> 40652 bytes
-rw-r--r--exampleSite/static/images/loading.svg32
-rw-r--r--exampleSite/static/images/me/avatar.jpegbin28196 -> 0 bytes
-rw-r--r--exampleSite/static/logo.pngbin9167 -> 40652 bytes
-rw-r--r--exampleSite/static/mstile-150x150.pngbin22216 -> 9897 bytes
-rw-r--r--exampleSite/static/safari-pinned-tab.svg89
-rw-r--r--exampleSite/static/site.webmanifest4
l---------exampleSite/themes1
-rw-r--r--exampleSite/zh/config.toml243
-rw-r--r--exampleSite/zh/content/about.md64
-rw-r--r--exampleSite/zh/content/posts/LoveIt-Preview.md25
l---------exampleSite/zh/themes1
-rw-r--r--i18n/en.toml2
-rw-r--r--images/home_post_mode.jpgbin327207 -> 0 bytes
-rw-r--r--images/screenshot.pngbin52054 -> 45813 bytes
-rw-r--r--images/tn.pngbin65129 -> 66374 bytes
-rw-r--r--layouts/_default/section.html4
-rw-r--r--layouts/_default/single.html27
-rw-r--r--layouts/_default/summary.html2
-rw-r--r--layouts/partials/header.html4
-rw-r--r--layouts/partials/post/footer.html2
-rw-r--r--layouts/partials/scripts.html18
-rw-r--r--layouts/robots.txt2
-rw-r--r--layouts/taxonomy/terms.html4
-rw-r--r--theme.toml6
48 files changed, 921 insertions, 2527 deletions
diff --git a/.gitignore b/.gitignore
index 13463b0..35ed95e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
# Hugo default output directory
-/public
+public
+resources
## OS Files
# Windows
diff --git a/README.md b/README.md
index f7d5f3f..bed3370 100644
--- a/README.md
+++ b/README.md
@@ -1,40 +1,53 @@
-# LoveIt Hugo Theme
+# LoveIt Theme | Hugo
-LoveIt is a clean, elegant, simple but not simpler blog theme for Hugo based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/) developed by [Dillon](https://dillonzq.com).
+[中文 README](README.zh.md)
-![hugo-theme-LoveIt](https://github.com/dillonzq/LoveIt/blob/master/images/screenshot.png)
+**LoveIt** is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
+
+It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/).
+
+![Hugo Theme LoveIt](exampleSite/static/images/Apple-Devices-Preview.png)
## Demo
-To see this theme in action, Here is a live [demo site](https://suspicious-archimedes-ab369d.netlify.com) which is rendered with this theme.
+To see this theme in action, here is a live [demo site](https://hugo-loveit-en.netlify.com) which is rendered with **LoveIt** theme.
-People that are using **LoveIt**:
+Websites using **LoveIt** theme:
* [Dillon](https://dillonzq.com)
+* Yours
## Features
-* Optimized for performance: 99/100 on mobile and 100/100 on desktop in Google PageSpeed Insights
+* Optimized for performance: 99/100 on mobile and 100/100 on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights)
+* Desktop / Mobile layouts support
+* Dark / Light mode
* Optimized SEO performance with a correct SEO SCHEMA based on JSON-LD
* A More coerent style beetwen page and sections
-* Multilanguage support
+* Multilanguage support and I18N ready
* Pagination support
-* Google Analytics support
-* Disqus Comment System
-* Gitalk Comment System
-* Valine Comment System
-* Gravatar Support
-* Local Avatar Support
+* [Google Analytics](https://analytics.google.com/analytics) support
+* Disqus comment system support by [Disqus](https://disqus.com)
+* Gitalk comment system support by [Gitalk](https://github.com/gitalk/gitalk)
+* Valine comment system support by [Valine](https://valine.js.org/)
+* Gravatar support by [Gravatar](https://gravatar.com)
+* Local Avatar support
+* Up to 54 social sites supported
* Share post support
* Search engine verification support (Google, Bind, Yandex and Baidu)
-* Added configuration file for use on [Netlify](https://www.netlify.com)
-* Dark/Light mode
-* Up to 54 social sites supported out-of-the-box [see the list here](https://github.com/Fastbyte01/KeepIt/wiki/List-of-social-platforms-supported-out-of-box)
-* Translation ready
-* Wrap Image with Figure Tag without Shortcode. Thanks [Junian.Net](https://www.junian.net/hugo-image-figure-wrap/)
-* Load images with Lazy Load By [lazysizes](https://github.com/aFarkas/lazysizes)
-* Automatically highlighting code By [Google code-prettify](https://github.com/google/code-prettify), Customizable styles via CSS. See the [themes gallery](https://rawgit.com/google/code-prettify/master/styles/index.html).
-* Automagical image gallery with [lightGallery](https://github.com/sachinchoolur/lightGallery)
+* Automatically converted images with Lazy Load by [lazysizes](https://github.com/aFarkas/lazysizes)
+* Automatically highlighting code by chroma in Hugo
+* Extended markdown syntax for [Font Awesome](https://fontawesome.com/) icons
+* Math formula support by [Katex](https://katex.org/)
+* Diagram syntax shortcode support by [mermaid](https://github.com/knsv/mermaid)
+* Embedded music player support by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
+* Bilibili player support
+* Kinds of admonitions shortcode support
+* Custom align and float style shortcodes support
+* Animated typing support by [TypeIt](https://typeitjs.com/)
+* Animated coutdown support by [jQuery.countdown](https://github.com/hilios/jQuery.countdown)
+* Dynamic to top support by [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
+* CDN support
* ...
## Getting Started
@@ -46,7 +59,13 @@ Clone this repository to your hugo theme directory.
git clone https://github.com/dillonzq/LoveIt.git
```
-Next, open config.toml in the base of the Hugo site and ensure the theme option is set to KeepIt:
+Or, make this repository a submodule of your site directory.
+
+```bash
+ git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
+```
+
+Next, open `config.toml` in the base of the Hugo site and ensure the theme option is set to KeepIt:
```bash
theme = "LoveIt"
@@ -58,24 +77,25 @@ For more information read the [official setup guide](https://gohugo.io/documenta
Take a look in the `exampleSite` folder.
-This directory contains an example config file and the content for the demo. It serves as an example setup for your documentation.
+This directory contains an example config file and the content for the demo for `en` and `zh` languages.
+It serves as an example setup for your website.
-Copy the `config.toml` in the root directory of your website. Overwrite the existing config file if necessary.
+Copy the `config.toml` to the root directory of your website. Overwrite the existing config file if necessary.
## Content Suggestions
A few suggestions to help you get a good looking site quickly:
-* Keep blog posts in the content/posts directory, for example: content/posts/my-first-post.md
-* Keep static pages in the content directory, for example: content/about.md
-* Keep media like images in the static directory, for example: static/images/2019/10/screenshot.png
+* Keep blog posts in the `content/posts` directory, for example: `content/posts/my-first-post.md`
+* Keep static pages in the `content` directory, for example: `content/about.md`
+* Keep media like images in the `static` directory, for example: `static/images/2019/9/screenshot.png`
## Customizing styles for your website
If you want to change some styling to fit your own website needs, you can edit them:
-* `assets/css/_varibales/default.scss`: You can override the variables in `_variables.scss` to customize the style
-* `assets/css/_custom.scss` : You can put your custom css in this file
+* `assets/css/_varibales.scss`: You can override the variables in `_variables.scss` to customize the style
+* `assets/css/_custom.scss`: You can put your custom css in this file
## Favicons, Browserconfig, Manifest
@@ -90,60 +110,60 @@ It is recommended to put your own favicons
into `/static`. They’re easily created via [https://realfavicongenerator.net/](https://realfavicongenerator.net/).
-Customize browserconfig.xml and site.webmanifest to set theme-color and background-color for example.
+Customize `browserconfig.xml` and `site.webmanifest` to set theme-color and background-color.
## Tips
-### Set production environment when generating site
+### Set `production` environment when generating site
-Because some functions are only in production mode, So you **need to add a production** environment variables when generating your site.
+Because some features are only in production mode, so you need to add a `production` environment variables when generating your site.
```bash
HUGO_ENV=production hugo --gc --minify
```
-### Hugo “extended” Sass/SCSS version required
-
-This theme write style with scss, So you must download and install the “extended” Sass/SCSS version
-
### How to toggle dark-light mode
-* You can click the sun logo to toggle dark-light mode. In the desktop version the sun logo is to the right and in the mobile version is positioned to the left, close to the site title.
-* If you want to make your own theme toggle-able element, you can create an element with a class `.theme-switch`. See [here](https://github.com/Fastbyte01/KeepIt/blob/master/assets/js/main.js#L32)
+* You can click the circle icon to toggle dark-light mode. In the desktop version the circle icon is to the right and in the mobile version is positioned to the left, close to the site title.
+* If you want to make your own theme toggle-able element, you can create an element with a class `.theme-switch`. See [here](https://github.com/dillonzq/LoveIt/blob/master/assets/js/blog.js#L14)
## Home Post model
-If you want to show posts on index instead of a personal profile, just open config.toml in the base of the Hugo site, add the following line to config.toml
+If you want to show posts on index instead of a personal profile, just open `config.toml`, add the following line:
```toml
[params]
- home_mode = "post" # post or other
+ home_mode = "post"
```
## Add logo and cover for SEO
-Add a logo image (127x40) and a cover image (800x600). This images are used for SEO.
+Add a logo image (127x40) and a cover image (800x600) in the `static` directory.
## Questions, ideas, bugs, pull requests
All feedback is welcome! Head over to the [issue tracker](https://github.com/dillonzq/LoveIt/issues).
-For more configuration info or other tips you can see the [wiki](https://github.com/dillonzq/LoveIt/wiki).
-
## License
-LeaveIt is licensed under the MIT license. Check the LICENSE file for details.
-The following resources are included in the theme:
+LoveIt is licensed under the MIT license. Check the [LICENSE file](https://github.com/dillonzq/LoveIt/blob/master/LICENSE) for details.
+Thanks to the authors of following resources included in the theme:
+
+* [Font Awesome](https://fontawesome.com/)
+* [Animate.css](https://daneden.github.io/animate.css/)
* [lazysizes](https://github.com/aFarkas/lazysizes)
-* [lightGallery](https://github.com/sachinchoolur/lightGallery)
-* [code-prettify](https://github.com/google/code-prettify)
+* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
+* [TypeIt](https://typeitjs.com/)
+* [jQuery](https://github.com/jquery/jquery)
+* [jQuery.countdown](https://github.com/hilios/jQuery.countdown)
+* [Katex](https://katex.org/)
+* [mermaid](https://github.com/knsv/mermaid)
+* [APlayer](https://github.com/MoePlayer/APlayer)
+* [MetingJS](https://github.com/metowolf/MetingJS)
+* [Gitalk](https://github.com/gitalk/gitalk)
+* [Valine](https://valine.js.org/)
## Author
[Dillon](https://dillonzq.com)
-
-## See Also
-
-* [Hermitt](https://github.com/Track3/hermit)
-* [Goa](https://github.com/shenoybr/hugo-goa)
diff --git a/README.zh.md b/README.zh.md
new file mode 100644
index 0000000..bd7c931
--- /dev/null
+++ b/README.zh.md
@@ -0,0 +1,168 @@
+# LoveIt 主题 | Hugo
+
+[English README](README.md)
+
+[LoveIt](https://github.com/dillonzq/LoveIt) 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
+
+它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt/) 和 [KeepIt 主题](https://github.com/liuzc/LeaveIt/)。
+
+![Hugo 主题 LoveIt](exampleSite/static/images/Apple-Devices-Preview.png)
+
+## 主题预览
+
+为了直观地浏览主题特性,这里有一个基于 **LoveIt** 主题渲染的 [预览网站](https://hugo-loveit-zh.netlify.com)。
+
+使用 **LoveIt** 主题的网站:
+
+* [Dillon](https://dillonzq.com)
+* 你的网站
+
+## 特性
+
+* 性能优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, 99/100 的移动设备得分和 100/100 的桌面设备得分
+* 桌面设备 / 移动设备 布局的支持
+* 暗黑 / 明亮 模式
+* 使用基于 JSON-LD 格式 的 SEO SCHEMA 文件进行 SEO 优化
+* 页面和列表保持一致的视觉样式
+* 支持多语言和国际化
+* 支持分页
+* 支持 [Google Analytics](https://analytics.google.com/analytics)
+* 支持 [Disqus](https://disqus.com) 评论系统
+* 支持 [Gitalk](https://github.com/gitalk/gitalk) 评论系统
+* 支持 [Valine](https://valine.js.org/) 评论系统
+* 支持 [Gravatar](https://gravatar.com) 头像
+* 支持本地头像
+* 支持多达 54 种社交链接
+* 支持文章分享
+* 支持搜索引擎的网站验证 (Google, Bind, Yandex and Baidu)
+* 基于 [lazysizes](https://github.com/aFarkas/lazysizes) 自动转换图片为懒加载
+* 基于 Hugo 使用的 chroma 进行代码高亮
+* 使用 [Font Awesome](https://fontawesome.com/) 图标的扩展 Markdown 语法
+* 支持基于 [Katex](https://katex.org/) 的数学公式
+* 支持基于 [mermaid](https://github.com/knsv/mermaid) 的图表和流程图生成功能
+* 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的内嵌音乐播放器
+* 支持内嵌 Bilibili 视频
+* 支持多种提醒样式的 shortcode
+* 支持自定义对齐和浮动方式的 shortcode
+* 支持基于 [TypeIt](https://typeitjs.com/) 的打字动画
+* 支持基于 [jQuery.countdown](https://github.com/hilios/jQuery.countdown) 的倒计时动画
+* 支持基于 [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) 的回到顶部动画
+* 支持 CDN
+* ...
+
+## 快速开始
+
+直接克隆这个代码库到你的 Hugo 主题目录,
+
+```bash
+ cd themes
+ git clone https://github.com/dillonzq/LoveIt.git
+```
+
+或者,把这个代码库作为子模块。
+
+```bash
+ git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
+```
+
+下一步, 打开 Hugo 网站的根目录下的 `config.toml` 文件来把 `theme` 设置为 `LoveIt`:
+
+```bash
+ theme = "LoveIt"
+```
+
+更多信息请查看 Hugo 的 [官方安装指南](https://gohugo.io/documentation/)。
+
+## 网站设置
+
+请看一看 `exampleSite` 目录下的文件。
+
+这个目录包含了 `en` 和 `zh` 两种语言的预览网站配置。它可以作为你的网站的配置模板。
+
+复制 `config.toml` 文件到你的 Hugo 网站代码根目录。必要的话覆盖原始配置文件。
+
+## 目录结构建议
+
+以下是一些方便你清晰管理和生成文章的目录结构建议:
+
+* 保持博客文章存放在 `content/posts` 目录,例如: `content/posts/我的第一篇文章.md`
+* 保持简单的静态页面存放在 `content` 目录,例如: `content/about.md`
+* 保持图片之类的媒体资源存放在 `static` 目录,例如: `static/images/2019/9/screenshot.png`
+
+## 为你的网站自定义样式
+
+如果你想改变一些网站样式来满足你的需求,你可以编辑:
+
+* `assets/css/_varibales.scss`: 你可以覆盖 `_variables.scss` 中的变量来自定义样式
+* `assets/css/_custom.scss`: 你可以把自定义的样式放在这个文件
+
+## 网站图标、浏览器配置、网站清单
+
+强烈建议你把:
+
+* apple-touch-icon.png (180x180)
+* favicon-32x32.png (32x32)
+* favicon-16x16.png (16x16)
+* mstile-150x150.png (150x150)
+* android-chrome-192x192.png (192x192)
+* android-chrome-512x512.png (512x512)
+
+放在 `/static` 目录。利用 [https://realfavicongenerator.net/](https://realfavicongenerator.net/) 可以很容易地生成这些文件。
+
+可以自定义 `browserconfig.xml` 和 `site.webmanifest` 文件来设置 theme-color 和 background-color。
+
+## 小技巧
+
+### 在生成网站时设置 `production` 环境变量
+
+由于主题的一些功能仅在生产环境有效,所以你需要在生成网站时设置 `production` 环境变量。
+
+```bash
+ HUGO_ENV=production hugo --gc --minify
+```
+
+### 怎样切换网站 暗黑-明亮 模式
+
+* 你可以点击圆形图标来切换网站 暗黑-明亮 模式。桌面模式下圆形图标在网页右上角,移动设备模式下在网站左上角标题旁边
+* 如果你想自定义切换网站 暗黑-明亮 模式的元素,可以使用一个 class 包含 `.theme-switch` 的元素,详见[此处](https://github.com/dillonzq/LoveIt/blob/master/assets/js/blog.js#L14)
+
+## 主页预览文章模式
+
+如果你想在主页显示文章而不仅仅是个人信息,请打开配置文件 `config.toml`,并增加下面一行:
+
+```toml
+ [params]
+ home_mode = "post"
+```
+
+## 增加网站 logo 和封面用于 SEO 优化
+
+增加一个 logo 图片 (127x40) 和一个封面图片 (800x600) 在 `static` 目录。
+
+## 问题、想法、 bugs 和 PRs
+
+所有的反馈都是欢迎的!详见 [issue tracker](https://github.com/dillonzq/LoveIt/issues)。
+
+## 许可协议
+
+LoveIt 根据 MIT 许可协议授权。 更多信息请查看 [LICENSE 文件](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)。
+
+感谢以下在主题中使用过的项目的作者:
+
+* [Font Awesome](https://fontawesome.com/)
+* [Animate.css](https://daneden.github.io/animate.css/)
+* [lazysizes](https://github.com/aFarkas/lazysizes)
+* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
+* [TypeIt](https://typeitjs.com/)
+* [jQuery](https://github.com/jquery/jquery)
+* [jQuery.countdown](https://github.com/hilios/jQuery.countdown)
+* [Katex](https://katex.org/)
+* [mermaid](https://github.com/knsv/mermaid)
+* [APlayer](https://github.com/MoePlayer/APlayer)
+* [MetingJS](https://github.com/metowolf/MetingJS)
+* [Gitalk](https://github.com/gitalk/gitalk)
+* [Valine](https://valine.js.org/)
+
+## 作者
+
+[Dillon](https://dillonzq.com)
diff --git a/assets/css/_page/_post.scss b/assets/css/_page/_post.scss
index b30ea35..e3abe66 100644
--- a/assets/css/_page/_post.scss
+++ b/assets/css/_page/_post.scss
@@ -159,7 +159,7 @@
.post-dummy-target:target {
display: inline-block;
position: relative;
- top: -5.4rem;
+ top: -5.6rem;
visibility: hidden;
}
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index b263269..f92e7dd 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,77 +1,128 @@
-baseURL = "https://example.com"
-languageCode = "en"
-defaultContentLanguage = "en"
-title = "KeepIt"
-theme = "KeepIt"
-
-paginate = 12
-enableEmoji = true
-enableRobotsTXT = true
-googleAnalytics = ""
-disqusShortname = "yourdiscussshortname"
-
-[sitemap]
- changefreq = "monthly"
+baseURL = "/"
+languageCode = "en" # website language
+defaultContentLanguage = "en" # [en, zh, ...] determines which i18n file to use
+title = "LoveIt Theme" # website title
+theme = "LoveIt" # theme
+enableGitInfo = false # whether to use git commit log to generate lastmod record
+hasCJKLanguage = false # whether to include chinese/japanese/korean
+paginate = 8 # amount of posts in each page only when home_mode is post
+enableEmoji = true # whether to use emoji code
+enableRobotsTXT = true # whether to use robots.txt
+googleAnalytics = "" # [UA-XXXXXXXX-X] google analytics code
+disqusShortname = "dillonzq" # Disqus shortname to use Disqus in posts
+copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
+ # copyright description used only for seo schema
+
+ #### Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)
+pygmentsOptions = "linenos=table"
+pygmentsCodefences = true
+pygmentsUseClasses = true
+pygmentsCodefencesGuessSyntax = true
+
+staticDir = ["static", "themes/LoveIt/assets/others"] # static directories
+
+[author] #### Author Info
+ name = "XXXX"
+
+[sitemap] #### Sitemap Info
+ changefreq = "weekly"
filename = "sitemap.xml"
priority = 0.5
-[blackfriday]
- hrefTargetBlank = true
- nofollowLinks = true
- noreferrerLinks = true
-
-[Permalinks]
- posts = "/:year/:filename/"
+[Permalinks] #### Permalinks Info (https://gohugo.io/content-management/urls/#permalinks)
+ posts = "/:year/:month/:filename/"
-[menu]
+[menu] #### Menu Info
[[menu.main]]
- name = "Blog"
+ identifier = "posts"
+ name = "Posts"
url = "/posts/"
weight = 1
[[menu.main]]
+ identifier = "tags"
+ name = "Tags"
+ url = "/tags/"
+ weight = 2
+
+ [[menu.main]]
+ identifier = "categories"
name = "Categories"
url = "/categories/"
weight = 3
[[menu.main]]
+ identifier = "about"
name = "About"
- url = "/about"
+ url = "/about/"
weight = 4
+ [[menu.main]]
+ identifier = "zh"
+ name = '<i class="fas fa-language"></i>'
+ url = "https://hugo-loveit-zh.netlify.com"
+ weight = 5
+
[params]
- since = 2012
- author = "Fastbyte01" # Author's name
- subtitle = "A Hugo theme" # Subtitle
- cdn_url = "" # Base CDN URL
- home_mode = "" # post or other
-
- google_verification = ""
- bing_verification = ""
- yandex_verification = ""
- pinterest_verification = ""
- baidu_verification = ""
-
- avatar = "/images/me/avatar.jpg" #comment it to use gravatar
- socialShare = true
-
- description = "" # site description
- keywords = "" # site keywords
-
- license= 'Released under <a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
-
-[params.gravatar]
- #email = "example@gmail.com" #uncomment and insert your email address to use gravatar
-
-
-[params.social]
+ version = "5.x" # LoveIt theme version
+ description = "LoveIt Theme Demo" # site description
+ keywords = ["XXXX", "Theme", "Hugo"] # site keywords
+
+ #### Home Page Info
+ home_mode = "post" # [post, other] home mode
+ avatar = "/images/avatar.png" # URL of avatar shown in home page
+ subtitle = "A Clean, Elegant but Advanced Hugo Theme" # subtitle shown in home page
+
+ socialShare = true # whether to show social share links in post page
+
+ #### Footer CopyRight Info
+ since = 2018 # Site creation time
+ icp = '' # ICP info only in China (HTML format is allowed)
+ license= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
+ # license info (HTML format is allowed)
+ gitRepo = "" # public git repo url to link lastmod git commit only then enableGitInfo is true
+
+ linkToMarkdown = true # whether to show link to Raw Markdown content of the post
+
+ #### site verification code for Google/Bing/Yandex/Pinterest/Baidu
+ google_verification = ""
+ bing_verification = ""
+ yandex_verification = ""
+ pinterest_verification = ""
+ baidu_verification = ""
+
+ [params.cdn] #### CSS and JS Files CDN
+ fontawesome_free_css = '' # for example '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
+ animate_css = ''
+ gitalk_css = ''
+ gitalk_js = ''
+ valine_js = ''
+ jquery_js = ''
+ lazysizes_js = ''
+ smooth_scroll_js = ''
+ katex_css = ''
+ katex_js = ''
+ katex_auto_render_js = ''
+ mermaid_js = ''
+ echarts_macarons_js = ''
+ echarts_js = ''
+ typeit_js = ''
+ jquery_countdown_js = ''
+ aplayer_css = ''
+ aplayer_js = ''
+ meting_js = ''
+
+ [params.gravatar] # Gravatar Info for preferred avatar in home page
+ email = ""
+
+ [params.social] # Social Info in home page
GitHub = "xxxx"
Linkedin = "xxxx"
Twitter = "xxxx"
#Instagram = "xxxx"
- #Email = "xxxx"
+ #Email = "xxxx"
Facebook = "xxxx"
- #Telegram = "xxxx"
+ Telegram = "xxxx"
#Medium = "xxxx"
#Gitlab = "xxxx"
#Youtubelegacy = "xxxx"
@@ -84,7 +135,7 @@ disqusShortname = "yourdiscussshortname"
#Reddit = "xxxx"
#Codepen = "xxxx"
#Bitbucket = "xxxx"
- #Stackoverflow = "xxxxx"
+ #Stackoverflow = "xxxx"
#Weibo = "xxxx"
#Odnoklassniki = "xxxx"
#VKontakte = "xxxx"
@@ -123,55 +174,72 @@ disqusShortname = "yourdiscussshortname"
#Mastodon = "xxxx"
#Thingiverse = "xxxx"
-[params.share]
-Twitter = true
-Facebook = true
-#Reddit = true
-Linkedin = true
-#Pinterest = true
-#HackerNews = true
-#Mix = true
-#Tumblr = true
-#VKontakte = true
-#Douban = true
-#Weibo = true
-
-# Used only for Seo schema
-copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
-
-[author]
- name = "Fastbyte01"
-
- [params.publisher]
- name = "Fastbyte01"
-
+ [params.share] # Social Share Links in post page
+ enable = true
+ Twitter = true
+ Facebook = true
+ Reddit = true
+ #Linkedin = true
+ #Pinterest = true
+ #HackerNews = true
+ #Mix = true
+ #Tumblr = true
+ #VKontakte = true
+ #Weibo = true
+
+ [params.publisher] # Publisher Info just for SEO
+ name = "XXXX"
[params.publisher.logo]
- url = "logo.png"
+ url = "/logo.png"
width = 127
height = 40
- [params.logo]
- url = "logo.png"
+ [params.logo] # Website Log Info just for SEO
+ url = "/logo.png"
width = 127
height = 40
- [params.image]
- url = "cover.png"
+ [params.image] # Website Image Info just for SEO
+ url = "/cover.png"
width = 800
height = 600
-[params.gitalk]
-owner = ""
-repo = ""
-clientId = ""
-clientSecret = ""
-
-[params.valine]
- enable = false
- appId = 'your appId'
- appKey = 'your appKey'
- notify = false # mail notifier , https://github.com/xCss/Valine/wiki
- verify = false # Verification code
- avatar = 'mm'
- placeholder = 'your comments ...'
- visitor = true
+ [params.gitalk] # Gittalk Comment Config (https://github.com/gitalk/gitalk)
+ owner = ""
+ repo = ""
+ clientId = ""
+ clientSecret = ""
+
+ [params.valine] # Valine Comment Config (https://github.com/xCss/Valine)
+ enable = false
+ appId = ""
+ appKey = ""
+ notify = false
+ verify = true
+ avatar = "mp"
+ placeholder = "Your comment ..."
+ visitor = true
+ recordIP = true
+
+[privacy] #### Privacy Info (https://gohugo.io/about/hugo-and-gdpr/)
+ [privacy.googleAnalytics]
+ anonymizeIP = true
+
+ [privacy.youtube]
+ privacyEnhanced = true
+
+[mediaTypes] #### Options to make hugo output .md files.
+ [mediaTypes."text/plain"]
+ suffixes = ["md"]
+
+[outputFormats.MarkDown] #### Options to make hugo output .md files.
+ mediaType = "text/plain"
+ isPlainText = true
+ isHTML = false
+
+[outputs] #### Options to make hugo output .md files.
+ home = ["HTML", "RSS"]
+ page = ["HTML", "MarkDown"]
+ section = ["HTML", "RSS"]
+ taxonomy = ["HTML", "RSS"]
+ taxonomyTerm = ["HTML"]
diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md
index 318d60f..3ba9f50 100644
--- a/exampleSite/content/about.md
+++ b/exampleSite/content/about.md
@@ -1,20 +1,64 @@
-+++
-title = "About"
-date = "2014-04-09"
-aliases = ["about-us","about-hugo","contact"]
-[ author ]
- name = "Hugo Authors"
-+++
+---
+title: "About LoveIt"
+date: 2019-08-02T11:04:49+08:00
+draft: false
+---
-Hugo is the **world’s fastest framework for building websites**. It is written in Go.
+[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com).
-It makes use of a variety of open source projects including:
+It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/).
-* https://github.com/russross/blackfriday
-* https://github.com/alecthomas/chroma
-* https://github.com/muesli/smartcrop
-* https://github.com/spf13/cobra
-* https://github.com/spf13/viper
+![Hugo Theme LoveIt](/images/Apple-Devices-Preview.png)
-Learn more and contribute on [GitHub](https://github.com/gohugoio).
+### Features
+* :(fas fa-rocket): Optimized for performance: 99/100 on mobile and 100/100 on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights)
+* :(fas fa-desktop): / :(fas fa-mobile): layouts support
+* :(fas fa-moon): / :(fas fa-sun): mode
+* :(fab fa-searchengin): Optimized SEO performance with a correct SEO SCHEMA based on JSON-LD
+* :(fas fa-layer-group): A More coerent style beetwen page and sections
+* :(fas fa-language): Multilanguage support and I18N ready
+* :(fas fa-ellipsis-h): Pagination support
+* :(fab fa-google): [Google Analytics](https://analytics.google.com/analytics) support
+* :(far fa-comment): Disqus comment system support by [Disqus](https://disqus.com)
+* :(far fa-comment-dots): Gitalk comment system support by [Gitalk](https://github.com/gitalk/gitalk)
+* :(far fa-comment-alt): Valine comment system support by [Valine](https://valine.js.org/)
+* :(far fa-user): Gravatar support by [Gravatar](https://gravatar.com)
+* :(fas fa-user-circle): Local Avatar support
+* :(far fa-id-card): Up to 54 social sites supported
+* :(fas fa-share-square): Share post support
+* :(fas fa-search): Search engine verification support (Google, Bind, Yandex and Baidu)
+* :(far fa-images): Automatically converted images with Lazy Load by [lazysizes](https://github.com/aFarkas/lazysizes)
+* :(fas fa-code): Automatically highlighting code by chroma in Hugo
+* :(fab fa-font-awesome): Extended markdown syntax for [Font Awesome](https://fontawesome.com/) icons
+* :(fas fa-square-root-alt): Math formula support by [Katex](https://katex.org/)
+* :(fas fa-project-diagram): Diagram syntax shortcode support by [mermaid](https://github.com/knsv/mermaid)
+* :(fas fa-music): Embedded music player support by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
+* :(fas fa-tv): Bilibili player support
+* :(far fa-bell): Kinds of admonitions shortcode support
+* :(fas fa-align-left): Custom align and float style shortcodes support
+* :(fas fa-i-cursor): Animated typing support by [TypeIt](https://typeitjs.com/)
+* :(far fa-clock): Animated coutdown support by [jQuery.countdown](https://github.com/hilios/jQuery.countdown)
+* :(fas fa-arrow-up): Dynamic to top support by [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
+* :(fas fa-tachometer-alt): CDN support
+* ...
+
+### License
+
+LoveIt is licensed under the MIT license. Check the [LICENSE file](https://github.com/dillonzq/LoveIt/blob/master/LICENSE) for details.
+
+Thanks to the authors of following resources included in the theme:
+
+* [Font Awesome](https://fontawesome.com/)
+* [Animate.css](https://daneden.github.io/animate.css/)
+* [lazysizes](https://github.com/aFarkas/lazysizes)
+* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
+* [TypeIt](https://typeitjs.com/)
+* [jQuery](https://github.com/jquery/jquery)
+* [jQuery.countdown](https://github.com/hilios/jQuery.countdown)
+* [Katex](https://katex.org/)
+* [mermaid](https://github.com/knsv/mermaid)
+* [APlayer](https://github.com/MoePlayer/APlayer)
+* [MetingJS](https://github.com/metowolf/MetingJS)
+* [Gitalk](https://github.com/gitalk/gitalk)
+* [Valine](https://valine.js.org/)
diff --git a/exampleSite/content/posts/LoveIt-Preview.md b/exampleSite/content/posts/LoveIt-Preview.md
new file mode 100644
index 0000000..b9f215d
--- /dev/null
+++ b/exampleSite/content/posts/LoveIt-Preview.md
@@ -0,0 +1,25 @@
+---
+title: "LoveIt Theme Preview and Documentation"
+date: 2019-08-25T16:22:42+08:00
+lastmod: 2019-08-25T16:22:42+08:00
+draft: false
+description: "This is a LoveIt theme preview and documentation page."
+show_in_homepage: true
+show_description: false
+license: ''
+
+tags: ['Hugo', 'Theme']
+categories: ['Documentation']
+
+featured_image: ''
+featured_image_preview: ''
+
+comment: true
+toc: true
+autoCollapseToc: true
+math: true
+---
+
+This is a [LoveIt](https://github.com/dillonzq/LoveIt) theme preview and documentation page.
+
+<!--more--> \ No newline at end of file
diff --git a/exampleSite/content/posts/creating-a-new-theme.md b/exampleSite/content/posts/creating-a-new-theme.md
deleted file mode 100644
index fa68901..0000000
--- a/exampleSite/content/posts/creating-a-new-theme.md
+++ /dev/null
@@ -1,1151 +0,0 @@
----
-author:
- name: "Michael Henderson"
-date: 2014-09-28
-linktitle: Creating a New Theme
-type:
-- post
-- posts
-title: Creating a New Theme
-weight: 10
-series:
-- Hugo 101
----
-
-
-## Introduction
-
-This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I'll explain how Hugo uses templates and how you can organize your templates to create a theme. I won't cover using CSS to style your theme.
-
-We'll start with creating a new site with a very basic template. Then we'll add in a few pages and posts. With small variations on that, you will be able to create many different types of web sites.
-
-In this tutorial, commands that you enter will start with the "$" prompt. The output will follow. Lines that start with "#" are comments that I've added to explain a point. When I show updates to a file, the ":wq" on the last line means to save the file.
-
-Here's an example:
-
-```
-## this is a comment
-$ echo this is a command
-this is a command
-
-## edit the file
-$ vi foo.md
-+++
-date = "2014-09-28"
-title = "creating a new theme"
-+++
-
-bah and humbug
-:wq
-
-## show it
-$ cat foo.md
-+++
-date = "2014-09-28"
-title = "creating a new theme"
-+++
-
-bah and humbug
-$
-```
-
-
-## Some Definitions
-
-There are a few concepts that you need to understand before creating a theme.
-
-### Skins
-
-Skins are the files responsible for the look and feel of your site. It’s the CSS that controls colors and fonts, it’s the Javascript that determines actions and reactions. It’s also the rules that Hugo uses to transform your content into the HTML that the site will serve to visitors.
-
-You have two ways to create a skin. The simplest way is to create it in the ```layouts/``` directory. If you do, then you don’t have to worry about configuring Hugo to recognize it. The first place that Hugo will look for rules and files is in the ```layouts/``` directory so it will always find the skin.
-
-Your second choice is to create it in a sub-directory of the ```themes/``` directory. If you do, then you must always tell Hugo where to search for the skin. It’s extra work, though, so why bother with it?
-
-The difference between creating a skin in ```layouts/``` and creating it in ```themes/``` is very subtle. A skin in ```layouts/``` can’t be customized without updating the templates and static files that it is built from. A skin created in ```themes/```, on the other hand, can be and that makes it easier for other people to use it.
-
-The rest of this tutorial will call a skin created in the ```themes/``` directory a theme.
-
-Note that you can use this tutorial to create a skin in the ```layouts/``` directory if you wish to. The main difference will be that you won’t need to update the site’s configuration file to use a theme.
-
-### The Home Page
-
-The home page, or landing page, is the first page that many visitors to a site see. It is the index.html file in the root directory of the web site. Since Hugo writes files to the public/ directory, our home page is public/index.html.
-
-### Site Configuration File
-
-When Hugo runs, it looks for a configuration file that contains settings that override default values for the entire site. The file can use TOML, YAML, or JSON. I prefer to use TOML for my configuration files. If you prefer to use JSON or YAML, you’ll need to translate my examples. You’ll also need to change the name of the file since Hugo uses the extension to determine how to process it.
-
-Hugo translates Markdown files into HTML. By default, Hugo expects to find Markdown files in your ```content/``` directory and template files in your ```themes/``` directory. It will create HTML files in your ```public/``` directory. You can change this by specifying alternate locations in the configuration file.
-
-### Content
-
-Content is stored in text files that contain two sections. The first section is the “front matter,” which is the meta-information on the content. The second section contains Markdown that will be converted to HTML.
-
-#### Front Matter
-
-The front matter is information about the content. Like the configuration file, it can be written in TOML, YAML, or JSON. Unlike the configuration file, Hugo doesn’t use the file’s extension to know the format. It looks for markers to signal the type. TOML is surrounded by “`+++`”, YAML by “`---`”, and JSON is enclosed in curly braces. I prefer to use TOML, so you’ll need to translate my examples if you prefer YAML or JSON.
-
-The information in the front matter is passed into the template before the content is rendered into HTML.
-
-#### Markdown
-
-Content is written in Markdown which makes it easier to create the content. Hugo runs the content through a Markdown engine to create the HTML which will be written to the output file.
-
-### Template Files
-
-Hugo uses template files to render content into HTML. Template files are a bridge between the content and presentation. Rules in the template define what content is published, where it's published to, and how it will rendered to the HTML file. The template guides the presentation by specifying the style to use.
-
-There are three types of templates: single, list, and partial. Each type takes a bit of content as input and transforms it based on the commands in the template.
-
-Hugo uses its knowledge of the content to find the template file used to render the content. If it can’t find a template that is an exact match for the content, it will shift up a level and search from there. It will continue to do so until it finds a matching template or runs out of templates to try. If it can’t find a template, it will use the default template for the site.
-
-Please note that you can use the front matter to influence Hugo’s choice of templates.
-
-#### Single Template
-
-A single template is used to render a single piece of content. For example, an article or post would be a single piece of content and use a single template.
-
-#### List Template
-
-A list template renders a group of related content. That could be a summary of recent postings or all articles in a category. List templates can contain multiple groups.
-
-The homepage template is a special type of list template. Hugo assumes that the home page of your site will act as the portal for the rest of the content in the site.
-
-#### Partial Template
-
-A partial template is a template that can be included in other templates. Partial templates must be called using the “partial” template command. They are very handy for rolling up common behavior. For example, your site may have a banner that all pages use. Instead of copying the text of the banner into every single and list template, you could create a partial with the banner in it. That way if you decide to change the banner, you only have to change the partial template.
-
-## Create a New Site
-
-Let's use Hugo to create a new web site. I'm a Mac user, so I'll create mine in my home directory, in the Sites folder. If you're using Linux, you might have to create the folder first.
-
-The "new site" command will create a skeleton of a site. It will give you the basic directory structure and a useable configuration file.
-
-```
-$ hugo new site ~/Sites/zafta
-$ cd ~/Sites/zafta
-$ ls -l
-total 8
-drwxr-xr-x 7 quoha staff 238 Sep 29 16:49 .
-drwxr-xr-x 3 quoha staff 102 Sep 29 16:49 ..
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
--rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
-$
-```
-
-Take a look in the content/ directory to confirm that it is empty.
-
-The other directories (archetypes/, layouts/, and static/) are used when customizing a theme. That's a topic for a different tutorial, so please ignore them for now.
-
-### Generate the HTML For the New Site
-
-Running the `hugo` command with no options will read all the available content and generate the HTML files. It will also copy all static files (that's everything that's not content). Since we have an empty site, it won't do much, but it will do it very quickly.
-
-```
-$ hugo --verbose
-INFO: 2014/09/29 Using config file: config.toml
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
-WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
-WARN: 2014/09/29 Unable to locate layout: [404.html]
-0 draft content
-0 future content
-0 pages created
-0 tags created
-0 categories created
-in 2 ms
-$
-```
-
-The "`--verbose`" flag gives extra information that will be helpful when we build the template. Every line of the output that starts with "INFO:" or "WARN:" is present because we used that flag. The lines that start with "WARN:" are warning messages. We'll go over them later.
-
-We can verify that the command worked by looking at the directory again.
-
-```
-$ ls -l
-total 8
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
--rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
-drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
-$
-```
-
-See that new public/ directory? Hugo placed all generated content there. When you're ready to publish your web site, that's the place to start. For now, though, let's just confirm that we have what we'd expect from a site with no content.
-
-```
-$ ls -l public
-total 16
--rw-r--r-- 1 quoha staff 416 Sep 29 17:02 index.xml
--rw-r--r-- 1 quoha staff 262 Sep 29 17:02 sitemap.xml
-$
-```
-
-Hugo created two XML files, which is standard, but there are no HTML files.
-
-
-
-### Test the New Site
-
-Verify that you can run the built-in web server. It will dramatically shorten your development cycle if you do. Start it by running the "server" command. If it is successful, you will see output similar to the following:
-
-```
-$ hugo server --verbose
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
-WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
-WARN: 2014/09/29 Unable to locate layout: [404.html]
-0 draft content
-0 future content
-0 pages created
-0 tags created
-0 categories created
-in 2 ms
-Serving pages from /Users/quoha/Sites/zafta/public
-Web Server is available at http://localhost:1313
-Press Ctrl+C to stop
-```
-
-Connect to the listed URL (it's on the line that starts with "Web Server"). If everything is working correctly, you should get a page that shows the following:
-
-```
-index.xml
-sitemap.xml
-```
-
-That's a listing of your public/ directory. Hugo didn't create a home page because our site has no content. When there's no index.html file in a directory, the server lists the files in the directory, which is what you should see in your browser.
-
-Let’s go back and look at those warnings again.
-
-```
-WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
-WARN: 2014/09/29 Unable to locate layout: [404.html]
-```
-
-That second warning is easier to explain. We haven’t created a template to be used to generate “page not found errors.” The 404 message is a topic for a separate tutorial.
-
-Now for the first warning. It is for the home page. You can tell because the first layout that it looked for was “index.html.” That’s only used by the home page.
-
-I like that the verbose flag causes Hugo to list the files that it's searching for. For the home page, they are index.html, _default/list.html, and _default/single.html. There are some rules that we'll cover later that explain the names and paths. For now, just remember that Hugo couldn't find a template for the home page and it told you so.
-
-At this point, you've got a working installation and site that we can build upon. All that’s left is to add some content and a theme to display it.
-
-## Create a New Theme
-
-Hugo doesn't ship with a default theme. There are a few available (I counted a dozen when I first installed Hugo) and Hugo comes with a command to create new themes.
-
-We're going to create a new theme called "zafta." Since the goal of this tutorial is to show you how to fill out the files to pull in your content, the theme will not contain any CSS. In other words, ugly but functional.
-
-All themes have opinions on content and layout. For example, Zafta uses "post" over "blog". Strong opinions make for simpler templates but differing opinions make it tougher to use themes. When you build a theme, consider using the terms that other themes do.
-
-
-### Create a Skeleton
-
-Use the hugo "new" command to create the skeleton of a theme. This creates the directory structure and places empty files for you to fill out.
-
-```
-$ hugo new theme zafta
-
-$ ls -l
-total 8
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
--rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
-drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
-drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
-drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes
-
-$ find themes -type f | xargs ls -l
--rw-r--r-- 1 quoha staff 1081 Sep 29 17:31 themes/zafta/LICENSE.md
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/archetypes/default.md
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
--rw-r--r-- 1 quoha staff 93 Sep 29 17:31 themes/zafta/theme.toml
-$
-```
-
-The skeleton includes templates (the files ending in .html), license file, a description of your theme (the theme.toml file), and an empty archetype.
-
-Please take a minute to fill out the theme.toml and LICENSE.md files. They're optional, but if you're going to be distributing your theme, it tells the world who to praise (or blame). It's also nice to declare the license so that people will know how they can use the theme.
-
-```
-$ vi themes/zafta/theme.toml
-author = "michael d henderson"
-description = "a minimal working template"
-license = "MIT"
-name = "zafta"
-source_repo = ""
-tags = ["tags", "categories"]
-:wq
-
-## also edit themes/zafta/LICENSE.md and change
-## the bit that says "YOUR_NAME_HERE"
-```
-
-Note that the the skeleton's template files are empty. Don't worry, we'll be changing that shortly.
-
-```
-$ find themes/zafta -name '*.html' | xargs ls -l
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
-$
-```
-
-
-
-### Update the Configuration File to Use the Theme
-
-Now that we've got a theme to work with, it's a good idea to add the theme name to the configuration file. This is optional, because you can always add "-t zafta" on all your commands. I like to put it the configuration file because I like shorter command lines. If you don't put it in the configuration file or specify it on the command line, you won't use the template that you're expecting to.
-
-Edit the file to add the theme, add a title for the site, and specify that all of our content will use the TOML format.
-
-```
-$ vi config.toml
-theme = "zafta"
-baseurl = ""
-languageCode = "en-us"
-title = "zafta - totally refreshing"
-MetaDataFormat = "toml"
-:wq
-
-$
-```
-
-### Generate the Site
-
-Now that we have an empty theme, let's generate the site again.
-
-```
-$ hugo --verbose
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
-WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
-0 draft content
-0 future content
-0 pages created
-0 tags created
-0 categories created
-in 2 ms
-$
-```
-
-Did you notice that the output is different? The warning message for the home page has disappeared and we have an additional information line saying that Hugo is syncing from the theme's directory.
-
-Let's check the public/ directory to see what Hugo's created.
-
-```
-$ ls -l public
-total 16
-drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 css
--rw-r--r-- 1 quoha staff 0 Sep 29 17:56 index.html
--rw-r--r-- 1 quoha staff 407 Sep 29 17:56 index.xml
-drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 js
--rw-r--r-- 1 quoha staff 243 Sep 29 17:56 sitemap.xml
-$
-```
-
-Notice four things:
-
-1. Hugo created a home page. This is the file public/index.html.
-2. Hugo created a css/ directory.
-3. Hugo created a js/ directory.
-4. Hugo claimed that it created 0 pages. It created a file and copied over static files, but didn't create any pages. That's because it considers a "page" to be a file created directly from a content file. It doesn't count things like the index.html files that it creates automatically.
-
-#### The Home Page
-
-Hugo supports many different types of templates. The home page is special because it gets its own type of template and its own template file. The file, layouts/index.html, is used to generate the HTML for the home page. The Hugo documentation says that this is the only required template, but that depends. Hugo's warning message shows that it looks for three different templates:
-
-```
-WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
-```
-
-If it can't find any of these, it completely skips creating the home page. We noticed that when we built the site without having a theme installed.
-
-When Hugo created our theme, it created an empty home page template. Now, when we build the site, Hugo finds the template and uses it to generate the HTML for the home page. Since the template file is empty, the HTML file is empty, too. If the template had any rules in it, then Hugo would have used them to generate the home page.
-
-```
-$ find . -name index.html | xargs ls -l
--rw-r--r-- 1 quoha staff 0 Sep 29 20:21 ./public/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 ./themes/zafta/layouts/index.html
-$
-```
-
-#### The Magic of Static
-
-Hugo does two things when generating the site. It uses templates to transform content into HTML and it copies static files into the site. Unlike content, static files are not transformed. They are copied exactly as they are.
-
-Hugo assumes that your site will use both CSS and JavaScript, so it creates directories in your theme to hold them. Remember opinions? Well, Hugo's opinion is that you'll store your CSS in a directory named css/ and your JavaScript in a directory named js/. If you don't like that, you can change the directory names in your theme directory or even delete them completely. Hugo's nice enough to offer its opinion, then behave nicely if you disagree.
-
-```
-$ find themes/zafta -type d | xargs ls -ld
-drwxr-xr-x 7 quoha staff 238 Sep 29 17:38 themes/zafta
-drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes/zafta/archetypes
-drwxr-xr-x 5 quoha staff 170 Sep 29 17:31 themes/zafta/layouts
-drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/_default
-drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/partials
-drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/static
-drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/css
-drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/js
-$
-```
-
-## The Theme Development Cycle
-
-When you're working on a theme, you will make changes in the theme's directory, rebuild the site, and check your changes in the browser. Hugo makes this very easy:
-
-1. Purge the public/ directory.
-2. Run the built in web server in watch mode.
-3. Open your site in a browser.
-4. Update the theme.
-5. Glance at your browser window to see changes.
-6. Return to step 4.
-
-I’ll throw in one more opinion: never work on a theme on a live site. Always work on a copy of your site. Make changes to your theme, test them, then copy them up to your site. For added safety, use a tool like Git to keep a revision history of your content and your theme. Believe me when I say that it is too easy to lose both your mind and your changes.
-
-Check the main Hugo site for information on using Git with Hugo.
-
-### Purge the public/ Directory
-
-When generating the site, Hugo will create new files and update existing ones in the ```public/``` directory. It will not delete files that are no longer used. For example, files that were created in the wrong directory or with the wrong title will remain. If you leave them, you might get confused by them later. I recommend cleaning out your site prior to generating it.
-
-Note: If you're building on an SSD, you should ignore this. Churning on a SSD can be costly.
-
-### Hugo's Watch Option
-
-Hugo's "`--watch`" option will monitor the content/ and your theme directories for changes and rebuild the site automatically.
-
-### Live Reload
-
-Hugo's built in web server supports live reload. As pages are saved on the server, the browser is told to refresh the page. Usually, this happens faster than you can say, "Wow, that's totally amazing."
-
-### Development Commands
-
-Use the following commands as the basis for your workflow.
-
-```
-## purge old files. hugo will recreate the public directory.
-##
-$ rm -rf public
-##
-## run hugo in watch mode
-##
-$ hugo server --watch --verbose
-```
-
-Here's sample output showing Hugo detecting a change to the template for the home page. Once generated, the web browser automatically reloaded the page. I've said this before, it's amazing.
-
-
-```
-$ rm -rf public
-$ hugo server --watch --verbose
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
-WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
-0 draft content
-0 future content
-0 pages created
-0 tags created
-0 categories created
-in 2 ms
-Watching for changes in /Users/quoha/Sites/zafta/content
-Serving pages from /Users/quoha/Sites/zafta/public
-Web Server is available at http://localhost:1313
-Press Ctrl+C to stop
-INFO: 2014/09/29 File System Event: ["/Users/quoha/Sites/zafta/themes/zafta/layouts/index.html": MODIFY|ATTRIB]
-Change detected, rebuilding site
-
-WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
-0 draft content
-0 future content
-0 pages created
-0 tags created
-0 categories created
-in 1 ms
-```
-
-## Update the Home Page Template
-
-The home page is one of a few special pages that Hugo creates automatically. As mentioned earlier, it looks for one of three files in the theme's layout/ directory:
-
-1. index.html
-2. _default/list.html
-3. _default/single.html
-
-We could update one of the default templates, but a good design decision is to update the most specific template available. That's not a hard and fast rule (in fact, we'll break it a few times in this tutorial), but it is a good generalization.
-
-### Make a Static Home Page
-
-Right now, that page is empty because we don't have any content and we don't have any logic in the template. Let's change that by adding some text to the template.
-
-```
-$ vi themes/zafta/layouts/index.html
-<!DOCTYPE html>
-<html>
-<body>
- <p>hugo says hello!</p>
-</body>
-</html>
-:wq
-
-$
-```
-
-Build the web site and then verify the results.
-
-```
-$ hugo --verbose
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
-WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
-0 draft content
-0 future content
-0 pages created
-0 tags created
-0 categories created
-in 2 ms
-
-$ find public -type f -name '*.html' | xargs ls -l
--rw-r--r-- 1 quoha staff 78 Sep 29 21:26 public/index.html
-
-$ cat public/index.html
-<!DOCTYPE html>
-<html>
-<body>
- <p>hugo says hello!</p>
-</html>
-```
-
-#### Live Reload
-
-Note: If you're running the server with the `--watch` option, you'll see different content in the file:
-
-```
-$ cat public/index.html
-<!DOCTYPE html>
-<html>
-<body>
- <p>hugo says hello!</p>
-<script>document.write('<script src="http://'
- + (location.host || 'localhost').split(':')[0]
- + ':1313/livereload.js?mindelay=10"></'
- + 'script>')</script></body>
-</html>
-```
-
-When you use `--watch`, the Live Reload script is added by Hugo. Look for live reload in the documentation to see what it does and how to disable it.
-
-### Build a "Dynamic" Home Page
-
-"Dynamic home page?" Hugo's a static web site generator, so this seems an odd thing to say. I mean let's have the home page automatically reflect the content in the site every time Hugo builds it. We'll use iteration in the template to do that.
-
-#### Create New Posts
-
-Now that we have the home page generating static content, let's add some content to the site. We'll display these posts as a list on the home page and on their own page, too.
-
-Hugo has a command to generate a skeleton post, just like it does for sites and themes.
-
-```
-$ hugo --verbose new post/first.md
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 attempting to create post/first.md of post
-INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/default.md
-ERROR: 2014/09/29 Unable to Cast <nil> to map[string]interface{}
-
-$
-```
-
-That wasn't very nice, was it?
-
-The "new" command uses an archetype to create the post file. Hugo created an empty default archetype file, but that causes an error when there's a theme. For me, the workaround was to create an archetypes file specifically for the post type.
-
-```
-$ vi themes/zafta/archetypes/post.md
-+++
-Description = ""
-Tags = []
-Categories = []
-+++
-:wq
-
-$ find themes/zafta/archetypes -type f | xargs ls -l
--rw-r--r-- 1 quoha staff 0 Sep 29 21:53 themes/zafta/archetypes/default.md
--rw-r--r-- 1 quoha staff 51 Sep 29 21:54 themes/zafta/archetypes/post.md
-
-$ hugo --verbose new post/first.md
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 attempting to create post/first.md of post
-INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
-INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/first.md
-/Users/quoha/Sites/zafta/content/post/first.md created
-
-$ hugo --verbose new post/second.md
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 attempting to create post/second.md of post
-INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
-INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/second.md
-/Users/quoha/Sites/zafta/content/post/second.md created
-
-$ ls -l content/post
-total 16
--rw-r--r-- 1 quoha staff 104 Sep 29 21:54 first.md
--rw-r--r-- 1 quoha staff 105 Sep 29 21:57 second.md
-
-$ cat content/post/first.md
-+++
-Categories = []
-Description = ""
-Tags = []
-date = "2014-09-29T21:54:53-05:00"
-title = "first"
-
-+++
-my first post
-
-$ cat content/post/second.md
-+++
-Categories = []
-Description = ""
-Tags = []
-date = "2014-09-29T21:57:09-05:00"
-title = "second"
-
-+++
-my second post
-
-$
-```
-
-Build the web site and then verify the results.
-
-```
-$ rm -rf public
-$ hugo --verbose
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 found taxonomies: map[string]string{"category":"categories", "tag":"tags"}
-WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
-0 draft content
-0 future content
-2 pages created
-0 tags created
-0 categories created
-in 4 ms
-$
-```
-
-The output says that it created 2 pages. Those are our new posts:
-
-```
-$ find public -type f -name '*.html' | xargs ls -l
--rw-r--r-- 1 quoha staff 78 Sep 29 22:13 public/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/first/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/second/index.html
-$
-```
-
-The new files are empty because because the templates used to generate the content are empty. The homepage doesn't show the new content, either. We have to update the templates to add the posts.
-
-### List and Single Templates
-
-In Hugo, we have three major kinds of templates. There's the home page template that we updated previously. It is used only by the home page. We also have "single" templates which are used to generate output for a single content file. We also have "list" templates that are used to group multiple pieces of content before generating output.
-
-Generally speaking, list templates are named "list.html" and single templates are named "single.html."
-
-There are three other types of templates: partials, content views, and terms. We will not go into much detail on these.
-
-### Add Content to the Homepage
-
-The home page will contain a list of posts. Let's update its template to add the posts that we just created. The logic in the template will run every time we build the site.
-
-```
-$ vi themes/zafta/layouts/index.html
-<!DOCTYPE html>
-<html>
-<body>
- {{ range first 10 .Data.Pages }}
- <h1>{{ .Title }}</h1>
- {{ end }}
-</body>
-</html>
-:wq
-
-$
-```
-
-Hugo uses the Go template engine. That engine scans the template files for commands which are enclosed between "{{" and "}}". In our template, the commands are:
-
-1. range
-2. .Title
-3. end
-
-The "range" command is an iterator. We're going to use it to go through the first ten pages. Every HTML file that Hugo creates is treated as a page, so looping through the list of pages will look at every file that will be created.
-
-The ".Title" command prints the value of the "title" variable. Hugo pulls it from the front matter in the Markdown file.
-
-The "end" command signals the end of the range iterator. The engine loops back to the top of the iteration when it finds "end." Everything between the "range" and "end" is evaluated every time the engine goes through the iteration. In this file, that would cause the title from the first ten pages to be output as heading level one.
-
-It's helpful to remember that some variables, like .Data, are created before any output files. Hugo loads every content file into the variable and then gives the template a chance to process before creating the HTML files.
-
-Build the web site and then verify the results.
-
-```
-$ rm -rf public
-$ hugo --verbose
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
-WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
-0 draft content
-0 future content
-2 pages created
-0 tags created
-0 categories created
-in 4 ms
-$ find public -type f -name '*.html' | xargs ls -l
--rw-r--r-- 1 quoha staff 94 Sep 29 22:23 public/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/first/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/second/index.html
-$ cat public/index.html
-<!DOCTYPE html>
-<html>
-<body>
-
- <h1>second</h1>
-
- <h1>first</h1>
-
-</body>
-</html>
-$
-```
-
-Congratulations, the home page shows the title of the two posts. The posts themselves are still empty, but let's take a moment to appreciate what we've done. Your template now generates output dynamically. Believe it or not, by inserting the range command inside of those curly braces, you've learned everything you need to know to build a theme. All that's really left is understanding which template will be used to generate each content file and becoming familiar with the commands for the template engine.
-
-And, if that were entirely true, this tutorial would be much shorter. There are a few things to know that will make creating a new template much easier. Don't worry, though, that's all to come.
-
-### Add Content to the Posts
-
-We're working with posts, which are in the content/post/ directory. That means that their section is "post" (and if we don't do something weird, their type is also "post").
-
-Hugo uses the section and type to find the template file for every piece of content. Hugo will first look for a template file that matches the section or type name. If it can't find one, then it will look in the _default/ directory. There are some twists that we'll cover when we get to categories and tags, but for now we can assume that Hugo will try post/single.html, then _default/single.html.
-
-Now that we know the search rule, let's see what we actually have available:
-
-```
-$ find themes/zafta -name single.html | xargs ls -l
--rw-r--r-- 1 quoha staff 132 Sep 29 17:31 themes/zafta/layouts/_default/single.html
-```
-
-We could create a new template, post/single.html, or change the default. Since we don't know of any other content types, let's start with updating the default.
-
-Remember, any content that we haven't created a template for will end up using this template. That can be good or bad. Bad because I know that we're going to be adding different types of content and we're going to end up undoing some of the changes we've made. It's good because we'll be able to see immediate results. It's also good to start here because we can start to build the basic layout for the site. As we add more content types, we'll refactor this file and move logic around. Hugo makes that fairly painless, so we'll accept the cost and proceed.
-
-Please see the Hugo documentation on template rendering for all the details on determining which template to use. And, as the docs mention, if you're building a single page application (SPA) web site, you can delete all of the other templates and work with just the default single page. That's a refreshing amount of joy right there.
-
-#### Update the Template File
-
-```
-$ vi themes/zafta/layouts/_default/single.html
-<!DOCTYPE html>
-<html>
-<head>
- <title>{{ .Title }}</title>
-</head>
-<body>
- <h1>{{ .Title }}</h1>
- {{ .Content }}
-</body>
-</html>
-:wq
-
-$
-```
-
-Build the web site and verify the results.
-
-```
-$ rm -rf public
-$ hugo --verbose
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
-WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
-0 draft content
-0 future content
-2 pages created
-0 tags created
-0 categories created
-in 4 ms
-
-$ find public -type f -name '*.html' | xargs ls -l
--rw-r--r-- 1 quoha staff 94 Sep 29 22:40 public/index.html
--rw-r--r-- 1 quoha staff 125 Sep 29 22:40 public/post/first/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 22:40 public/post/index.html
--rw-r--r-- 1 quoha staff 128 Sep 29 22:40 public/post/second/index.html
-
-$ cat public/post/first/index.html
-<!DOCTYPE html>
-<html>
-<head>
- <title>first</title>
-</head>
-<body>
- <h1>first</h1>
- <p>my first post</p>
-
-</body>
-</html>
-
-$ cat public/post/second/index.html
-<!DOCTYPE html>
-<html>
-<head>
- <title>second</title>
-</head>
-<body>
- <h1>second</h1>
- <p>my second post</p>
-
-</body>
-</html>
-$
-```
-
-Notice that the posts now have content. You can go to localhost:1313/post/first to verify.
-
-### Linking to Content
-
-The posts are on the home page. Let's add a link from there to the post. Since this is the home page, we'll update its template.
-
-```
-$ vi themes/zafta/layouts/index.html
-<!DOCTYPE html>
-<html>
-<body>
- {{ range first 10 .Data.Pages }}
- <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
- {{ end }}
-</body>
-</html>
-```
-
-Build the web site and verify the results.
-
-```
-$ rm -rf public
-$ hugo --verbose
-INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
-INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
-WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
-0 draft content
-0 future content
-2 pages created
-0 tags created
-0 categories created
-in 4 ms
-
-$ find public -type f -name '*.html' | xargs ls -l
--rw-r--r-- 1 quoha staff 149 Sep 29 22:44 public/index.html
--rw-r--r-- 1 quoha staff 125 Sep 29 22:44 public/post/first/index.html
--rw-r--r-- 1 quoha staff 0 Sep 29 22:44 public/post/index.html
--rw-r--r-- 1 quoha staff 128 Sep 29 22:44 public/post/second/index.html
-
-$ cat public/index.html
-<!DOCTYPE html>
-<html>
-<body>
-
- <h1><a href="/post/second/">second</a></h1>
-
- <h1><a href="/post/first/">first</a></h1>
-
-</body>
-</html>
-
-$
-```
-
-### Create a Post Listing
-
-We have the posts displaying on the home page and on their own page. We also have a file public/post/index.html that is empty. Let's make it show a list of all posts (not just the first ten).
-
-We need to decide which template to update. This will be a listing, so it should be a list template. Let's take a quick look and see which list templates are available.
-
-```
-$ find themes/zafta -name list.html | xargs ls -l
--rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
-```
-
-As with the single post, we have to decide to update _default/list.html or create post/list.html. We still don't have multiple content types, so let's stay consistent and update the default list template.
-
-## Creating Top Level Pages
-
-Let's add an "about" page and display it at the top level (as opposed to a sub-level like we did with posts).
-
-The default in Hugo is to use the directory structure of the content/ directory to guide the location of the generated html in the public/ directory. Let's verify that by creating an "about" page at the top level:
-
-```
-$ vi content/about.md
-+++
-title = "about"
-description = "about this site"
-date = "2014-09-27"
-slug = "about time"
-+++
-
-## about us
-
-i'm speechless
-:wq
-```
-
-Generate the web site and verify the results.
-
-```
-$ find public -name '*.html' | xargs ls -l
--rw-rw-r-- 1 mdhender staff 334 Sep 27 15:08 public/about-time/index.html
--rw-rw-r-- 1 mdhender staff 527 Sep 27 15:08 public/index.html
--rw-rw-r-- 1 mdhender staff 358 Sep 27 15:08 public/post/first-post/index.html
--rw-rw-r-- 1 mdhender staff 0 Sep 27 15:08 public/post/index.html
--rw-rw-r-- 1 mdhender staff 342 Sep 27 15:08 public/post/second-post/index.html
-```
-
-Notice that the page wasn't created at the top level. It was created in a sub-directory named 'about-time/'. That name came from our slug. Hugo will use the slug to name the generated content. It's a reasonable default, by the way, but we can learn a few things by fighting it for this file.
-
-One other thing. Take a look at the home page.
-
-```
-$ cat public/index.html
-<!DOCTYPE html>
-<html>
-<body>
- <h1><a href="http://localhost:1313/post/theme/">creating a new theme</a></h1>
- <h1><a href="http://localhost:1313/about-time/">about</a></h1>
- <h1><a href="http://localhost:1313/post/second-post/">second</a></h1>
- <h1><a href="http://localhost:1313/post/first-post/">first</a></h1>
-<script>document.write('<script src="http://'
- + (location.host || 'localhost').split(':')[0]
- + ':1313/livereload.js?mindelay=10"></'
- + 'script>')</script></body>
-</html>
-```
-
-Notice that the "about" link is listed with the posts? That's not desirable, so let's change that first.
-
-```
-$ vi themes/zafta/layouts/index.html
-<!DOCTYPE html>
-<html>
-<body>
- <h1>posts</h1>
- {{ range first 10 .Data.Pages }}
- {{ if eq .Type "post"}}
- <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
- {{ end }}
- {{ end }}
-
- <h1>pages</h1>
- {{ range .Data.Pages }}
- {{ if eq .Type "page" }}
- <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
- {{ end }}
- {{ end }}
-</body>
-</html>
-:wq
-```
-
-Generate the web site and verify the results. The home page has two sections, posts and pages, and each section has the right set of headings and links in it.
-
-But, that about page still renders to about-time/index.html.
-
-```
-$ find public -name '*.html' | xargs ls -l
--rw-rw-r-- 1 mdhender staff 334 Sep 27 15:33 public/about-time/index.html
--rw-rw-r-- 1 mdhender staff 645 Sep 27 15:33 public/index.html
--rw-rw-r-- 1 mdhender staff 358 Sep 27 15:33 public/post/first-post/index.html
--rw-rw-r-- 1 mdhender staff 0 Sep 27 15:33 public/post/index.html
--rw-rw-r-- 1 mdhender staff 342 Sep 27 15:33 public/post/second-post/index.html
-```
-
-Knowing that hugo is using the slug to generate the file name, the simplest solution is to change the slug. Let's do it the hard way and change the permalink in the configuration file.
-
-```
-$ vi config.toml
-[permalinks]
- page = "/:title/"
- about = "/:filename/"
-```
-
-Generate the web site and verify that this didn't work. Hugo lets "slug" or "URL" override the permalinks setting in the configuration file. Go ahead and comment out the slug in content/about.md, then generate the web site to get it to be created in the right place.
-
-## Sharing Templates
-
-If you've been following along, you probably noticed that posts have titles in the browser and the home page doesn't. That's because we didn't put the title in the home page's template (layouts/index.html). That's an easy thing to do, but let's look at a different option.
-
-We can put the common bits into a shared template that's stored in the themes/zafta/layouts/partials/ directory.
-
-### Create the Header and Footer Partials
-
-In Hugo, a partial is a sugar-coated template. Normally a template reference has a path specified. Partials are different. Hugo searches for them along a TODO defined search path. This makes it easier for end-users to override the theme's presentation.
-
-```
-$ vi themes/zafta/layouts/partials/header.html
-<!DOCTYPE html>
-<html>
-<head>
- <title>{{ .Title }}</title>
-</head>
-<body>
-:wq
-
-$ vi themes/zafta/layouts/partials/footer.html
-</body>
-</html>
-:wq
-```
-
-### Update the Home Page Template to Use the Partials
-
-The most noticeable difference between a template call and a partials call is the lack of path:
-
-```
-{{ template "theme/partials/header.html" . }}
-```
-versus
-```
-{{ partial "header.html" . }}
-```
-Both pass in the context.
-
-Let's change the home page template to use these new partials.
-
-```
-$ vi themes/zafta/layouts/index.html
-{{ partial "header.html" . }}
-
- <h1>posts</h1>
- {{ range first 10 .Data.Pages }}
- {{ if eq .Type "post"}}
- <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
- {{ end }}
- {{ end }}
-
- <h1>pages</h1>
- {{ range .Data.Pages }}
- {{ if or (eq .Type "page") (eq .Type "about") }}
- <h2><a href="{{ .Permalink }}">{{ .Type }} - {{ .Title }} - {{ .RelPermalink }}</a></h2>
- {{ end }}
- {{ end }}
-
-{{ partial "footer.html" . }}
-:wq
-```
-
-Generate the web site and verify the results. The title on the home page is now "your title here", which comes from the "title" variable in the config.toml file.
-
-### Update the Default Single Template to Use the Partials
-
-```
-$ vi themes/zafta/layouts/_default/single.html
-{{ partial "header.html" . }}
-
- <h1>{{ .Title }}</h1>
- {{ .Content }}
-
-{{ partial "footer.html" . }}
-:wq
-```
-
-Generate the web site and verify the results. The title on the posts and the about page should both reflect the value in the markdown file.
-
-## Add “Date Published” to Posts
-
-It's common to have posts display the date that they were written or published, so let's add that. The front matter of our posts has a variable named "date." It's usually the date the content was created, but let's pretend that's the value we want to display.
-
-### Add “Date Published” to the Template
-
-We'll start by updating the template used to render the posts. The template code will look like:
-
-```
-{{ .Date.Format "Mon, Jan 2, 2006" }}
-```
-
-Posts use the default single template, so we'll change that file.
-
-```
-$ vi themes/zafta/layouts/_default/single.html
-{{ partial "header.html" . }}
-
- <h1>{{ .Title }}</h1>
- <h2>{{ .Date.Format "Mon, Jan 2, 2006" }}</h2>
- {{ .Content }}
-
-{{ partial "footer.html" . }}
-:wq
-```
-
-Generate the web site and verify the results. The posts now have the date displayed in them. There's a problem, though. The "about" page also has the date displayed.
-
-As usual, there are a couple of ways to make the date display only on posts. We could do an "if" statement like we did on the home page. Another way would be to create a separate template for posts.
-
-The "if" solution works for sites that have just a couple of content types. It aligns with the principle of "code for today," too.
-
-Let's assume, though, that we've made our site so complex that we feel we have to create a new template type. In Hugo-speak, we're going to create a section template.
-
-Let's restore the default single template before we forget.
-
-```
-$ mkdir themes/zafta/layouts/post
-$ vi themes/zafta/layouts/_default/single.html
-{{ partial "header.html" . }}
-
- <h1>{{ .Title }}</h1>
- {{ .Content }}
-
-{{ partial "footer.html" . }}
-:wq
-```
-
-Now we'll update the post's version of the single template. If you remember Hugo's rules, the template engine will use this version over the default.
-
-```
-$ vi themes/zafta/layouts/post/single.html
-{{ partial "header.html" . }}
-
- <h1>{{ .Title }}</h1>
- <h2>{{ .Date.Format "Mon, Jan 2, 2006" }}</h2>
- {{ .Content }}
-
-{{ partial "footer.html" . }}
-:wq
-
-```
-
-Note that we removed the date logic from the default template and put it in the post template. Generate the web site and verify the results. Posts have dates and the about page doesn't.
-
-### Don't Repeat Yourself
-
-DRY is a good design goal and Hugo does a great job supporting it. Part of the art of a good template is knowing when to add a new template and when to update an existing one. While you're figuring that out, accept that you'll be doing some refactoring. Hugo makes that easy and fast, so it's okay to delay splitting up a template.
diff --git a/exampleSite/content/posts/goisforlovers.fr.md b/exampleSite/content/posts/goisforlovers.fr.md
deleted file mode 100644
index 80ec632..0000000
--- a/exampleSite/content/posts/goisforlovers.fr.md
+++ /dev/null
@@ -1,352 +0,0 @@
-+++
-categories = ["Go"]
-date = "2014-04-02"
-description = ""
-featured = "pic02.jpg"
-featuredalt = ""
-featuredpath = "date"
-linktitle = ""
-slug = "Introduction aux modeles Hugo"
-title = "Introduction aux modèles (Hu)go"
-type = ["posts","post"]
-[ author ]
- name = "Michael Henderson"
-+++
-
-Hugo utilise l'excellente librairie [go][] [html/template][gohtmltemplate] pour
-son moteur de modèles. c'est un moteur extrêmement léger qui offre un très petit
-nombre de fonctions logiques. À notre expérience, c'est juste ce qu'il faut pour
-créer un bon site web statique. Si vous avez déjà utilisé d'autre moteurs de
-modèles pour différents langages ou frameworks, vous allez retrouver beaucoup de
-similitudes avec les modèles go.
-
-Ce document est une introduction sur l'utilisation de Go templates. La
-[documentation go][gohtmltemplate] fourni plus de détails.
-
-## Introduction aux modèles Go
-
-Go templates fournit un langage de modèles très simple. Il adhère à la
-conviction que les modèles ou les vues doivent avoir une logique des plus
-élémentaires. L'une des conséquences de cette simplicité est que les modèles
-seront plus rapides a être analysés.
-
-Une caractéristique unique de Go templates est qu'il est conscient du contenu.
-Les variables et le contenu va être nettoyé suivant le contexte d'utilisation.
-Plus de détails sont disponibles dans la [documentation go][gohtmltemplate].
-
-## Syntaxe basique
-
-Les modèles en langage Go sont des fichiers HTML avec l'ajout de variables et
-fonctions.
-
-**Les variables Go et les fonctions sont accessibles avec {{ }}**
-
-
-Accès à une variable prédéfinie "foo":
-
- {{ foo }}
-
-**Les paramètres sont séparés par des espaces**
-
-Appel de la fonction add avec 1 et 2 en argument**
-
- {{ add 1 2 }}
-
-**Les méthodes et les champs sont accessibles par un point**
-
-Accès au paramètre de la page "bar"
-
- {{ .Params.bar }}
-
-**Les parenthèses peuvent être utilisées pour grouper des éléments ensemble**
-```
-{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
-```
-
-## Variables
-
-Chaque modèle go a une structure (objet) mis à sa disposition. Avec Hugo, à
-chaque modèle est passé soit une page, soit une structure de nœud, suivant quel
-type de page vous rendez. Plus de détails sont disponibles sur la page des
-[variables](/layout/variables).
-
-Une variable est accessible par son nom.
-
- <title>{{ .Title }}</title>
-
-Les variables peuvent également être définies et appelées.
-
- {{ $address := "123 Main St."}}
- {{ $address }}
-
-
-## Functions
-
-Go templace est livré avec quelques fonctions qui fournissent des
-fonctionnalités basiques. Le système de Go template fourni également un
-mécanisme permettant aux applications d'étendre les fonctions disponible. Les
-[fonctions de modèle Hugo](/layout/functions) fourni quelques fonctionnalités
-supplémentaires que nous espérons qu'elles seront utiles pour vos sites web.
-Les functions sont appelées en utilisant leur nom suivi par les paramètres
-requis séparés par des espaces. Des fonctions de modèles ne peuvent pas être
-ajoutées sans recompiler Hugo.
-
-**Exemple:**
-
- {{ add 1 2 }}
-
-## Inclusions
-
-Lorsque vous incluez un autre modèle, vous devez y passer les données qu'il sera
-en mesure d'accèder. Pour passer le contexte actuel, pensez à ajouter un point.
-La localisation du modèle sera toujours à partir du répertoire /layout/ dans
-Hugo.
-
-**Exemple:**
-
- {{ template "chrome/header.html" . }}
-
-
-## Logique
-
-Go templates fourni les itérations et la logique conditionnèle des plus basique.
-
-### Itération
-
-Comme en go, les modèles go utilisent fortement *range* pour itérer dans une
-map, un array ou un slice. Les exemples suivant montre différentes façons
-d'utiliser *range*
-
-**Exemple 1: En utilisant le context**
-
- {{ range array }}
- {{ . }}
- {{ end }}
-
-**Exemple 2: En déclarant un nom de variable**
-
- {{range $element := array}}
- {{ $element }}
- {{ end }}
-
-**Exemple 2: En déclarant un nom de varialbe pour la clé et la valeur**
-
- {{range $index, $element := array}}
- {{ $index }}
- {{ $element }}
- {{ end }}
-
-### Conditions
-
-*If*, *else*, *with*, *or*, *&*, *and* fournissent la base pour la logique
-conditionnelle avec Go templates. Comme *range*, chaque déclaration est fermé
-avec `end`.
-
-Go templates considère les valeurs suivante comme *false* :
-
-* false
-* 0
-* tout array, slice, map ou chaine d'une longueur de zéro
-
-**Exemple 1: If**
-
- {{ if isset .Params "title" }}<h4>{{ index .Params "title" }}</h4>{{ end }}
-
-**Exemple 2: If -> Else**
-
- {{ if isset .Params "alt" }}
- {{ index .Params "alt" }}
- {{else}}
- {{ index .Params "caption" }}
- {{ end }}
-
-**Exemple 3: And & Or**
-```
-{{ if and (or (isset .Params "title") (isset .Params "caption"))
- (isset .Params "attr")}}
-```
-**Exemple 4: With**
-
-Une manière alternative d'écrire un "if" et de référencer cette même valeur est
-d'utiliser "with". Cela permet de remplacer le contexte `.` par cet valeur et
-saute le bloc si la variable est absente.
-
-Le premier exemple peut être simplifié à ceci :
-
- {{ with .Params.title }}<h4>{{ . }}</h4>{{ end }}
-
-**Exemple 5: If -> Else If**
-
- {{ if isset .Params "alt" }}
- {{ index .Params "alt" }}
- {{ else if isset .Params "caption" }}
- {{ index .Params "caption" }}
- {{ end }}
-
-## *Pipes*
-
-L'un des composants le plus puissant de Go templates est la capacité d'empiler
-les action l'une après l'autre. Cela est fait en utilisant les *pipes*.
-Empruntés aux *pipes* unix, le concept est simple. Chaque sortie de *pipeline*
-devient l'entrée du *pipe* suivant.
-
-À cause de la syntaxe très simple de Go templates, le *pipe* est essentiel pour
-être capable d'enchainer les appels de fonctions. Une limitation des *pipes*
-est qu'il ne peuvent fonctionner seulement avec une seule valeur et cette valeur
-devient le dernier paramètre du prochain *pipeline*.
-
-Quelques exemples simple devrait vous aider à comprendre comment utiliser les
-*pipes*.
-
-**Exemple 1 :**
-
- {{ if eq 1 1 }} Same {{ end }}
-
-est identique à
-
- {{ eq 1 1 | if }} Same {{ end }}
-
-
-Il semble étrange de placer le *if* à la fin, mais il fournit une bonne
-illustration de la façon d'utiliser les tuyaux.
-
-**Exemple 2 :**
-
- {{ index .Params "disqus_url" | html }}
-
-Accès au paramètre de page nommé "disqus_url" et échappement du HTML
-
-**Exemple 3 :**
-```
-{{ if or (or (isset .Params "title") (isset .Params "caption"))
- (isset .Params "attr")}}
-Stuff Here
-{{ end }}
-```
-Peut être réécrit en
-
-```
-{{ isset .Params "caption" | or isset .Params "title" |
- or isset .Params "attr" | if }}
-Stuff Here
-{{ end }}
-```
-
-## Contexte (alias. le point)
-
-Le concept le plus facilement négligé pour comprendre les modèles go est que
-{{ . }} fait toujours référence au contexte actuel. Dans le plus haut niveau de
-votre modèle, ce sera l'ensemble des données mis à votre disposition. Dans une
-itération, ce sera la valeur de l'élément actuel. Enfin, dans une boucle, le
-contexte change. . ne fera plus référence aux données disponibles dans la page
-entière. Si vous avez besoin y d'accèder depuis l'intérieur d'une boucle, il est
-judicieux d'y définir comme variable au lieu de dépendre du contexte.
-
-**Exemple:**
-```
-{{ $title := .Site.Title }}
-{{ range .Params.tags }}
-<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">
- {{ . }}</a> - {{ $title }} </li>
-{{ end }}
-```
-
-Notez que, une fois que nous sommes entrés dans la boucle, la valeur de
-{{ . }} a changée. Nous avons défini une variable en dehors de la boucle, afin
-d'y avoir accès dans la boucle.
-
-# Les Paramètres d'Hugo
-
-Hugo fournit l'option de passer des valeurs au modèle depuis la configuration du
-site, ou depuis les métadonnées de chaque partie du contenu. Vous pouvez définir
-n'importe quelle valeur de n'importe quel type (supporté par votre section
-liminaire / format de configuration) et les utiliser comme vous le souhaitez
-dans votre modèle.
-
-## Utiliser les paramètres de contenu (page)
-
-Dans chaque partie du contenu, vous pouvez fournir des variables pour être
-utilisées par le modèle. Cela se passe dans la
-[section liminaire](/content/front-matter).
-
-Un exemple de cela est utilisé par ce site de documentation. La plupart des
-pages bénéficient de la présentation de la table des matières. Quelques fois,
-la table des matières n'a pas beaucoup de sens. Nous avons défini une variable
-dans notre section liminaire de quelques pages pour désactiver la table des
-matières.
-
-Ceci est un exemple de section liminaire :
-
-```
----
-title: "Permalinks"
-date: "2013-11-18"
-aliases:
- - "/doc/permalinks/"
-groups: ["extras"]
-groups_weight: 30
-notoc: true
----
-```
-
-Ceci est le code correspondant dans le modèle :
-
- {{ if not .Params.notoc }}
- <div id="toc" class="well col-md-4 col-sm-6">
- {{ .TableOfContents }}
- </div>
- {{ end }}
-
-
-
-## Utiliser les paramètres de site (config)
-
-Dans votre configuration de plus haut niveau (ex `config.yaml`), vous pouvez
-définir des paramètres de site, dont les valeurs vous seront accessibles.
-
-Pour les instances, vous pourriez délarer :
-
-```yaml
-params:
- CopyrightHTML: "Copyright &#xA9; 2013 John Doe. All Rights Reserved."
- TwitterUser: "spf13"
- SidebarRecentLimit: 5
-```
-
-Avec un pied de page, vous devriez déclarer un `<footer>` qui est affiché
-seulement si le paramètre `CopyrightHTML` est déclaré, et si il l'est, vous
-devriez le déclarer comme HTML-safe, afin d'éviter d'échapper les entités HTML.
-Cela vous permettra de le modifier facilement dans votre configuration au lieu
-de le chercher dans votre modèle.
-
-```
-{{if .Site.Params.CopyrightHTML}}<footer>
-<div class="text-center">{{.Site.Params.CopyrightHTML | safeHtml}}</div>
-</footer>{{end}}
-```
-Une alternative au "if" et d'appeler la même valeur est d'utiliser "with". Cela
-modifiera le contexte et passera le bloc si la variable est absente :
-
-```
-{{with .Site.Params.TwitterUser}}<span class="twitter">
-<a href="https://twitter.com/{{.}}" rel="author">
-<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
- alt="Twitter"></a>
-</span>{{end}}
-```
-
-Enfin, si vous souhaitez extraire des "constantes magiques" de vos mises en
-page, vous pouvez le faire comme dans l'exemple suivant :
-
-```
-<nav class="recent">
- <h1>Recent Posts</h1>
- <ul>{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
- <li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
- {{end}}</ul>
-</nav>
-```
-
-
-[go]: <http://golang.org/>
-[gohtmltemplate]: <http://golang.org/pkg/html/template/>
diff --git a/exampleSite/content/posts/goisforlovers.md b/exampleSite/content/posts/goisforlovers.md
deleted file mode 100644
index a208ef9..0000000
--- a/exampleSite/content/posts/goisforlovers.md
+++ /dev/null
@@ -1,347 +0,0 @@
-+++
-title = "(Hu)go Template Primer"
-description = ""
-type = ["posts","post"]
-tags = [
- "go",
- "golang",
- "templates",
- "themes",
- "development",
-]
-date = "2014-04-02"
-categories = [
- "Development",
- "golang",
-]
-series = ["Hugo 101"]
-[ author ]
- name = "Hugo Authors"
-+++
-
-Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for
-its template engine. It is an extremely lightweight engine that provides a very
-small amount of logic. In our experience that it is just the right amount of
-logic to be able to create a good static website. If you have used other
-template systems from different languages or frameworks you will find a lot of
-similarities in Go templates.
-
-This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate]
-provide more details.
-
-## Introduction to Go Templates
-
-Go templates provide an extremely simple template language. It adheres to the
-belief that only the most basic of logic belongs in the template or view layer.
-One consequence of this simplicity is that Go templates parse very quickly.
-
-A unique characteristic of Go templates is they are content aware. Variables and
-content will be sanitized depending on the context of where they are used. More
-details can be found in the [Go docs][gohtmltemplate].
-
-## Basic Syntax
-
-Golang templates are HTML files with the addition of variables and
-functions.
-
-**Go variables and functions are accessible within {{ }}**
-
-Accessing a predefined variable "foo":
-
- {{ foo }}
-
-**Parameters are separated using spaces**
-
-Calling the add function with input of 1, 2:
-
- {{ add 1 2 }}
-
-**Methods and fields are accessed via dot notation**
-
-Accessing the Page Parameter "bar"
-
- {{ .Params.bar }}
-
-**Parentheses can be used to group items together**
-
- {{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
-
-
-## Variables
-
-Each Go template has a struct (object) made available to it. In hugo each
-template is passed either a page or a node struct depending on which type of
-page you are rendering. More details are available on the
-[variables](/layout/variables) page.
-
-A variable is accessed by referencing the variable name.
-
- <title>{{ .Title }}</title>
-
-Variables can also be defined and referenced.
-
- {{ $address := "123 Main St."}}
- {{ $address }}
-
-
-## Functions
-
-Go template ship with a few functions which provide basic functionality. The Go
-template system also provides a mechanism for applications to extend the
-available functions with their own. [Hugo template
-functions](/layout/functions) provide some additional functionality we believe
-are useful for building websites. Functions are called by using their name
-followed by the required parameters separated by spaces. Template
-functions cannot be added without recompiling hugo.
-
-**Example:**
-
- {{ add 1 2 }}
-
-## Includes
-
-When including another template you will pass to it the data it will be
-able to access. To pass along the current context please remember to
-include a trailing dot. The templates location will always be starting at
-the /layout/ directory within Hugo.
-
-**Example:**
-
- {{ template "chrome/header.html" . }}
-
-
-## Logic
-
-Go templates provide the most basic iteration and conditional logic.
-
-### Iteration
-
-Just like in Go, the Go templates make heavy use of range to iterate over
-a map, array or slice. The following are different examples of how to use
-range.
-
-**Example 1: Using Context**
-
- {{ range array }}
- {{ . }}
- {{ end }}
-
-**Example 2: Declaring value variable name**
-
- {{range $element := array}}
- {{ $element }}
- {{ end }}
-
-**Example 2: Declaring key and value variable name**
-
- {{range $index, $element := array}}
- {{ $index }}
- {{ $element }}
- {{ end }}
-
-### Conditionals
-
-If, else, with, or, & and provide the framework for handling conditional
-logic in Go Templates. Like range, each statement is closed with `end`.
-
-
-Go Templates treat the following values as false:
-
-* false
-* 0
-* any array, slice, map, or string of length zero
-
-**Example 1: If**
-
- {{ if isset .Params "title" }}<h4>{{ index .Params "title" }}</h4>{{ end }}
-
-**Example 2: If -> Else**
-
- {{ if isset .Params "alt" }}
- {{ index .Params "alt" }}
- {{else}}
- {{ index .Params "caption" }}
- {{ end }}
-
-**Example 3: And & Or**
-
- {{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
-
-**Example 4: With**
-
-An alternative way of writing "if" and then referencing the same value
-is to use "with" instead. With rebinds the context `.` within its scope,
-and skips the block if the variable is absent.
-
-The first example above could be simplified as:
-
- {{ with .Params.title }}<h4>{{ . }}</h4>{{ end }}
-
-**Example 5: If -> Else If**
-
- {{ if isset .Params "alt" }}
- {{ index .Params "alt" }}
- {{ else if isset .Params "caption" }}
- {{ index .Params "caption" }}
- {{ end }}
-
-## Pipes
-
-One of the most powerful components of Go templates is the ability to
-stack actions one after another. This is done by using pipes. Borrowed
-from unix pipes, the concept is simple, each pipeline's output becomes the
-input of the following pipe.
-
-Because of the very simple syntax of Go templates, the pipe is essential
-to being able to chain together function calls. One limitation of the
-pipes is that they only can work with a single value and that value
-becomes the last parameter of the next pipeline.
-
-A few simple examples should help convey how to use the pipe.
-
-**Example 1 :**
-
- {{ if eq 1 1 }} Same {{ end }}
-
-is the same as
-
- {{ eq 1 1 | if }} Same {{ end }}
-
-It does look odd to place the if at the end, but it does provide a good
-illustration of how to use the pipes.
-
-**Example 2 :**
-
- {{ index .Params "disqus_url" | html }}
-
-Access the page parameter called "disqus_url" and escape the HTML.
-
-**Example 3 :**
-
- {{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
- Stuff Here
- {{ end }}
-
-Could be rewritten as
-
- {{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }}
- Stuff Here
- {{ end }}
-
-
-## Context (aka. the dot)
-
-The most easily overlooked concept to understand about Go templates is that {{ . }}
-always refers to the current context. In the top level of your template this
-will be the data set made available to it. Inside of a iteration it will have
-the value of the current item. When inside of a loop the context has changed. .
-will no longer refer to the data available to the entire page. If you need to
-access this from within the loop you will likely want to set it to a variable
-instead of depending on the context.
-
-**Example:**
-
- {{ $title := .Site.Title }}
- {{ range .Params.tags }}
- <li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li>
- {{ end }}
-
-Notice how once we have entered the loop the value of {{ . }} has changed. We
-have defined a variable outside of the loop so we have access to it from within
-the loop.
-
-# Hugo Parameters
-
-Hugo provides the option of passing values to the template language
-through the site configuration (for sitewide values), or through the meta
-data of each specific piece of content. You can define any values of any
-type (supported by your front matter/config format) and use them however
-you want to inside of your templates.
-
-
-## Using Content (page) Parameters
-
-In each piece of content you can provide variables to be used by the
-templates. This happens in the [front matter](/content/front-matter).
-
-An example of this is used in this documentation site. Most of the pages
-benefit from having the table of contents provided. Sometimes the TOC just
-doesn't make a lot of sense. We've defined a variable in our front matter
-of some pages to turn off the TOC from being displayed.
-
-Here is the example front matter:
-
-```
----
-title: "Permalinks"
-date: "2013-11-18"
-aliases:
- - "/doc/permalinks/"
-groups: ["extras"]
-groups_weight: 30
-notoc: true
----
-```
-
-Here is the corresponding code inside of the template:
-
- {{ if not .Params.notoc }}
- <div id="toc" class="well col-md-4 col-sm-6">
- {{ .TableOfContents }}
- </div>
- {{ end }}
-
-
-
-## Using Site (config) Parameters
-In your top-level configuration file (eg, `config.yaml`) you can define site
-parameters, which are values which will be available to you in chrome.
-
-For instance, you might declare:
-
-```yaml
-params:
- CopyrightHTML: "Copyright &#xA9; 2013 John Doe. All Rights Reserved."
- TwitterUser: "spf13"
- SidebarRecentLimit: 5
-```
-
-Within a footer layout, you might then declare a `<footer>` which is only
-provided if the `CopyrightHTML` parameter is provided, and if it is given,
-you would declare it to be HTML-safe, so that the HTML entity is not escaped
-again. This would let you easily update just your top-level config file each
-January 1st, instead of hunting through your templates.
-
-```
-{{if .Site.Params.CopyrightHTML}}<footer>
-<div class="text-center">{{.Site.Params.CopyrightHTML | safeHtml}}</div>
-</footer>{{end}}
-```
-
-An alternative way of writing the "if" and then referencing the same value
-is to use "with" instead. With rebinds the context `.` within its scope,
-and skips the block if the variable is absent:
-
-```
-{{with .Site.Params.TwitterUser}}<span class="twitter">
-<a href="https://twitter.com/{{.}}" rel="author">
-<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
- alt="Twitter"></a>
-</span>{{end}}
-```
-
-Finally, if you want to pull "magic constants" out of your layouts, you can do
-so, such as in this example:
-
-```
-<nav class="recent">
- <h1>Recent Posts</h1>
- <ul>{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
- <li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
- {{end}}</ul>
-</nav>
-```
-
-
-[go]: https://golang.org/
-[gohtmltemplate]: https://golang.org/pkg/html/template/
diff --git a/exampleSite/content/posts/hugoisforlovers.md b/exampleSite/content/posts/hugoisforlovers.md
deleted file mode 100644
index 848b1ee..0000000
--- a/exampleSite/content/posts/hugoisforlovers.md
+++ /dev/null
@@ -1,92 +0,0 @@
-+++
-title = "Getting Started with Hugo"
-description = ""
-type = ["posts","post"]
-tags = [
- "go",
- "golang",
- "hugo",
- "development",
-]
-date = "2014-04-02"
-categories = [
- "Development",
- "golang",
-]
-series = ["Hugo 101"]
-[ author ]
- name = "Hugo Authors"
-+++
-
-## Step 1. Install Hugo
-
-Go to [Hugo releases](https://github.com/spf13/hugo/releases) and download the
-appropriate version for your OS and architecture.
-
-Save it somewhere specific as we will be using it in the next step.
-
-More complete instructions are available at [Install Hugo](https://gohugo.io/getting-started/installing/)
-
-## Step 2. Build the Docs
-
-Hugo has its own example site which happens to also be the documentation site
-you are reading right now.
-
-Follow the following steps:
-
- 1. Clone the [Hugo repository](http://github.com/spf13/hugo)
- 2. Go into the repo
- 3. Run hugo in server mode and build the docs
- 4. Open your browser to http://localhost:1313
-
-Corresponding pseudo commands:
-
- git clone https://github.com/spf13/hugo
- cd hugo
- /path/to/where/you/installed/hugo server --source=./docs
- > 29 pages created
- > 0 tags index created
- > in 27 ms
- > Web Server is available at http://localhost:1313
- > Press ctrl+c to stop
-
-Once you've gotten here, follow along the rest of this page on your local build.
-
-## Step 3. Change the docs site
-
-Stop the Hugo process by hitting Ctrl+C.
-
-Now we are going to run hugo again, but this time with hugo in watch mode.
-
- /path/to/hugo/from/step/1/hugo server --source=./docs --watch
- > 29 pages created
- > 0 tags index created
- > in 27 ms
- > Web Server is available at http://localhost:1313
- > Watching for changes in /Users/spf13/Code/hugo/docs/content
- > Press ctrl+c to stop
-
-
-Open your [favorite editor](http://vim.spf13.com) and change one of the source
-content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*.
-
-Content files are found in `docs/content/`. Unless otherwise specified, files
-are located at the same relative location as the url, in our case
-`docs/content/overview/quickstart.md`.
-
-Change and save this file.. Notice what happened in your terminal.
-
- > Change detected, rebuilding site
-
- > 29 pages created
- > 0 tags index created
- > in 26 ms
-
-Refresh the browser and observe that the typo is now fixed.
-
-Notice how quick that was. Try to refresh the site before it's finished building. I double dare you.
-Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.
-
-## Step 4. Have fun
-
-The best way to learn something is to play with it.
diff --git a/exampleSite/content/posts/migrate-from-jekyll.md b/exampleSite/content/posts/migrate-from-jekyll.md
deleted file mode 100644
index 132d74b..0000000
--- a/exampleSite/content/posts/migrate-from-jekyll.md
+++ /dev/null
@@ -1,161 +0,0 @@
----
-author:
- name: "Hugo Authors"
-date: 2014-03-10
-linktitle: Migrating from Jekyll
-title: Migrate to Hugo from Jekyll
-type:
-- post
-- posts
-weight: 10
-series:
-- Hugo 101
-aliases:
-- /blog/migrate-from-jekyll/
----
-
-## Move static content to `static`
-Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output. Hugo keeps all static content under `static`. You should therefore move it all there.
-With Jekyll, something that looked like
-
- ▾ <root>/
- ▾ images/
- logo.png
-
-should become
-
- ▾ <root>/
- ▾ static/
- ▾ images/
- logo.png
-
-Additionally, you'll want any files that should reside at the root (such as `CNAME`) to be moved to `static`.
-
-## Create your Hugo configuration file
-Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the [Hugo configuration documentation](/overview/configuration/) for details.
-
-## Set your configuration publish folder to `_site`
-The default is for Jekyll to publish to `_site` and for Hugo to publish to `public`. If, like me, you have [`_site` mapped to a git submodule on the `gh-pages` branch](http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html), you'll want to do one of two alternatives:
-
-1. Change your submodule to point to map `gh-pages` to public instead of `_site` (recommended).
-
- git submodule deinit _site
- git rm _site
- git submodule add -b gh-pages git@github.com:your-username/your-repo.git public
-
-2. Or, change the Hugo configuration to use `_site` instead of `public`.
-
- {
- ..
- "publishdir": "_site",
- ..
- }
-
-## Convert Jekyll templates to Hugo templates
-That's the bulk of the work right here. The documentation is your friend. You should refer to [Jekyll's template documentation](http://jekyllrb.com/docs/templates/) if you need to refresh your memory on how you built your blog and [Hugo's template](/layout/templates/) to learn Hugo's way.
-
-As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours.
-
-## Convert Jekyll plugins to Hugo shortcodes
-Jekyll has [plugins](http://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port.
-
-### Implementation
-As an example, I was using a custom [`image_tag`](https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb) plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing.
-
-Jekyll's plugin:
-
- module Jekyll
- class ImageTag < Liquid::Tag
- @url = nil
- @caption = nil
- @class = nil
- @link = nil
- // Patterns
- IMAGE_URL_WITH_CLASS_AND_CAPTION =
- IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i
- IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i
- IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i
- IMAGE_URL = /((https?:\/\/|\/)(\S+))/i
- def initialize(tag_name, markup, tokens)
- super
- if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK
- @class = $1
- @url = $3
- @caption = $7
- @link = $9
- elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION
- @class = $1
- @url = $3
- @caption = $7
- elsif markup =~ IMAGE_URL_WITH_CAPTION
- @url = $1
- @caption = $5
- elsif markup =~ IMAGE_URL_WITH_CLASS
- @class = $1
- @url = $3
- elsif markup =~ IMAGE_URL
- @url = $1
- end
- end
- def render(context)
- if @class
- source = "<figure class='#{@class}'>"
- else
- source = "<figure>"
- end
- if @link
- source += "<a href=\"#{@link}\">"
- end
- source += "<img src=\"#{@url}\">"
- if @link
- source += "</a>"
- end
- source += "<figcaption>#{@caption}</figcaption>" if @caption
- source += "</figure>"
- source
- end
- end
- end
- Liquid::Template.register_tag('image', Jekyll::ImageTag)
-
-is written as this Hugo shortcode:
-
- <!-- image -->
- <figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
- {{ with .Get "link"}}<a href="{{.}}">{{ end }}
- <img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }} />
- {{ if .Get "link"}}</a>{{ end }}
- {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
- <figcaption>{{ if isset .Params "title" }}
- {{ .Get "title" }}{{ end }}
- {{ if or (.Get "caption") (.Get "attr")}}<p>
- {{ .Get "caption" }}
- {{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
- {{ .Get "attr" }}
- {{ if .Get "attrlink"}}</a> {{ end }}
- </p> {{ end }}
- </figcaption>
- {{ end }}
- </figure>
- <!-- image -->
-
-### Usage
-I simply changed:
-
- {% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg "One of my favorite touristy-type photos. I secretly waited for the good light while we were "having fun" and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." ->http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %}
-
-to this (this example uses a slightly extended version named `fig`, different than the built-in `figure`):
-
- {{%/* fig class="full" src="http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg" title="One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." link="http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/" */%}}
-
-As a bonus, the shortcode named parameters are, arguably, more readable.
-
-## Finishing touches
-### Fix content
-Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that `hugo server --watch` is your friend. Test your changes and fix errors as needed.
-
-### Clean up
-You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it.
-
-## A practical example in a diff
-[Hey, it's Alex](http://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610).
diff --git a/exampleSite/content/projects/migrate-from-jekyll.md b/exampleSite/content/projects/migrate-from-jekyll.md
deleted file mode 100755
index 4630436..0000000
--- a/exampleSite/content/projects/migrate-from-jekyll.md
+++ /dev/null
@@ -1,151 +0,0 @@
----
-title: Migrate to Hugo from Jekyll
-date: 2014-03-10
-categories: ["Uncategorized"]
----
-
-## Move static content to `static`
-Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output. Hugo keeps all static content under `static`. You should therefore move it all there.
-With Jekyll, something that looked like
-
- ▾ <root>/
- ▾ images/
- logo.png
-
-should become
-
- ▾ <root>/
- ▾ static/
- ▾ images/
- logo.png
-
-Additionally, you'll want any files that should reside at the root (such as `CNAME`) to be moved to `static`.
-
-## Create your Hugo configuration file
-Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the [Hugo configuration documentation](/overview/configuration/) for details.
-
-## Set your configuration publish folder to `_site`
-The default is for Jekyll to publish to `_site` and for Hugo to publish to `public`. If, like me, you have [`_site` mapped to a git submodule on the `gh-pages` branch](http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html), you'll want to do one of two alternatives:
-
-1. Change your submodule to point to map `gh-pages` to public instead of `_site` (recommended).
-
- git submodule deinit _site
- git rm _site
- git submodule add -b gh-pages git@github.com:your-username/your-repo.git public
-
-2. Or, change the Hugo configuration to use `_site` instead of `public`.
-
- {
- ..
- "publishdir": "_site",
- ..
- }
-
-## Convert Jekyll templates to Hugo templates
-That's the bulk of the work right here. The documentation is your friend. You should refer to [Jekyll's template documentation](http://jekyllrb.com/docs/templates/) if you need to refresh your memory on how you built your blog and [Hugo's template](/layout/templates/) to learn Hugo's way.
-
-As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours.
-
-## Convert Jekyll plugins to Hugo shortcodes
-Jekyll has [plugins](http://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port.
-
-### Implementation
-As an example, I was using a custom [`image_tag`](https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb) plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing.
-
-Jekyll's plugin:
-
- module Jekyll
- class ImageTag < Liquid::Tag
- @url = nil
- @caption = nil
- @class = nil
- @link = nil
- // Patterns
- IMAGE_URL_WITH_CLASS_AND_CAPTION =
- IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i
- IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i
- IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i
- IMAGE_URL = /((https?:\/\/|\/)(\S+))/i
- def initialize(tag_name, markup, tokens)
- super
- if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK
- @class = $1
- @url = $3
- @caption = $7
- @link = $9
- elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION
- @class = $1
- @url = $3
- @caption = $7
- elsif markup =~ IMAGE_URL_WITH_CAPTION
- @url = $1
- @caption = $5
- elsif markup =~ IMAGE_URL_WITH_CLASS
- @class = $1
- @url = $3
- elsif markup =~ IMAGE_URL
- @url = $1
- end
- end
- def render(context)
- if @class
- source = "<figure class='#{@class}'>"
- else
- source = "<figure>"
- end
- if @link
- source += "<a href=\"#{@link}\">"
- end
- source += "<img src=\"#{@url}\">"
- if @link
- source += "</a>"
- end
- source += "<figcaption>#{@caption}</figcaption>" if @caption
- source += "</figure>"
- source
- end
- end
- end
- Liquid::Template.register_tag('image', Jekyll::ImageTag)
-
-is written as this Hugo shortcode:
-
- <!-- image -->
- <figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
- {{ with .Get "link"}}<a href="{{.}}">{{ end }}
- <img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }} />
- {{ if .Get "link"}}</a>{{ end }}
- {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
- <figcaption>{{ if isset .Params "title" }}
- {{ .Get "title" }}{{ end }}
- {{ if or (.Get "caption") (.Get "attr")}}<p>
- {{ .Get "caption" }}
- {{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
- {{ .Get "attr" }}
- {{ if .Get "attrlink"}}</a> {{ end }}
- </p> {{ end }}
- </figcaption>
- {{ end }}
- </figure>
- <!-- image -->
-
-### Usage
-I simply changed:
-
- {% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg "One of my favorite touristy-type photos. I secretly waited for the good light while we were "having fun" and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." ->http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %}
-
-to this (this example uses a slightly extended version named `fig`, different than the built-in `figure`):
-
- {{%/* fig class="full" src="http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg" title="One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." link="http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/" */%}}
-
-As a bonus, the shortcode named parameters are, arguably, more readable.
-
-## Finishing touches
-### Fix content
-Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that `hugo server --watch` is your friend. Test your changes and fix errors as needed.
-
-### Clean up
-You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it.
-
-## A practical example in a diff
-[Hey, it's Alex](http://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610).
diff --git a/exampleSite/netlify.toml b/exampleSite/netlify.toml
deleted file mode 100644
index e7bc7f3..0000000
--- a/exampleSite/netlify.toml
+++ /dev/null
@@ -1,10 +0,0 @@
-[build]
- command = "hugo"
- publish = "public"
-
-[build.environment]
- HUGO_VERSION = "0.57"
- HUGO_ENABLEGITINFO = "true"
-
-[context.production.environment]
- HUGO_ENV = "production hugo --gc --minify"
diff --git a/exampleSite/static/android-chrome-192x192.png b/exampleSite/static/android-chrome-192x192.png
index 418e29f..87ba30b 100644
--- a/exampleSite/static/android-chrome-192x192.png
+++ b/exampleSite/static/android-chrome-192x192.png
Binary files differ
diff --git a/exampleSite/static/android-chrome-512x512.png b/exampleSite/static/android-chrome-512x512.png
index 6c16d31..3e52be3 100644
--- a/exampleSite/static/android-chrome-512x512.png
+++ b/exampleSite/static/android-chrome-512x512.png
Binary files differ
diff --git a/exampleSite/static/apple-touch-icon.png b/exampleSite/static/apple-touch-icon.png
index 78059c2..26f95ea 100644
--- a/exampleSite/static/apple-touch-icon.png
+++ b/exampleSite/static/apple-touch-icon.png
Binary files differ
diff --git a/exampleSite/static/browserconfig.xml b/exampleSite/static/browserconfig.xml
index 249c5c1..a47e5a5 100644
--- a/exampleSite/static/browserconfig.xml
+++ b/exampleSite/static/browserconfig.xml
@@ -3,7 +3,7 @@
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
- <TileColor>#ffc40d</TileColor>
+ <TileColor>#2d89ef</TileColor>
</tile>
</msapplication>
</browserconfig>
diff --git a/exampleSite/static/cover.png b/exampleSite/static/cover.png
deleted file mode 100644
index 8ea23e3..0000000
--- a/exampleSite/static/cover.png
+++ /dev/null
Binary files differ
diff --git a/exampleSite/static/favicon-16x16.png b/exampleSite/static/favicon-16x16.png
index 1131282..0594fcf 100644
--- a/exampleSite/static/favicon-16x16.png
+++ b/exampleSite/static/favicon-16x16.png
Binary files differ
diff --git a/exampleSite/static/favicon-32x32.png b/exampleSite/static/favicon-32x32.png
index b3c4891..1d3f09a 100644
--- a/exampleSite/static/favicon-32x32.png
+++ b/exampleSite/static/favicon-32x32.png
Binary files differ
diff --git a/exampleSite/static/favicon.ico b/exampleSite/static/favicon.ico
index b941479..5254021 100644
--- a/exampleSite/static/favicon.ico
+++ b/exampleSite/static/favicon.ico
Binary files differ
diff --git a/exampleSite/static/images/Apple-Devices-Preview.png b/exampleSite/static/images/Apple-Devices-Preview.png
new file mode 100644
index 0000000..d1bd34c
--- /dev/null
+++ b/exampleSite/static/images/Apple-Devices-Preview.png
Binary files differ
diff --git a/exampleSite/static/images/avatar.png b/exampleSite/static/images/avatar.png
new file mode 100644
index 0000000..f8d370d
--- /dev/null
+++ b/exampleSite/static/images/avatar.png
Binary files differ
diff --git a/exampleSite/static/images/loading.svg b/exampleSite/static/images/loading.svg
new file mode 100644
index 0000000..075a399
--- /dev/null
+++ b/exampleSite/static/images/loading.svg
@@ -0,0 +1,32 @@
+<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
+<svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">
+ <defs>
+ <linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a">
+ <stop stop-color="#fff" stop-opacity="0" offset="0%"/>
+ <stop stop-color="#fff" stop-opacity=".631" offset="63.146%"/>
+ <stop stop-color="#fff" offset="100%"/>
+ </linearGradient>
+ </defs>
+ <g fill="none" fill-rule="evenodd">
+ <g transform="translate(1 1)">
+ <path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="url(#a)" stroke-width="2">
+ <animateTransform
+ attributeName="transform"
+ type="rotate"
+ from="0 18 18"
+ to="360 18 18"
+ dur="0.9s"
+ repeatCount="indefinite" />
+ </path>
+ <circle fill="#fff" cx="36" cy="18" r="1">
+ <animateTransform
+ attributeName="transform"
+ type="rotate"
+ from="0 18 18"
+ to="360 18 18"
+ dur="0.9s"
+ repeatCount="indefinite" />
+ </circle>
+ </g>
+ </g>
+</svg>
diff --git a/exampleSite/static/images/me/avatar.jpeg b/exampleSite/static/images/me/avatar.jpeg
deleted file mode 100644
index 3054fc5..0000000
--- a/exampleSite/static/images/me/avatar.jpeg
+++ /dev/null
Binary files differ
diff --git a/exampleSite/static/logo.png b/exampleSite/static/logo.png
index 4a87942..f8d370d 100644
--- a/exampleSite/static/logo.png
+++ b/exampleSite/static/logo.png
Binary files differ
diff --git a/exampleSite/static/mstile-150x150.png b/exampleSite/static/mstile-150x150.png
index d26fbd7..0332bbe 100644
--- a/exampleSite/static/mstile-150x150.png
+++ b/exampleSite/static/mstile-150x150.png
Binary files differ
diff --git a/exampleSite/static/safari-pinned-tab.svg b/exampleSite/static/safari-pinned-tab.svg
index 592a418..05faebc 100644
--- a/exampleSite/static/safari-pinned-tab.svg
+++ b/exampleSite/static/safari-pinned-tab.svg
@@ -2,82 +2,27 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
- width="640.000000pt" height="640.000000pt" viewBox="0 0 640.000000 640.000000"
+ width="560.000000pt" height="560.000000pt" viewBox="0 0 560.000000 560.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
-<g transform="translate(0.000000,640.000000) scale(0.100000,-0.100000)"
+<g transform="translate(0.000000,560.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
-<path d="M2740 6383 c-30 -8 -71 -18 -90 -23 -478 -125 -860 -405 -1136 -835
--233 -364 -342 -823 -304 -1285 20 -249 28 -302 54 -400 14 -52 26 -105 26
--117 0 -12 9 -46 19 -75 10 -29 22 -72 25 -95 8 -56 25 -91 46 -98 25 -8 30
--34 31 -160 1 -197 38 -584 62 -655 8 -25 18 -67 22 -95 3 -27 10 -66 15 -85
-5 -19 16 -66 25 -105 68 -292 196 -651 302 -850 51 -93 134 -217 192 -284 36
--42 72 -83 79 -92 10 -13 6 -29 -22 -92 l-35 -75 -253 -82 c-360 -116 -485
--155 -553 -175 -33 -10 -91 -28 -130 -40 -38 -12 -97 -30 -130 -40 -33 -9 -71
--21 -85 -25 -14 -5 -59 -18 -100 -30 -309 -90 -497 -171 -547 -233 -15 -19
--23 -22 -53 -15 -60 13 -97 0 -133 -46 -53 -67 -67 -108 -67 -196 l0 -80 3200
-0 3200 0 0 72 c0 53 -6 88 -25 134 -32 80 -92 181 -119 199 -27 19 -89 19
--126 0 -28 -15 -33 -13 -141 40 -61 30 -143 67 -183 81 -173 64 -277 101 -516
-185 -356 126 -392 139 -415 150 -11 5 -146 56 -299 114 -153 58 -285 113 -292
-123 -11 14 -3 27 61 97 40 44 98 118 130 165 110 162 245 465 315 710 12 41
-25 85 31 98 5 13 9 32 9 43 0 10 4 27 9 37 12 23 35 116 56 227 9 50 20 104
-26 121 5 17 9 40 9 52 0 12 4 30 10 40 8 15 15 80 40 407 5 61 9 155 9 210 1
-111 7 145 26 145 23 0 36 27 46 97 6 37 15 72 20 78 5 5 9 17 9 27 0 10 5 18
-10 18 6 0 10 16 10 35 0 45 26 173 44 217 8 18 14 52 14 76 1 24 6 78 13 120
-16 100 16 463 0 572 -68 473 -221 800 -535 1143 -204 224 -506 413 -796 498
--234 69 -231 69 -662 68 -309 -1 -405 -4 -448 -16z m-277 -1048 c50 -8 139
--29 197 -46 133 -40 298 -58 540 -58 231 0 403 19 545 58 177 50 312 66 420
-52 187 -26 248 -54 372 -177 79 -77 98 -103 133 -176 91 -194 143 -500 119
--699 -14 -122 -10 -140 50 -224 l36 -49 -1 -131 c0 -75 -8 -168 -17 -219 -10
--49 -17 -90 -17 -92 0 -2 -30 -20 -67 -40 -227 -125 -341 -234 -433 -413 -27
--54 -94 -267 -114 -366 -37 -176 -41 -205 -66 -420 -18 -152 -26 -205 -33
--211 -9 -9 -5 -16 -72 111 -124 236 -151 259 -360 301 -38 8 -106 21 -150 30
--156 31 -233 20 -308 -46 l-37 -32 -44 37 c-82 67 -149 75 -316 39 -36 -8 -96
--21 -135 -29 -187 -38 -239 -73 -311 -212 -94 -180 -107 -203 -115 -203 -11 0
--13 15 -33 180 -9 74 -23 169 -30 210 -28 151 -35 186 -50 250 -8 36 -21 98
--30 138 -21 98 -88 265 -130 328 -19 28 -56 73 -83 100 -53 53 -198 156 -278
-197 -27 14 -58 31 -67 39 -29 22 -52 157 -52 313 -1 150 1 159 61 225 31 34
-37 74 23 166 -12 79 -8 202 10 299 59 314 111 447 222 573 115 129 200 178
-358 205 57 10 176 6 263 -8z m1162 -3117 c155 -47 206 -112 186 -235 -16 -106
--91 -174 -258 -234 -32 -11 -67 -25 -78 -30 -11 -5 -45 -18 -75 -28 -44 -16
--56 -17 -58 -6 -5 20 142 248 201 312 23 25 17 40 -10 28 -21 -9 -15 -8 -124
--30 -124 -24 -457 -12 -507 19 -7 4 -21 4 -33 1 -19 -6 -18 -9 14 -48 89 -111
-177 -253 177 -289 0 -10 -25 -4 -80 19 -57 24 -72 30 -145 57 -152 56 -231
-129 -246 229 -10 63 2 115 38 157 70 83 169 99 613 95 265 -2 345 -5 385 -17z
-m-205 -1377 c0 -6 -4 -13 -10 -16 -5 -3 -19 -36 -30 -73 -18 -56 -20 -81 -15
--152 6 -75 23 -174 41 -236 5 -20 1 -21 -113 -27 -65 -4 -131 -10 -147 -13
-l-28 -7 6 74 c3 41 9 130 12 199 l6 125 -35 68 -36 67 175 0 c102 0 174 -4
-174 -9z"/>
-<path d="M2080 4221 c-67 -10 -122 -27 -169 -54 -51 -30 -143 -98 -139 -103 3
--2 27 7 54 20 89 43 144 57 228 57 100 0 148 -9 318 -61 73 -23 166 -50 205
--61 91 -24 262 -30 286 -10 53 44 -24 93 -208 134 -38 9 -111 25 -162 37 -195
-43 -311 55 -413 41z"/>
-<path d="M4100 4219 c-49 -8 -117 -22 -355 -76 -142 -31 -225 -70 -225 -104 0
--35 29 -44 132 -42 104 3 154 14 376 83 170 52 218 61 318 61 83 0 139 -14
-227 -56 26 -13 47 -20 47 -17 -1 9 -84 72 -133 100 -21 12 -63 29 -93 38 -62
-18 -216 25 -294 13z"/>
-<path d="M2079 3923 c-138 -26 -179 -85 -140 -198 36 -102 130 -178 263 -214
-73 -20 318 -3 403 28 25 9 21 10 -30 5 -108 -11 -115 -9 -83 16 55 42 86 167
-57 222 -10 19 -9 20 16 14 57 -14 139 -76 186 -139 24 -34 28 -36 34 -18 14
-46 -43 128 -131 186 -151 101 -370 138 -575 98z m164 -69 c3 -4 -2 -17 -12
--30 -32 -40 -45 -117 -31 -171 12 -41 70 -113 92 -113 4 0 8 -4 8 -9 0 -14
--121 18 -171 46 -65 35 -115 86 -135 140 -20 52 -14 68 35 96 42 25 200 55
-214 41z m279 -59 c8 -18 8 -29 1 -36 -13 -13 -36 -2 -28 12 4 5 1 9 -5 9 -6 0
--8 5 -4 12 4 6 3 8 -3 5 -6 -4 -16 0 -23 8 -11 13 -8 15 19 15 24 0 34 -6 43
--25z m-233 -204 c7 -5 11 -14 7 -19 -9 -15 -36 -4 -36 14 0 16 9 18 29 5z"/>
-<path d="M4020 3933 c-63 -11 -176 -46 -223 -69 -103 -52 -197 -153 -197 -211
-0 -27 26 -31 34 -5 11 34 84 97 151 131 37 18 69 31 71 28 3 -2 0 -16 -6 -31
--16 -42 -12 -100 9 -149 21 -48 64 -86 54 -47 -4 14 0 20 10 20 24 0 29 -16
-15 -42 -7 -13 -14 -25 -15 -26 -3 -7 -158 21 -167 29 -12 11 -46 12 -46 1 0
--18 169 -50 314 -59 107 -6 182 6 251 40 139 69 227 227 172 310 -23 36 -65
-56 -154 73 -69 13 -215 17 -273 7z m240 -89 c54 -8 121 -36 139 -58 21 -25 0
--83 -49 -139 -47 -53 -147 -107 -198 -107 l-35 0 35 36 c21 20 41 54 48 78 17
-62 -2 134 -25 96 -9 -14 -21 -12 -39 6 -9 8 -20 13 -25 10 -5 -3 -12 10 -15
-29 -4 19 -14 39 -24 45 -13 8 -6 10 30 8 26 -1 51 2 55 5 4 4 19 6 33 3 14 -3
-45 -8 70 -12z"/>
-<path d="M2640 3560 c0 -5 9 -10 21 -10 11 0 17 5 14 10 -3 6 -13 10 -21 10
--8 0 -14 -4 -14 -10z"/>
+<path d="M2445 5384 c-117 -28 -184 -56 -287 -122 -144 -93 -268 -261 -281
+-380 -4 -39 -26 -71 -50 -72 -4 0 -34 -27 -67 -60 -198 -201 -262 -716 -130
+-1061 11 -30 20 -54 20 -55 0 0 -21 -11 -47 -23 -56 -26 -109 -100 -119 -166
+-3 -23 -4 -122 -2 -221 3 -195 7 -208 66 -271 17 -17 48 -39 69 -48 58 -25 68
+-31 68 -41 3 -38 21 -122 42 -189 90 -286 268 -507 525 -652 l68 -38 0 -182 0
+-183 -69 0 c-44 0 -71 4 -73 12 -3 9 -16 9 -54 0 -27 -6 -100 -22 -162 -36
+-312 -70 -521 -184 -738 -400 -212 -213 -330 -428 -395 -719 -16 -68 -22 -142
+-26 -284 l-5 -193 2001 0 2001 0 0 154 c0 436 -144 777 -453 1072 -200 192
+-440 316 -712 369 -49 9 -94 21 -100 25 -17 14 -115 23 -115 11 0 -7 -27 -11
+-70 -11 l-70 0 0 184 c0 175 1 185 20 191 79 25 311 218 398 331 100 130 177
+318 218 532 3 13 12 25 22 28 40 12 88 41 115 69 59 61 62 74 65 281 2 119 -1
+207 -8 232 -17 64 -68 123 -125 146 -28 11 -52 21 -53 22 -2 1 6 15 17 31 24
+32 72 168 92 258 8 37 13 131 13 245 1 161 -2 196 -22 270 -30 113 -100 253
+-162 322 l-50 56 35 52 c100 149 79 382 -43 478 -82 65 -172 67 -317 8 -197
+-80 -279 -82 -550 -11 -163 43 -192 48 -310 50 -87 2 -150 -1 -190 -11z"/>
</g>
</svg>
diff --git a/exampleSite/static/site.webmanifest b/exampleSite/static/site.webmanifest
index b20abb7..73497a5 100644
--- a/exampleSite/static/site.webmanifest
+++ b/exampleSite/static/site.webmanifest
@@ -1,6 +1,6 @@
{
- "name": "",
- "short_name": "",
+ "name": "LoveIt",
+ "short_name": "LoveIt",
"icons": [
{
"src": "/android-chrome-192x192.png",
diff --git a/exampleSite/themes b/exampleSite/themes
new file mode 120000
index 0000000..c25bddb
--- /dev/null
+++ b/exampleSite/themes
@@ -0,0 +1 @@
+../.. \ No newline at end of file
diff --git a/exampleSite/zh/config.toml b/exampleSite/zh/config.toml
new file mode 100644
index 0000000..bc17b9e
--- /dev/null
+++ b/exampleSite/zh/config.toml
@@ -0,0 +1,243 @@
+baseURL = "/"
+languageCode = "zh" # 网站语言标识
+defaultContentLanguage = "zh" # [en, zh, ...] 设定主题的国际化
+title = "LoveIt 主题" # 网站标题
+theme = "LoveIt" # 主题
+enableGitInfo = false # 是否使用 git 信息来生成文章的上次修改时间
+hasCJKLanguage = true # 是否包括中日韩文字
+paginate = 8 # post 模式下,主页每页显示的文章数目
+enableEmoji = true # 是否使用 emoji 代码
+enableRobotsTXT = true # 是否使用 robots.txt
+googleAnalytics = "" # [UA-XXXXXXXX-X] 谷歌分析代号
+disqusShortname = "dillonzq" # Disqus 的用户名,用来在文章中启用 Disqus 评论系统
+copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
+ # 版权描述,仅仅用于 SEO
+
+ #### 代码高亮设置 (https://gohugo.io/content-management/syntax-highlighting)
+pygmentsOptions = "linenos=table"
+pygmentsCodefences = true
+pygmentsUseClasses = true
+pygmentsCodefencesGuessSyntax = true
+
+staticDir = ["../static", "themes/LoveIt/assets/others"] # 静态文件目录
+
+[author] #### 作者信息
+ name = "XXXX"
+
+[sitemap] #### Sitemap 信息
+ changefreq = "weekly"
+ filename = "sitemap.xml"
+ priority = 0.5
+
+[Permalinks] #### Permalinks 信息 (https://gohugo.io/content-management/urls/#permalinks)
+ posts = "/:year/:month/:filename/"
+
+[menu] #### 菜单信息
+ [[menu.main]]
+ identifier = "posts"
+ name = "文章"
+ url = "/posts/"
+ weight = 1
+
+ [[menu.main]]
+ identifier = "tags"
+ name = "标签"
+ url = "/tags/"
+ weight = 2
+
+ [[menu.main]]
+ identifier = "categories"
+ name = "目录"
+ url = "/categories/"
+ weight = 3
+
+ [[menu.main]]
+ identifier = "about"
+ name = "关于"
+ url = "/about/"
+ weight = 4
+
+ [[menu.main]]
+ identifier = "en"
+ name = '<i class="fas fa-language"></i>'
+ url = "https://hugo-loveit-en.netlify.com"
+ weight = 5
+
+[params]
+ version = "5.x" # LoveIt 主题版本
+ description = "LoveIt 主题演示" # 网站介绍
+ keywords = ["XXXX", "Theme", "Hugo"] # 网站关键词
+
+ #### 主页配置
+ home_mode = "post" # [post, other] 主页模式
+ avatar = "/images/avatar.png" # 主页显示的头像路径
+ subtitle = "一个简洁、优雅且高效的 Hugo 主题" # 主页显示的网站副标题
+
+ socialShare = true # 在文章页面是否使用分享功能
+
+ #### 页面底部版权信息设置
+ since = 2018 # 网站创立年份
+ icp = '' # ICP 备案信息,仅在中国使用 (允许使用 HTML 格式)
+ license= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
+ # 许可协议信息 (允许使用 HTML 格式)
+ gitRepo = "" # 用于生成文章上次修改时间的公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
+
+ linkToMarkdown = true # 是否在文章页面显示原始 Markdown 文档链接
+
+ #### 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu
+ google_verification = ""
+ bing_verification = ""
+ yandex_verification = ""
+ pinterest_verification = ""
+ baidu_verification = ""
+
+ [params.cdn] #### CSS 和 JS 文件的 CDN 设置
+ fontawesome_free_css = '' # 例如 '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
+ animate_css = ''
+ gitalk_css = ''
+ gitalk_js = ''
+ valine_js = ''
+ jquery_js = ''
+ lazysizes_js = ''
+ smooth_scroll_js = ''
+ katex_css = ''
+ katex_js = ''
+ katex_auto_render_js = ''
+ mermaid_js = ''
+ typeit_js = ''
+ jquery_countdown_js = ''
+ aplayer_css = ''
+ aplayer_js = ''
+ meting_js = ''
+
+ [params.gravatar] # Gravatar 信息,用于优先在主页显示的头像
+ email = ""
+
+ [params.social] # 主页的社交信息设置
+ GitHub = "xxxx"
+ Linkedin = "xxxx"
+ Twitter = "xxxx"
+ #Instagram = "xxxx"
+ #Email = "xxxx"
+ Facebook = "xxxx"
+ Telegram = "xxxx"
+ #Medium = "xxxx"
+ #Gitlab = "xxxx"
+ #Youtubelegacy = "xxxx"
+ #Youtubecustom = "xxxx"
+ #Youtubechannel = "xxxx"
+ #Tumblr ="xxxx"
+ #Quora = "xxxx"
+ #Keybase = "xxxx"
+ #Pinterest = "xxxx"
+ #Reddit = "xxxx"
+ #Codepen = "xxxx"
+ #Bitbucket = "xxxx"
+ #Stackoverflow = "xxxx"
+ #Weibo = "xxxx"
+ #Odnoklassniki = "xxxx"
+ #VKontakte = "xxxx"
+ #Flickr = "xxxx"
+ #Xing = "xxxx"
+ #Snapchat = "xxxx"
+ #Soundcloud = "xxxx"
+ #Spotify = "xxxx"
+ #Bandcamp = "xxxx"
+ #Paypal = "xxxx"
+ #Fivehundredpx = "xxxx"
+ #Mix = "xxxx"
+ #Goodreads = "xxxx"
+ #Lastfm = "xxxx"
+ #Foursquare = "xxxx"
+ #Hackernews = "xxxx"
+ #Kickstarter = "xxxx"
+ #Patreon = "xxxx"
+ #Steam = "xxxx"
+ #Twitch = "xxxx"
+ #Strava = "xxxx"
+ #Skype = "xxxx"
+ #Whatsapp = "xxxx"
+ #Zhihu = "xxxx"
+ #Douban = "xxxx"
+ #Angellist = "xxxx"
+ #Slidershare = "xxxx"
+ #Jsfiddle = "xxxx"
+ #Deviantart = "xxxx"
+ #Behance = "xxxx"
+ #Dribble = "xxxx"
+ #Wordpress = "xxxx"
+ #Vine = "xxxx"
+ #Googlescholar = "xxxx"
+ #Researchgate = "xxxx"
+ #Mastodon = "xxxx"
+ #Thingiverse = "xxxx"
+
+ [params.share] # 文章页面的分享信息设置
+ enable = true
+ Twitter = true
+ Facebook = true
+ Reddit = true
+ #Linkedin = true
+ #Pinterest = true
+ #HackerNews = true
+ #Mix = true
+ #Tumblr = true
+ #VKontakte = true
+ #Weibo = true
+
+ [params.publisher] # 出版者信息,仅用于 SEO
+ name = "XXXX"
+ [params.publisher.logo]
+ url = "/logo.png"
+ width = 127
+ height = 40
+
+ [params.logo] # 网站图标信息,仅用于 SEO
+ url = "/logo.png"
+ width = 127
+ height = 40
+
+ [params.image] # 网站图片信息,仅用于 SEO
+ url = "/cover.png"
+ width = 800
+ height = 600
+
+ [params.gitalk] # Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
+ owner = ""
+ repo = ""
+ clientId = ""
+ clientSecret = ""
+
+ [params.valine] # Valine 评论系统设置 (https://github.com/xCss/Valine)
+ enable = false
+ appId = ""
+ appKey = ""
+ notify = false
+ verify = true
+ avatar = "mp"
+ placeholder = "Your comment ..."
+ visitor = true
+ recordIP = true
+
+[privacy] #### 隐私信息设置 (https://gohugo.io/about/hugo-and-gdpr/)
+ [privacy.googleAnalytics]
+ anonymizeIP = true
+
+ [privacy.youtube]
+ privacyEnhanced = true
+
+[mediaTypes] #### 用于输出 Markdown 格式文档的设置
+ [mediaTypes."text/plain"]
+ suffixes = ["md"]
+
+[outputFormats.MarkDown] #### 用于输出 Markdown 格式文档的设置
+ mediaType = "text/plain"
+ isPlainText = true
+ isHTML = false
+
+[outputs] #### 用于输出 Markdown 格式文档的设置
+ home = ["HTML", "RSS"]
+ page = ["HTML", "MarkDown"]
+ section = ["HTML", "RSS"]
+ taxonomy = ["HTML", "RSS"]
+ taxonomyTerm = ["HTML"]
diff --git a/exampleSite/zh/content/about.md b/exampleSite/zh/content/about.md
new file mode 100644
index 0000000..526c8c7
--- /dev/null
+++ b/exampleSite/zh/content/about.md
@@ -0,0 +1,64 @@
+---
+title: "关于 LoveIt"
+date: 2019-08-02T11:04:49+08:00
+draft: false
+---
+
+[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
+
+它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt/) 和 [KeepIt 主题](https://github.com/liuzc/LeaveIt/)。
+
+![Hugo 主题 LoveIt](/images/Apple-Devices-Preview.png)
+
+### 特性
+
+* :(fas fa-rocket): 性能优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, 99/100 的移动设备得分和 100/100 的桌面设备得分
+* :(fas fa-desktop): / :(fas fa-mobile): 布局的支持
+* :(fas fa-moon): / :(fas fa-sun): 模式
+* :(fab fa-searchengin): 使用基于 JSON-LD 格式 的 SEO SCHEMA 文件进行 SEO 优化
+* :(fas fa-layer-group): 页面和列表保持一致的视觉样式
+* :(fas fa-language): 支持多语言和国际化
+* :(fas fa-ellipsis-h): 支持分页
+* :(fab fa-google): 支持 [Google Analytics](https://analytics.google.com/analytics)
+* :(far fa-comment): 支持 [Disqus](https://disqus.com) 评论系统
+* :(far fa-comment-dots): 支持 [Gitalk](https://github.com/gitalk/gitalk) 评论系统
+* :(far fa-comment-alt): 支持 [Valine](https://valine.js.org/) 评论系统
+* :(far fa-user): 支持 [Gravatar](https://gravatar.com) 头像
+* :(fas fa-user-circle): 支持本地头像
+* :(far fa-id-card): 支持多达 54 种社交链接
+* :(fas fa-share-square): 支持文章分享
+* :(fas fa-search): 支持搜索引擎的网站验证 (Google, Bind, Yandex and Baidu)
+* :(far fa-images): 基于 [lazysizes](https://github.com/aFarkas/lazysizes) 自动转换图片为懒加载
+* :(fas fa-code): 基于 Hugo 使用的 chroma 进行代码高亮
+* :(fab fa-font-awesome): 使用 [Font Awesome](https://fontawesome.com/) 图标的扩展 Markdown 语法
+* :(fas fa-square-root-alt): 支持基于 [Katex](https://katex.org/) 的数学公式
+* :(fas fa-project-diagram): 支持基于 [mermaid](https://github.com/knsv/mermaid) 的图表和流程图生成功能
+* :(fas fa-music): 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的内嵌音乐播放器
+* :(fas fa-tv): 支持内嵌 Bilibili 视频
+* :(far fa-bell): 支持多种提醒样式的 shortcode
+* :(fas fa-align-left): 支持自定义对齐和浮动方式的 shortcode
+* :(fas fa-i-cursor): 支持基于 [TypeIt](https://typeitjs.com/) 的打字动画
+* :(far fa-clock): 支持基于 [jQuery.countdown](https://github.com/hilios/jQuery.countdown) 的倒计时动画
+* :(fas fa-arrow-up): 支持基于 [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll) 的回到顶部动画
+* :(fas fa-tachometer-alt): 支持 CDN
+* ...
+
+### 许可协议
+
+LoveIt 根据 MIT 许可协议授权。 更多信息请查看 [LICENSE 文件](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)。
+
+感谢以下在主题中使用过的项目的作者:
+
+* [Font Awesome](https://fontawesome.com/)
+* [Animate.css](https://daneden.github.io/animate.css/)
+* [lazysizes](https://github.com/aFarkas/lazysizes)
+* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
+* [TypeIt](https://typeitjs.com/)
+* [jQuery](https://github.com/jquery/jquery)
+* [jQuery.countdown](https://github.com/hilios/jQuery.countdown)
+* [Katex](https://katex.org/)
+* [mermaid](https://github.com/knsv/mermaid)
+* [APlayer](https://github.com/MoePlayer/APlayer)
+* [MetingJS](https://github.com/metowolf/MetingJS)
+* [Gitalk](https://github.com/gitalk/gitalk)
+* [Valine](https://valine.js.org/)
diff --git a/exampleSite/zh/content/posts/LoveIt-Preview.md b/exampleSite/zh/content/posts/LoveIt-Preview.md
new file mode 100644
index 0000000..800a028
--- /dev/null
+++ b/exampleSite/zh/content/posts/LoveIt-Preview.md
@@ -0,0 +1,25 @@
+---
+title: "LoveIt 主题特性预览与使用文档"
+date: 2019-08-25T16:22:42+08:00
+lastmod: 2019-08-25T16:22:42+08:00
+draft: false
+description: "这是一个 LoveIt 主题特性预览与使用文档的页面。"
+show_in_homepage: true
+show_description: false
+license: ''
+
+tags: ['Hugo', '主题']
+categories: ['文档']
+
+featured_image: ''
+featured_image_preview: ''
+
+comment: true
+toc: true
+autoCollapseToc: true
+math: true
+---
+
+这是一个 [LoveIt](https://github.com/dillonzq/LoveIt) 主题特性预览与使用文档的页面。
+
+<!--more--> \ No newline at end of file
diff --git a/exampleSite/zh/themes b/exampleSite/zh/themes
new file mode 120000
index 0000000..a8a4f8c
--- /dev/null
+++ b/exampleSite/zh/themes
@@ -0,0 +1 @@
+../../.. \ No newline at end of file
diff --git a/i18n/en.toml b/i18n/en.toml
index 9d1d044..ef58201 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -8,7 +8,7 @@ other = "Posts"
# === Taxonomy ===
[all]
-other = "All "
+other = "all "
[tag]
other = "Tag"
diff --git a/images/home_post_mode.jpg b/images/home_post_mode.jpg
deleted file mode 100644
index 41afa41..0000000
--- a/images/home_post_mode.jpg
+++ /dev/null
Binary files differ
diff --git a/images/screenshot.png b/images/screenshot.png
index c23995c..01637d7 100644
--- a/images/screenshot.png
+++ b/images/screenshot.png
Binary files differ
diff --git a/images/tn.png b/images/tn.png
index a0d6691..9da2fd1 100644
--- a/images/tn.png
+++ b/images/tn.png
Binary files differ
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
index f8dde03..8ef2cf1 100644
--- a/layouts/_default/section.html
+++ b/layouts/_default/section.html
@@ -1,10 +1,10 @@
-{{ define "title" }}{{ T "all" }}{{ T .Section | default (humanize .Section) }} | {{ .Site.Title }}{{ end -}}
+{{ define "title" }}{{ T "all" | humanize}}{{ T .Section | default .Section | humanize }} | {{ .Site.Title }}{{ end -}}
{{ define "content" -}}
{{ $data := .Data -}}
<div class="post-warp archive">
<h2 class="post-title animated pulse faster">
- {{ printf "%s%s" (T "all") (T .Section | default (humanize .Section)) }}
+ {{ T "all" | humanize}}{{ T .Section | default .Section | humanize }}
</h2>
{{- range (.Paginate (.Pages.GroupByDate "2006")).PageGroups -}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index fd9e887..7987ac0 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -4,7 +4,32 @@
<div class="post-warp single">
<h1 class="post-title animated pulse faster">{{ .Title }}</h1>
<div class="post-content">
- {{ .Content }}
+ {{ $content := .Content }}
+ {{ $REin := `<img src="([^"]+)" alt="([^"]+)?" />` }}
+ {{ $REout := "<figure><img src=/images/loading.svg data-sizes=auto data-src=$1 alt=$2 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
+ {{ $content = replaceRE $REin $REout $content }}
+ {{ $REin = `<img src="([^"]+)" alt="([^"]+)?" title="([^"]+)?" />` }}
+ {{ $REout = "<figure><img src=/images/loading.svg data-src=$1 data-sizes=auto alt=$2 title=$3 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
+ {{ $content = replaceRE $REin $REout $content }}
+ {{ $REin = `:\(([\w- ]+?)\):` }}
+ {{ $REout = `<i class="inline-icon $1"></i>` }}
+ {{ $content = replaceRE $REin $REout $content }}
+ {{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
+ {{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
+ {{ $content = replaceRE $REin $REout $content }}
+ {{ $REin = `<sup>\[return\]</sup>` }}
+ {{ $REout = printf "<sup>[%s]</sup>" (T "return") }}
+ {{ $content = replaceRE $REin $REout $content }}
+ {{ $REin = `<(h[23456]) (id=".+?")>` }}
+ {{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
+ {{ $content = replaceRE $REin $REout $content }}
+ {{ $REin = `<(sup class="footnote-ref") (id="fnref:.+?")>` }}
+ {{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
+ {{ $content = replaceRE $REin $REout $content }}
+ {{ $REin = `<(li) (id="fn:.+?")>` }}
+ {{ $REout = `<$1><a class="post-dummy-target" $2></a>` }}
+ {{ $content = replaceRE $REin $REout $content }}
+ {{ $content | safeHTML }}
</div>
</div>
{{end }} \ No newline at end of file
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
index 988b9af..a5febe8 100644
--- a/layouts/_default/summary.html
+++ b/layouts/_default/summary.html
@@ -34,7 +34,7 @@
</div>
<div class="post-content">
{{ if .Params.show_description }}
- <p>{{ . }}</p>
+ <p>{{ .Params.description }}</p>
{{ else }}
{{ $summary := .Summary }}
{{ $REin := `:\(([\w- ]+?)\):` }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index cf65f50..907f972 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -6,7 +6,7 @@
<div class="navbar-menu">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
- <a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
+ <a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
{{ end }}
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180"></i></a>&nbsp;
</div>
@@ -23,7 +23,7 @@
<div class="navbar-menu" id="mobile-menu">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
- <a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
+ <a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
{{ end }}
</div>
</div>
diff --git a/layouts/partials/post/footer.html b/layouts/partials/post/footer.html
index f8023e8..72d7314 100644
--- a/layouts/partials/post/footer.html
+++ b/layouts/partials/post/footer.html
@@ -13,7 +13,7 @@
</div>
<div class="post-info-line">
<div class="post-info-md">
- {{ if .Site.Params.linkToMarkDown }}
+ {{ if .Site.Params.linkToMarkdown }}
{{ with .OutputFormats.Get "markdown" }}
<span><a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">{{ T "seeMarkDown" }}</a></span>
{{ end }}
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index abce5a3..caa11c0 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -14,6 +14,15 @@
{{ $res := resources.Get "js/lib/lazysizes/lazysizes.min.js" | resources.Minify }}
{{ $lazysizes = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
{{ end }}
+<!-- Smooth Scroll https://github.com/cferdinandi/smooth-scroll -->
+{{ $smooth_scroll := "" }}
+{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.smooth_scroll_js }}
+ {{ $smooth_scroll = .Site.Params.cdn.smooth_scroll_js }}
+{{ else }}
+ {{ $res := resources.Get "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | resources.Minify }}
+ {{ $smooth_scroll = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
+{{ end }}
+{{ $smooth_scroll = delimit (slice $smooth_scroll "<script>window.scroll = new SmoothScroll('[data-scroll]', {speed: 300, speedAsDuration: true});</script>") "" }}
<!-- KaTeX https://github.com/KaTeX/KaTeX -->
{{ $katex_css := "" }}
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.katex_css }}
@@ -102,15 +111,6 @@
{{ $res := resources.Get "js/lib/meting/Meting.min.js" | resources.Minify }}
{{ $meting = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
{{ end }}
-<!-- Smooth Scroll https://github.com/cferdinandi/smooth-scroll -->
-{{ $smooth_scroll := "" }}
-{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.smooth_scroll_js }}
- {{ $smooth_scroll = .Site.Params.cdn.smooth_scroll_js }}
-{{ else }}
- {{ $res := resources.Get "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | resources.Minify }}
- {{ $smooth_scroll = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
-{{ end }}
-{{ $smooth_scroll = delimit (slice $smooth_scroll "<script>window.scroll = new SmoothScroll('[data-scroll]', {speed: 300, speedAsDuration: true});</script>") "" }}
{{ $jquery | safeHTML }}
{{ $lazysizes | safeHTML }}
diff --git a/layouts/robots.txt b/layouts/robots.txt
index a3daaa2..37bdad6 100644
--- a/layouts/robots.txt
+++ b/layouts/robots.txt
@@ -54,8 +54,6 @@ Disallow: /
# Block pricepi
User-agent: pimonster
Disallow: /
-User-agent: Pimonster
-Disallow: /
User-agent: SurdotlyBot
Disallow: /
diff --git a/layouts/taxonomy/terms.html b/layouts/taxonomy/terms.html
index 909f75c..caaf359 100644
--- a/layouts/taxonomy/terms.html
+++ b/layouts/taxonomy/terms.html
@@ -1,4 +1,4 @@
-{{ define "title" }}{{ T "all" }}{{ T .Data.Plural | default (humanize .Data.Plural) }} | {{ .Site.Title }}{{ end }}
+{{ define "title" }}{{ T "all" | humanize}}{{ T .Data.Plural | default .Data.Plural | humanize }} | {{ .Site.Title }}{{ end }}
{{ define "content" }}
{{ $taxonomies := .Data.Plural }}
@@ -7,7 +7,7 @@
<div class="post-warp archive">
<h2 class="post-title animated pulse faster">
- {{- printf "%s%s" (T "all") (T $taxonomies | default (humanize $taxonomies)) -}}
+ {{ T "all" | humanize}}{{ T $taxonomies | default $taxonomies | humanize }}
</h2>
<!-- Categories Page -->
diff --git a/theme.toml b/theme.toml
index 8ecc3d2..1ab21ae 100644
--- a/theme.toml
+++ b/theme.toml
@@ -4,14 +4,12 @@
name = "LoveIt"
license = "MIT"
licenselink = "https://github.com/dillonzq/LoveIt/blob/master/LICENSE"
-description = "A minimal and responsive theme for Hugo."
-homepage = "https://dillonzq.com/"
+description = "A Clean, Elegant but Advanced Hugo Theme for Hugo."
+homepage = "https://hugo-loveit-en.netlify.com"
tags = [
"blog",
- "minimal",
"clean",
"responsive",
- "gallery",
"dark",
"theme"
]