Compare commits

..

1 Commits

Author SHA1 Message Date
nodejh de08159806 feat: add cover images 4 years ago

7
.gitignore vendored

@ -1,15 +1,12 @@
# Hugo default output directory
/public
## OS Files
# Windows
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
# MacOS
# OSX
.DS_Store
# exampleSite
exampleSite/themes
exampleSite/public

@ -1,10 +1,4 @@
## 2021.03.01 Version 2.0.0
- [x] Refactor
- [x] Support hugo 0.80.0
## 2017.12.09 Version 1.0.0
## 2017.12.09 Version 1.0
- [x] Support twitter card.
- [x] Remove name in `.Site.Params`. It's duplicate with `.Site.title`.

@ -1,126 +0,0 @@
# Hugo Theme Mini
[English](https://github.com/nodejh/hugo-theme-mini/tree/master/README.md) | 简体中文
一个简约的响应式 Hugo 主题。
![./images/screenshot.png](https://raw.githubusercontent.com/nodejh/hugo-theme-mini/master/images/screenshot.png)
- [在线 Demo](https://nodejh.github.io/hugo-theme-mini)
- [示例网站源码](https://github.com/nodejh/hugo-theme-mini/tree/master/exampleSite)
特性:
- 快
- 简约
- 响应式
- 归档页
- 标签页
## 安装
### 使用 Hugo 模块安装 (推荐)
> ⚠️ 如果你使用的是 [二进制包](https://gohugo.io/getting-started/installing/#binary-cross-platform) 安装的 Hugo, 那么你需要在电脑上安装 Go 语言. 你可以使用下面的命令检查是否安装 Go:
> ```
> $ go version
> ```
> Go 语言从 v1.14 开始支持模块. [下载 Go](https://golang.org/dl/).
1. 在项目目录初始化 hugo 模块系统,如果之前已经执行过则忽略此步骤:
```bash
$ hugo mod init github.com/<your_user>/<your_project>
```
2. 在 `config.yaml` 中添加主题:
```yaml
theme:
- github.com/nodejh/hugo-theme-mini
```
### 使用 Git Submodule 安装
1. 在项目目录中执行下面的命令,将 hugo-theme-mini 作为 submodule:
```bash
$ git submodule add https://github.com/nodejh/hugo-theme-mini.git themes/mini
```
2. 在 `config.yaml` 中配置主题:
```yaml
theme: mini
```
更多信息可参考 Hugo 官方文档 [setup guide](//gohugo.io/overview/installing/).
## 开始使用
成功安装主题后,在生成网站前还需要进行少部分的配置。
### 修改配置文件
在 [`exampleSite`](https://github.com/nodejh/hugo-theme-mini/tree/master/exampleSite) 目录中有一个 [`config.yaml`](https://github.com/nodejh/hugo-theme-mini/blob/master/exampleSite/config.yaml) 的配置文件,你可以将其复制到你的项目根目录中,将一些配置项修改为你的配置。这些配置都可以随意修改。
Take a look inside the [`exampleSite`](https://github.com/nodejh/hugo-theme-mini/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.yaml`](https://github.com/nodejh/hugo-theme-mini/blob/master/exampleSite/config.yaml). To use it, copy the [`config.yaml`](https://github.com/nodejh/hugo-theme-mini/blob/master/exampleSite/config.yaml) in the root folder of your Hugo site. Feel free to change the strings in this theme.
> ⚠️ 你需要删除这行配置: `themesDir: ../../`
### 评论功能
要使用评论功能,你需要添加下面的配置:
- 设置 Disqus: `disqusShortname: your-disqus-shorname`
- 启用评论:
```yaml
params:
enableComments: true
```
### Google 分析
要使用 Google 分析功能,你需要添加下面的配置:
- 设置 Google Analytics ID: `googleAnalytics: your-google-analytics-id`
- 启用 Google Analytics:
```yaml
params:
enableGoogleAnalytics: true
```
### Logo 和 favicon
你可以替换网站中的 Log 和 favicon只需要将你的图片放在网站的 `static/images` 中,并分别命名为 `avatar.png``avicon.ico`. 下面是项目目录示例:
```
- content
- static
└── images
├── avatar.png
└── favicon.ico
```
### 运行网站
为了检查网站运行情况,你可以在本地启动 hugo server:
```bash
$ hugo server
```
现在你就可以在浏览器中打开 http://localhost:1313 查看你的网站了。
## License
[MIT](https://github.com/nodejh/hugo-theme-mini/blob/master/LICENSE.md)

@ -1,121 +1,119 @@
# Hugo Theme Mini
# Hugo Theme Cactus Plus
English | [简体中文](https://github.com/nodejh/hugo-theme-mini/tree/master/README-zh_CN.md)
[English Document](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README.md) | [中文文档](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README_zh-cn.md)
A fast, minimalist and responsive hugo theme.
Cactus Plus is a minimalistic theme for bloggers based on the theme named [Cactus](https://github.com/digitalcraftsman/hugo-cactus-theme).
![./images/screenshot.png](https://raw.githubusercontent.com/nodejh/hugo-theme-mini/master/images/screenshot.png)
**Features**
- [Online demo](https://nodejh.github.io/hugo-theme-mini)
- [Example Site Source](https://github.com/nodejh/hugo-theme-mini/tree/master/exampleSite)
+ **More beautiful style**
+ **Tags page**
+ **Archive page**
+ **[Disqus](https://disqus.com/) comment-system**
+ **Both Google Analytics and Baidu Analytics for site analytics.**
+ **Table of Content**
+ **Twitter Card**
Features:
Here's the link to online demo: [http://nodejh.com](http://nodejh.com).
- Fast
- Minimalist
- Responsive
- Archive
- Tags
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
## Installation
- [Hugo Theme Cactus Plus](#hugo-theme-cactus-plus)
- [Screenshot](#screenshot)
- [Installation](#installation)
- [Example Site](#example-site)
- [Posts Summary](#posts-summary)
- [About page](#about-page)
- [Avatar](#avatar)
- [Hide pages](#hide-pages)
- [Disqus](#disqus)
- [Social link icons](#social-link-icons)
- [Nearly finished](#nearly-finished)
- [License](#license)
<!-- /TOC -->
## Screenshot
### As a Hugo Module (recommended)
**home page**
> ⚠️ If you installed a [Hugo binary](https://gohugo.io/getting-started/installing/#binary-cross-platform), you may not have Go installed on your machine. To check if Go is installed:
> ```
> $ go version
> ```
> Go modules were considered production ready in v1.14. [Download Go](https://golang.org/dl/).
![Screenshot](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/images/screenshot.png)
1. From your project's root directory, initiate the hugo module system if you haven't already:
**tags page**
```bash
$ hugo mod init github.com/<your_user>/<your_project>
```
![Screenshot](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/images/tags.png)
**archive page**
2. Add the theme's repo to your `config.yaml`:
![Screenshot](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/images/archive.png)
```yaml
theme:
- github.com/nodejh/hugo-theme-mini
```
## Installation
### As Git Submodule
First clone the theme to your themes directory:
1. Inside the folder of your Hugo site run:
```
$ cd themes
$ git clone https://github.com/nodejh/hugo-theme-cactus-plus.git
```
```bash
$ git submodule add https://github.com/nodejh/hugo-theme-mini.git themes/mini
```
Take a look inside the [`exampleSite`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.toml`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/config.toml).
2. Add the theme's directory to your `config.yaml`:
To use it, copy the [`config.toml`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/config.toml) in the root folder of your Hugo site. Feel free to change strings as you like to customize your website.
```yaml
theme: mini
```
And you may replace your site `archetypes/default.md` with [`hugo-theme-cactus-plus/archetypes/default.md`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/archetypes/default.md)
For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo.
## Example Site
## Getting started
There is an example site with config file and markdown files in [`exampleSite`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/exampleSite) directory.
After installing the theme successfully it requires a just a few more steps to get your site running.
## Posts Summary
Summary will show follow the post title title in home page.
### The config file
And if you want to use description property that in post's fromt matter to instated of post's content summary, set `useDescriptionReplaceSummary = true`.
Take a look inside the [`exampleSite`](https://github.com/nodejh/hugo-theme-mini/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.yaml`](https://github.com/nodejh/hugo-theme-mini/blob/master/exampleSite/config.yaml). To use it, copy the [`config.yaml`](https://github.com/nodejh/hugo-theme-mini/blob/master/exampleSite/config.yaml) in the root folder of your Hugo site. Feel free to change the strings in this theme.
To use the content summary, you may add the `<!--more-->` summary divider where you want to split the article alternatively. For org content, use # more where you want to split the article. Content that comes before the summary divider will be used as that contents summary.By default, Hugo automatically takes the first 70 words of your content as its summary. See also [https://gohugo.io/content-management/summaries/](https://gohugo.io/content-management/summaries/).
> ⚠️ You may need to delete the line: `themesDir: ../../`
## About page
### Add Comments
Use the about page to introduce yourself to your visitors. You can customize the content as you like in the `/content/about/_index.md`.
To enable comments, add following to your config file:
## Avatar
- Disqus shortname: `disqusShortname: your-disqus-shortname`
- Enable Comment:
Furthermore, you should replace the [avatar placeholder](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/static/images/) with a great image of yourself.
```yaml
params:
enableComments: true
```
## Hide pages
### Google Analytics
Pages can be hidden and don't appear in the post list on the homepage if you add the variable `hidden = true` to the frontmatter. This allows you to link from elsewhere, i.e. just the menu.
To enable google analytics, add following to your config file:
## Disqus
- Google Analytics ID: `googleAnalytics: your-google-analytics-id`
- Enable Google Analytics:
This theme features a comment system powered by Disqus. Just add your Disqus-shortname to the [`config.toml`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/config.toml) and set `enableDisqus = true`, then let readers respond to your blog posts.
```yaml
params:
enableGoogleAnalytics: true
```
### Logo and favicon
## Social link icons
You can replace the log in the top of each page and favicon with your own images. To do that put your own logo and favicon into the `images` directory of your website static directory, then named them `avatar.png` and `favicon.ico`. For example:
You can add a social link panel in the footer by adding entries to the `social` block in the [`config.toml`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/config.toml). You can choose between two icon fonts:
- [Font awesome](https://fortawesome.github.io/Font-Awesome/) or
- [Mono social icons](https://github.com/drinchev/monosocialiconsfont)
Assign either `font-awesome` or `mono-social` to the `iconFont` variable. The Mono social icons offer three styles of icons: -circle, rounded, or default (empty).
```
- content
- static
└── images
├── avatar.png
└── favicon.ico
```
### Nearly finished
## Nearly finished
In order to see your site in action, run Hugo's built-in local server.
```bash
```
$ hugo server
```
Now enter http://localhost:1313 in the address bar of your browser.
Now enter [`localhost:1313`](http://localhost:1313) in the address bar of your browser.
## License
[MIT](https://github.com/nodejh/hugo-theme-mini/blob/master/LICENSE.md)
This theme is released under the MIT license. For more information read the [license](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/LICENSE.md).

@ -0,0 +1,139 @@
# Hugo Theme Cactus Plus
[English Document](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README.md) | [中文文档](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README_zh-cn.md)
Cactus Plus 是在 [Cactus](https://github.com/digitalcraftsman/hugo-cactus-theme) 更改的一个简约主题。
**特点**
+ **更漂亮的样式**
+ **添加了标签页**
+ **添加了归档页**
+ **集成了 [Disqus](https://disqus.com/) 评论系统**
+ **提供了 Google Analytics 和百度统计**
+ **文章目录**
+ **Twitter Card**
示例网站: [http://nodejh.com](http://nodejh.com)。
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
- [Hugo Theme Cactus Plus](#hugo-theme-cactus-plus)
- [截图](#截图)
- [安装](#安装)
- [示例站点](#示例站点)
- [文章摘要](#文章摘要)
- [关于页面](#关于页面)
- [头像](#头像)
- [隐藏页面](#隐藏页面)
- [Disqus 评论](#disqus-评论)
- [社交链接](#社交链接)
- [部署主题](#部署主题)
- [License](#license)
<!-- /TOC -->
## 截图
**首页**
![Screenshot](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/images/screenshot.png)
**标签页**
![Screenshot](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/images/tags.png)
**归档页**
![Screenshot](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/images/archive.png)
## 安装
首先进入 `hugo` 的站点目录运行下面的命令:
```
$ cd themes
$ git clone https://github.com/nodejh/hugo-theme-cactus-plus.git
```
本主题提供了一个示例配置文件是 [`exampleSite`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/exampleSite) 目录里的 [`config.toml`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/config.toml) 文件。
配置文件中对大部分配置都有详细的注释说明,复制该文件到站点目录下,根据自己的情况修改即可。
然后可能你还需要用 [`hugo-theme-cactus-plus/archetypes/default.md`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/archetypes/default.md) 替换你的项目中的 `archetypes/default.md`
更多安装信息查看 Hugo 官方文档 [setup guide](//gohugo.io/overview/installing/)。
## 示例站点
[`exampleSite`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/exampleSite) 是本主题的一个示例站点,里面有配置文件、关于页面的一些示例。
## 文章摘要
Summary will show follow the post title title in home page.
摘要会显示在首页的文章标题下面。
如果你想用文章头信息中的 `description` 属性代替文章内容摘要,将 `useDescriptionReplaceSummary` 设置为 `true` 即可。
如果要使用文章内容摘要,你可能需要在文章中添加 `<!--more-->` 分割线来分割文章。分割线前面的字符会作为文章摘要。默认情况下Hugo 会截取内容的前 70 个字作为摘要。查看更多 [https://gohugo.io/content-management/summaries/](https://gohugo.io/content-management/summaries/).
## 关于页面
使用关于页面首先要在你的站点目录的 `content` 目录下创建一个 `about` 目录,然后再创建一个 `_index.md` 文件,编写该文件即可。
你也可以参考本主题示例站点中的关于页:[`exampleSite/content/about/index.md`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/content/about/index.md)。
## 头像
你需要将 [images](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/static/images/) 目录下的 `avatar.png`、`avatar@2x.png` 和 `favicon.ico` 都替换为你自己的图像。
## 隐藏页面
如果你不想让一个页面出现在文章列表中,只需要在 markdown 文件的 `frontmatter` 中添加 `hidden = true` 即可。
然后你可以在其他任何地方通过链接来引用该页面,如在菜单中放置一个链接。
关于页面就是这么实现的。
## Disqus 评论
本主题提供两种评论系统Disqus 和多说。使用 Disqus 评论需要在 [`config.toml`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/config.toml) 中进行设置。
设置 `disqusShortname` 为你的 Disqus ID并将 `enableDisqus` 设置为 `true` 即可开启 Disqus 评论。
`enableDisqus` 设置为 `false` 则不启用 Disqus 评论。
## 社交链接
本主题的社交链接是字体图标的样式,并放置在了页面底部。你可以通过在 `config.toml``social` 模块中修改添加你的社交链接。社交链接提供了两种字体图标,选用其中一种即可:
- [Font awesome](https://fortawesome.github.io/Font-Awesome/) 或
- [Mono social icons](https://github.com/drinchev/monosocialiconsfont)
`iconFont` 变量即字体图标库,可以是 `font-awesome``mono-social`
如果使用的是 `Mono social icons``iconFont = "mono-social"`,则图标还有三种可选样式:`-circle`、`rounded`、或默认 `empty`
## 部署主题
配置完成之后,就可以使用下面的命令来启动 hugo 服务编译 markdown 文件生成静态站点:
```
$ hugo server
```
然后在浏览器地址栏输入 [`localhost:1313`](http://localhost:1313) 来访问站点。
## License
[MIT](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/LICENSE.md)

@ -1,27 +0,0 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
/public
/themes
.DS_Store

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2014 Steve Francia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -1,18 +0,0 @@
# Hugo Theme Mini Example Site
This repository offers an example site for [Hugo Theme mini](https://github.com/nodejh/hugo-theme-mini) and also it provides the default content for [Online Demo](http://nodejh.github.io/hugo-theme-mini).
# Using
1. [Install Hugo](https://gohugo.io/overview/installing/)
2. Clone this repository
```bash
$ git clone https://github.com/nodejh/hugo-theme-mini
$ cd exampleSite
```
3. Run Hugo server. The exampleSite use theme `hugo-theme-mini` by setting `themesDir` as `../../`
```bash
$ hugo server
```

@ -1,36 +0,0 @@
baseURL: https://nodejh.github.io/hugo-theme-mini
languageCode: en-us
title: Hugo
theme: hugo-theme-mini
paginate: 3
# for exampleSite only, you may need to delete the line: `themesDir: ../../`
themesDir: ../../
hasCJKLanguage: true
permalinks:
posts: /posts/:title/
googleAnalytics: UA-123-45
disqusShortname: nodejh
markup:
highlight:
guessSyntax: true
style: emacs
social:
github: https://github.com/nodejh
twitter: https://github.com/nodejh
stackoverflow: https://stackoverflow.com/users/4518882/nodejh
params:
author: nodejh
bio: Software Engineer
description: My Blog
enableRSS: true
enableComments: true
enableGoogleAnalytics: true

@ -0,0 +1,79 @@
# Site settings
baseurl = "your_site_url_address"
languageCode = "en"
title = "site title"
theme = "hugo-theme-cactus-plus"
googleAnalytics = "your_google_analytics_id"
# Set the value to true if your site include CJK (Chinese, Japanese, and Korean languages) characters
hasCJKLanguage = false
[params]
author = "site_author"
description = "Site Description"
bio = "author biography"
twitter = "your_twitter_id"
facebook = "your_facebook_id"
enableRSS = true
enableToc = true
enableDisqus = true
disqusShortname = "your_disqus_short_name"
enableSummary = true
# Set the value to true if use description in post front matter replace content summary
useDescriptionReplaceSummary = false
enableGoogleAnalytics = true
enableBaiduAnalytics = false
# Set the value to your baidu analysis code if you want to use baidu analytics
baiduAnalytics = 'your_baidu_analysis_code'
enableTwitterCard = true
# The url for twitter card image, default is avatar.png in static/images directory
twitterCardImage = ""
# Add custom assets with their paths relative to the static folder
customCSS = []
customJS = []
# The variables below are optionally too and can be used to
# translate or customize each string of the theme.
# Navigation links
home = ""
about = ""
archive = ""
subscribe = ""
olderPosts = ""
newerPosts = ""
copyright = ""
# show latest posts in single page
showLatestPosts = false
readMore = ""
# Share
enableShare = true
tweet = ""
share = ""
# 404 page
title404 = ""
subtitle404 = ""
# Choose a font for the social icons in the footer. Either "mono-social" or "font-awesome"
iconFont = "font-awesome"
# The social icons can be styled differently if you use mono as font - circle, rounded, or empty
socialIconStyle = ""
# Add additional social link entries underneath
[social]
facebook-square = "https://www.facebook.com/nodejh"
twitter-square = "https://www.twitter.com/nodejh"
github-square = "https://www.github.com/nodejh"

@ -1,64 +0,0 @@
baseURL: https://example.com
languageCode: en-us
title: Hugo
theme: hugo-theme-mini
# for exampleSite only, you may need to delete the line: `themesDir: ../../`
themesDir: ../../
hasCJKLanguage: true
permalinks:
posts: /posts/:title/
googleAnalytics: your-google-analytics-id
disqusShortname: your-disqus-shortname
# Hugo Configure Markup
# see: https://gohugo.io/getting-started/configuration-markup#highlight
markup:
highlight:
guessSyntax: true
style: emacs
# Social links in footer, support github,twitter,stackoverflow,facebook
social:
# e.g.
github: your-github-link
twitter: your-github-link
stackoverflow: your-github-link
# facebook: your-facebook-link
# Site parameters
params:
# Site Author
author: Author
# Author biography
bio: Software Engineer
# Site Description, used in HTML meat
description: My Blog
enableRSS: true
# To enable comments, you may need to set `disqusShortname`
enableComments: true
# To enable comments, you may need to set `googleAnalytics`
enableGoogleAnalytics: true
# Optional
home: '' # Default: Home
about: '' # Default: About
archive: '' # Default: Archive
tags: '' # Default: Tags
subscribe: '' # Default: Subscribe
olderPosts: '' # Default: Older Posts
newerPosts: '' # Default: Newer Posts
copyright: '' # Default: © Copyright 2021 ❤️ author
title404: '' # Default: 404 - Page Not Found
subtitle404: '' # Default: The content you're looking for doesn't seem to exist.
readMore: '' # Default: Read More
# Extra links in navigation
links:
# e.g.
# - name: Project
# path: /project

@ -1,25 +1,15 @@
+++
date = "2015-06-20T14:02:37+02:00"
title = "About"
description = "Hugo, the world's fastest framework for building websites"
date = "2019-02-28"
aliases = ["about-us", "about-hugo", "contact"]
author = "Hugo Authors"
hidden = true
+++
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa ullam earum dolorum! Sed, perspiciatis.
Hugo makes use of a variety of open source projects including:
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
* https://github.com/yuin/goldmark
* https://github.com/alecthomas/chroma
* https://github.com/muesli/smartcrop
* https://github.com/spf13/cobra
* https://github.com/spf13/viper
***
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
### Lorem ipsum dolor.
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
Learn more and contribute on [GitHub](https://github.com/gohugoio).
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea dicta corporis ad inventore itaque impedit dolor atque amet exercitationem! Veniam qui voluptas maiores vel laudantium necessitatibus, velit ducimus! Iste hic facere, accusamus fugiat enim facilis.

File diff suppressed because it is too large Load Diff

@ -1,46 +0,0 @@
+++
author = "Hugo Authors"
title = "Emoji Support"
date = "2019-03-05"
description = "Guide to emoji usage in Hugo"
tags = [
"emoji",
]
+++
Emoji can be enabled in a Hugo project in a number of ways.
<!--more-->
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
<br>
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
***
**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
{{< highlight html >}}
.emoji {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
}
{{< /highlight >}}
{{< css.inline >}}
<style>
.emojify {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
font-size: 2rem;
vertical-align: middle;
}
@media screen and (max-width:650px) {
.nowrap {
display: block;
margin: 25px 0;
}
}
</style>
{{< /css.inline >}}

@ -0,0 +1,350 @@
+++
title = "(Hu)go Template Primer"
description = "Hugo uses the excellent go library for its template engine. "
tags = [
"go",
"golang",
"templates",
"themes",
"development",
]
date = "2014-04-02"
categories = [
"Development",
"golang",
]
menu = "main"
+++
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.
<!--more-->
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
Go lang 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]: <http://golang.org/>
[gohtmltemplate]: <http://golang.org/pkg/html/template/>

@ -0,0 +1,91 @@
+++
title = "Getting Started with Hugo"
description = "Goto hugo releases and download the appropriate version for your os and architecture."
tags = [
"go",
"golang",
"hugo",
"development",
]
date = "2014-04-02"
categories = [
"Development",
"golang",
]
menu = "main"
+++
## Step 1. Install Hugo
Goto [hugo releases](https://github.com/spf13/hugo/releases) and download the
appropriate version for your os and architecture.
<!--more-->
Save it somewhere specific as we will be using it in the next step.
More complete instructions are available at [installing hugo](/overview/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.

@ -1,148 +0,0 @@
+++
author = "Hugo Authors"
title = "Markdown Syntax Guide"
date = "2019-03-11"
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
tags = [
"markdown",
"css",
"html",
]
categories = [
"themes",
"syntax",
]
series = ["Themes Guide"]
aliases = ["migrate-from-jekyl"]
+++
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
<!--more-->
## Headings
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
# H1
## H2
### H3
#### H4
##### H5
###### H6
## Paragraph
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
## Blockquotes
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
#### Blockquote without attribution
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use *Markdown syntax* within a blockquote.
#### Blockquote with attribution
> Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
## Tables
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Name | Age
--------|------
Bob | 27
Alice | 23
#### Inline Markdown within tables
| Italics | Bold | Code |
| -------- | -------- | ------ |
| *italics* | **bold** | `code` |
## Code Blocks
#### Code block with backticks
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
#### Code block indented with four spaces
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
#### Code block with Hugo's internal highlight shortcode
{{< highlight html >}}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
{{< /highlight >}}
## List Types
#### Ordered List
1. First item
2. Second item
3. Third item
#### Unordered List
* List item
* Another item
* And another item
#### Nested list
* Fruit
* Apple
* Orange
* Banana
* Dairy
* Milk
* Cheese
## Other Elements — abbr, sub, sup, kbd, mark
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.

@ -1,49 +0,0 @@
---
author: Hugo Authors
title: Math Typesetting
date: 2019-03-08
description: A brief guide to setup KaTeX
math: true
---
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
<!--more-->
In this example we will be using [KaTeX](https://katex.org/)
- Create a partial under `/layouts/partials/math.html`
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
- Include the partial in your templates like so:
```bash
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
```
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
- To enable KaTex on a per page basis include the parameter `math: true` in content files
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{</ math.inline >}}
### Examples
{{< math.inline >}}
<p>
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
</p>
{{</ math.inline >}}
Block math:
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$

@ -0,0 +1,164 @@
---
date: 2014-03-10
linktitle: Migrating from Jekyll
menu:
main:
parent: tutorials
prev: /tutorials/mathjax
title: Migrate to Hugo from Jekyll
description: Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output.
weight: 10
---
## Move static content to `static`
Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output.
<!--more-->
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:
```ruby
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).

@ -1,45 +0,0 @@
+++
author = "Hugo Authors"
title = "Placeholder Text"
date = "2019-03-09"
description = "Lorem Ipsum Dolor Si Amet"
tags = [
"markdown",
"text",
]
+++
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
1. Exierant elisi ambit vivere dedere
2. Duce pollice
3. Eris modo
4. Spargitque ferrea quos palude
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
1. Comas hunc haec pietate fetum procerum dixit
2. Post torum vates letum Tiresia
3. Flumen querellas
4. Arcanaque montibus omnes
5. Quidem et
# Vagus elidunt
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
## Mane refeci capiebant unda mulcebat
Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
{{< css.inline >}}
<style>
.canon { background: white; width: 100%; height: auto; }
</style>
{{< /css.inline >}}

@ -1,34 +0,0 @@
+++
author = "Hugo Authors"
title = "Rich Content"
date = "2019-03-10"
description = "A brief description of Hugo Shortcodes"
tags = [
"shortcodes",
"privacy",
]
+++
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
<!--more-->
---
## YouTube Privacy Enhanced Shortcode
{{< youtube ZJthWmvUzzc >}}
<br>
---
## Twitter Simple Shortcode
{{< twitter_simple 1085870671291310081 >}}
<br>
---
## Vimeo Simple Shortcode
{{< vimeo_simple 48912912 >}}

@ -1,3 +0,0 @@
module github.com/jordanorelli/hugo-theme-mini
go 1.15

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 2.1 MiB

@ -1,41 +1,18 @@
{{ define "main" }}
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
<div id="page-404">
<div class="text">
{{ with .Site.Params.title404 }}
<h1>{{ . }}</h1>
{{ else }}
<h1>404 - Page Not Found</h1>
{{ end }}
<section id="wrapper" class="home">
<article class="post">
<header>
<h1>{{ with .Site.Params.title404 }}{{ . }}{{ else }}404 - Page not found{{ end }}</h1>
<h3>{{ with .Site.Params.subtitle404 }}{{ . }}{{ else }}The content you're looking for doesn't seem to exist.{{ end }}</h3>
</header>
{{ with .Site.Params.subtitle404 }}
<div>{{ . }}</div>
{{ else }}
<div>The content you're looking for doesn't seem to exist.</div>
{{ end }}
</div>
</div>
{{ partial "latest-posts.html" . }}
</article>
{{ with .Site.Params.readMore }}
<h2 class="read-more">{{ . }}</h2>
{{ else }}
<h2 class="read-more">Read More</h2>
{{ end }}
{{ $pages := .Site.RegularPages }}
{{ $paginator := .Paginate ($pages) }}
{{ range $paginator.Pages }}
{{ $title := .Title }}
{{ $date := dateFormat "Jan 2, 2006" .Date }}
<section class="item">
<div>
<h1 class="title"><a href='{{ .RelPermalink }}'>{{ $title }}</a></h1>
<div class="date">{{ $date }}</div>
</div>
</section>
{{ end }}
</div>
{{ end }}
{{ partial "footer.html" . }}
</section>
</body>
</html>

@ -1 +0,0 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}" class="anchor">🔗</a></h{{ .Level }}>

@ -1,3 +0,0 @@
<p class="markdown-image">
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
</p>

@ -1,13 +0,0 @@
<a
href="{{ .Destination | safeURL }}"
{{ with .Title}}
title="{{ . }}"
{{ end }}
{{ if strings.HasPrefix .Destination "http" }}
target="_blank"
rel="noopener"
{{ end }}
>
{{ .Text | safeHTML }}
</a>

@ -3,7 +3,7 @@
<head>
<title>{{ block "title" . }}{{ with .Params.Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
{{ partialCached "head.html" . }}
{{ partialCached "site-head.html" . }}
</head>
@ -14,6 +14,6 @@
{{ block "main" . }}{{ end }}
</main>
{{ partial "footer.html" . }}
{{ block "footer" . }}{{ end }}
</body>
</html>

@ -1,38 +1,30 @@
{{ define "main" }}
{{ partial "profile.html" . }}
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
{{ partial "profile.html" . }}
<section id="archive">
{{ range .Data.Pages.GroupByDate "2006" }}
<div class="group">
<h3 class="key">
{{ .Key }}
</h3>
<section id="wrapper" class="home">
{{ range .Data.Pages.GroupByDate "2006" }}
<div class="archive">
<h3>{{ .Key }}</h3>
<ul>
{{ range .Pages }}
<div class="post-item">
<div class="post-time">{{ .Date.Format "Jan 2" }}</div>
<a href="{{ .Permalink }}" class="post-link">
{{ .Title }}
</a>
</div>
{{ end }}
</ul>
</div>
{{ end }}
{{ partial "footer.html" . }}
</section>
{{ range .Pages }}
<div class="value">
<div class="date">
{{ .Date.Format "Jan 2" }}
</div>
<div class="title">
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
<div class="dd">
</div>
{{ with .Params.tags }}
<div class="tags">
{{ range . }}
<a href="{{ "tags/" | absURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end}}
</div>
</div>
{{ end }}
</div>
{{ end }}
</section>
{{ end }}
{{ partial "js.html" . }}
</body>
</html>

@ -1,45 +1,55 @@
{{ define "main" }}
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
<section id="single">
<h1 class="title">{{ .Title }}</h1>
<section id="wrapper" class="post">
<article>
<header>
<h1>
{{ .Title }}
</h1>
<h2 class="headline">
{{ .Date.Format "Jan 2, 2006 15:04" }}
· {{ if lt 1 .WordCount }}{{ .WordCount }} words{{ else }}{{ .WordCount }} word{{ end }}
· {{ .ReadingTime }} minute read
<span class="tags">
{{ with .Params.tags }}
{{ if ge (len .) 1 }}
{{ range . }}
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
{{ end}}
</span>
</h2>
</header>
{{ if .Site.Params.enableToc }}
{{ if .TableOfContents }}
<div id="toc">
{{ .TableOfContents }}
</div>
{{ end }}
{{ end }}
<section id="post-body">
{{ .Content }}
</section>
</article>
<div class="tip">
<span>
{{ .Date.Format "Jan 2, 2006 15:04" }}
</span>
<span class="split">
·
</span>
<span>
{{ if lt 1 .WordCount }}
{{ .WordCount }} words
{{ else }}
{{ .WordCount }} word
{{ end }}
</span>
<span class="split">
·
</span>
<span>
{{ .ReadingTime }} minute read
</span>
</div>
<div class="content">
{{ .Content }}
</div>
{{ if .Site.Params.enableShare }}
{{ partial "share.html" . }}
{{ end }}
{{ with .Params.tags }}
<div class="tags">
{{ range . }}
<a href="{{ "tags/" | absURL }}{{ . | urlize }}">{{ . }}</a>
{{ if .Site.Params.enableDisqus }}
{{ partial "disqus.html" . }}
{{ end }}
</div>
{{ end}}
{{ partial "comment.html" . }}
</section>
{{ if .Site.Params.showLatestPosts }}
{{ partial "latest-posts.html" . }}
{{ end }}
{{ end }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>

@ -1,41 +0,0 @@
{{ define "main" }}
{{ partial "profile.html" . }}
<section id="archive">
{{ range .Data.Pages.GroupByDate "2006" }}
<div class="group">
<h3 class="key">
{{ .Key }}
</h3>
{{ range .Pages }}
<div class="value">
<div class="date">
{{ .Date.Format "Jan 2" }}
</div>
<div class="title">
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
{{ with .Params.tags }}
<div class="tags">
{{ range . }}
<a href="{{ "tags/" | absURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end}}
</div>
</div>
{{ end }}
</div>
{{ end }}
</section>
{{ end }}

@ -1,15 +1,28 @@
{{ define "main" }}
{{ partial "profile.html" . }}
<section id="tags">
{{ $data := .Data }}
{{ range $key, $value := .Data.Terms.ByCount }}
{{ if ($value.Name) }}
<span class="tag">
<a href="{{ "tags/" | relURL }}{{ $value.Name | urlize }}">
{{ $value.Name | upper }} <span>({{ $value.Count }})</span>
</a>
</span>
{{ end }}
{{ end }}
</section>
{{ end }}
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="tags">
<div class="page-tags">
<ul>
{{ $data := .Data }}
{{ range $key, $value := .Data.Terms.ByCount }}
{{ if ($value.Name) }}
<li>
<a href="{{ $.Site.BaseURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}">
{{ $value.Name | upper }} <span>({{ $value.Count }})</span>
</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>

@ -0,0 +1,16 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="home">
{{ partial "post-list.html" . }}
{{ partial "pagination.html" . }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>
cl

@ -2,43 +2,81 @@
{{ partial "profile.html" . }}
<div id="list-page">
{{ $pages := .Site.RegularPages }}
{{ $pages := where .Site.RegularPages "Params.hidden" "ne" "true" }}
{{ $paginator := .Paginate ($pages) }}
{{ range $paginator.Pages }}
{{ $title := .Title }}
{{ $summary := .Summary }}
{{ $date := dateFormat "Jan 2, 2006" .Date }}
<section class="item">
<!-- <section class="item">
<div>
<h1 class="title"><a href='{{ .RelPermalink }}'>{{ $title }}</a></h1>
<div class="date">{{ $date }}</div>
<div class="date">{{ .Date.Format "Jan 2" }}</div>
</div>
<div class="summary">{{ $summary | plainify | htmlUnescape }}</div>
</section>
{{ end }}
{{ with .Resources.ByType "image" }}
{{ $image := index . 1 }}
{{ range . }}
{{ if eq .Name "images/cover.png" }}
{{ $image = . }}
{{ else if eq .Name "images/cover.jpg" }}
{{ $image = . }}
{{ else if eq .Name "images/cover.jpeg" }}
{{ $image = . }}
{{ end }}
{{ end }}
{{ if or ($paginator.HasPrev) ($paginator.HasNext) }}
<div class="pagination">
{{ if $paginator.HasPrev }}
<span class="prev">
<a href="{{.Paginator.Prev.URL}}">
<span class="arrow"></span> {{ with .Site.Params.newerPosts }}{{ . }}{{ else }}Newer Posts{{ end }}
</a>
</span>
<div class="cover">
<img src="{{ $image.RelPermalink }}" alt="{{ $title }}">
</div>
{{ end }}
</section> -->
<section class="item">
{{ if $paginator.HasNext }}
<span class="next">
<a href="{{.Paginator.Next.URL}}">
{{ with .Site.Params.olderPosts }}{{ . }}{{ else }}Older Posts{{ end }} <span class="arrow"></span>
</a>
</span>
{{ if .Resources.ByType "image" }}
<!-- with cover image -->
{{ $images := .Resources.ByType "image" }}
{{ $image := index $images 1 }}
{{ range .Resources.ByType "image" }}
{{ if eq .Name "images/cover.png" }}
{{ $image = . }}
{{ else if eq .Name "images/cover.jpg" }}
{{ $image = . }}
{{ else if eq .Name "images/cover.jpeg" }}
{{ $image = . }}
{{ end }}
{{ end }}
<div class="left">
<h1 class="title"><a href='{{ .RelPermalink }}'>{{ $title }}</a></h1>
<div class="summary">{{ $summary | plainify | htmlUnescape }}</div>
</div>
<div class="right">
<img src="{{ $image.RelPermalink }}" alt="{{ $title }}">
</div>
{{ else }}
<!-- no cover image -->
<div>
<h1 class="title"><a href='{{ .RelPermalink }}'>{{ $title }}</a></h1>
<div class="date">{{ .Date.Format "Jan 2" }}</div>
</div>
<div class="summary">{{ $summary | plainify | htmlUnescape }}</div>
{{ end }}
</div>
{{ end }}
</section>
{{ end }}
</div>
{{ end }}

@ -1,6 +0,0 @@
{{ if .Site.Params.enableComments }}
<div id="comment">
<!-- https://gohugo.io/templates/internal/#use-the-disqus-template -->
{{ template "_internal/disqus.html" . }}
</div>
{{ end }}

@ -0,0 +1,13 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ .Site.Params.disqusShortname }}';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>

@ -2,17 +2,14 @@
{{ if .Site.Social }}
{{ partial "social.html" . }}
{{ end }}
<p class="copyright">
<p class="small">
{{ with .Site.Params.copyright }}
{{ . | markdownify }}
{{ else }}
© Copyright
{{ now.Format "2006"}}
<span class="split">
{{ partial "svgs/heart.svg" (dict "fill" "#bbbbbb" "width" 15 "height" 15 ) }}
</span>
{{ .Site.Params.Author }}
© Copyright {{ now.Format "2006"}} <i class="fa fa-heart" aria-hidden="true"></i> {{ .Site.Params.Author }}
{{ end }}
</p>
<p class="small">
Powered by <a href="http://www.gohugo.io/">Hugo</a> Theme By <a href="https://github.com/nodejh/hugo-theme-cactus-plus">nodejh</a>
</p>
</footer>

@ -1,27 +1,31 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{ hugo.Generator }}
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}
<!DOCTYPE html>
<html {{ with .Site.LanguageCode }}lang="{{ . }}"{{ end }}>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ if .Site.Params.enableTwitterCard }}
{{ partial "twitter-cards.html" . }}
{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ .Hugo.Generator }}
<title>{{ if .IsHome }}{{ .Title }}{{ else }}{{ .Title }} &middot; {{ .Site.Title }}{{ end }}</title>
<link rel="shortcut icon" href="{{ .Site.BaseURL }}images/favicon.ico">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/highlight.css">
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}">
<link rel="shortcut icon" href="{{ "/images/favicon.ico" | relURL }}" type="image/x-icon" />
{{ if eq .Site.Params.iconFont "font-awesome" }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/font-awesome.min.css">
{{ else }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/monosocialiconsfont.css">
{{ end }}
{{ if .Site.Params.enableGoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ if .OutputFormats.Get "RSS" }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ end }}
{{ if .Site.Params.enableRSS }}
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
{{ end }}
</head>

@ -0,0 +1,25 @@
<script src="{{ .Site.BaseURL }}js/jquery-3.3.1.min.js"></script>
<script src="{{ .Site.BaseURL }}js/main.js"></script>
<script src="{{ .Site.BaseURL }}js/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{ range .Site.Params.customJS }}
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
{{ end }}
{{ if .Site.Params.enableGoogleAnalytics }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ if .Site.Params.enableBaiduAnalytics }}
<script>
var baiduAnalytics = '{{ .Site.Params.baiduAnalytics }}';
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?" + baiduAnalytics;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
{{ end }}

@ -0,0 +1,11 @@
<ul id="post-list" class="archive readmore">
<h3>{{ .Site.Params.readMore | default "Read more" }}</h3>
{{ $kind := where .Site.RegularPages "Section" "!=" "" }}
{{ $othr := where $kind "URL" "!=" .URL }}
{{ range first 10 $othr }}
<li>
<a href="{{ .URL }}">{{ .LinkTitle }}<aside class="dates">{{ .Date.Format "Jan 2 2006" }}</aside></a>
</li>
{{ end }}
</ul>

@ -1,16 +1,20 @@
<nav class="navigation">
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if not .IsHome }}
<a href="{{ "/" | relURL }}"> <span class="arrow"></span>{{ with .Site.Params.home }}{{ . }}{{ else }}Home{{ end }}</a>
<a href='{{ .Site.BaseURL }}'> <span class="arrow"></span>{{ with .Site.Params.home }}{{ . }}{{ else }}Home{{ end }}</a>
{{ end }}
<a href="{{ "/posts" | relURL }}">{{ with .Site.Params.archive }}{{ . }}{{ else }}Archive{{ end }}</a>
<a href="{{ "/tags" | relURL }}">{{ with .Site.Params.tags }}{{ . }}{{ else }}Tags{{ end }}</a>
<a href="{{ "/about" | relURL }}">{{ with .Site.Params.about }}{{ . }}{{ else }}About{{ end }}</a>
<a href='{{ .Site.BaseURL }}posts'>{{ with .Site.Params.archive }}{{ . }}{{ else }}Archive{{ end }}</a>
<a href='{{ .Site.BaseURL }}about'>{{ with .Site.Params.about }}{{ . }}{{ else }}About{{ end }}</a>
{{ range $element := .Site.Params.Links }}
<a href="{{ $element.path }}">{{ $element.name }}</a>
{{ end }}
{{ range $val := .Site.Params.Li }}
<a href="{{ $val }}">{{ $val }}</a>
{{ end }}
{{ if .Site.Params.enableRSS }}
<a class="button" href="{{ .Site.RSSLink }}">{{ with .Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>
<a class="button" href="{{ .Site.RSSLink }}">{{ with .Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>
{{ end }}
</nav>

@ -0,0 +1,18 @@
<nav id="post-nav">
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
{{ if .Paginator.HasPrev }}
<span class="prev">
<a href="{{.Paginator.Prev.URL}}">
<span class="arrow"></span> {{ with .Site.Params.newerPosts }}{{ . }}{{ else }}Newer Posts{{ end }}
</a>
</span>
{{ end }}
{{ if .Paginator.HasNext }}
<span class="next">
<a href="{{.Paginator.Next.URL}}">
{{ with .Site.Params.olderPosts }}{{ . }}{{ else }}Older Posts{{ end }} <span class="arrow"></span>
</a>
</span>
{{ end }}
{{ end }}
</nav>

@ -0,0 +1,20 @@
<ul id="post-list">
{{ range where .Paginator.Pages "Params.hidden" "ne" "true" }}
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if ne $url "about/" }}
<li>
<aside class="dates">{{ .Date.Format "Jan 2" }}</aside>
<a href='{{ .Permalink }}'>
{{ .Title }}
{{ if .Site.Params.enableSummary }}
{{ if .Site.Params.useDescriptionReplaceSummary }}
<h2>{{ .Description | plainify }}</h2>
{{ else }}
<h2>{{ .Summary | plainify | htmlUnescape }}</h2>
{{ end }}
{{ end }}
</a>
</li>
{{ end }}
{{ end }}
</ul>

@ -1,10 +1,10 @@
<header class="profile">
{{ if .Site.Params.avatarLink }}
<a href="{{ .Site.Params.avatarLink }}">
<img class="avatar" alt="avatar" src="{{ "/images/avatar.png" | relURL }}" />
<img class="avatar" alt="avatar" src="{{ .Site.BaseURL }}images/avatar.png" />
</a>
{{ else }}
<img class="avatar" alt="avatar" src="{{ "/images/avatar.png" | relURL }}" />
<img class="avatar" alt="avatar" src="{{ .Site.BaseURL }}images/avatar.png" />
{{ end }}
<h1>{{ .Site.Title }}</h1>

@ -0,0 +1,9 @@
<a class="twitter" href="https://twitter.com/intent/tweet?text={{ .Permalink }} - {{ .LinkTitle }} {{ with .Site.Params.twitter }}by @{{ . }}{{ end }}"><span class="icon-twitter"> {{ .Site.Params.tweet | default "tweet" }}</span></a>
<a class="facebook" href="#" onclick="
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
'facebook-share-dialog',
'width=626,height=436');
return false;"><span class="icon-facebook-rect"> {{ .Site.Params.share | default "Share" }}</span>
</a>

@ -0,0 +1,31 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{ hugo.Generator }}
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}
<link rel="stylesheet" href={{ "css/style.css" | relURL }}>
<link rel="shortcut icon" href={{ "/images/favicon.ico" | relURL }} type="image/x-icon" />
{{ if .OutputFormats.Get "RSS" }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ end }}
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}

@ -1,10 +1,20 @@
<div id="social">
{{ if eq .Site.Params.iconFont "font-awesome" }}
{{ range $key, $val := .Site.Social }}
<a class="symbol" href="{{ $val }}">
<i class="fa fa-{{ $key }}"></i>
</a>
{{ end }}
{{ range $key, $val := .Site.Social }}
<a class="symbol" href="{{ $val }}" target="_blank">
{{ $svg := print "svgs/" $key ".svg" }}
{{ partial $svg (dict "fill" "#bbbbbb" "width" 28 "height" 28 ) }}
{{ else }}
{{ $iconStyle := .Site.Params.socialIconStyle }}
{{ range $key, $val := .Site.Social }}
<a class="symbol" href="{{ $val }}">
{{ $iconStyle }}{{ if eq $key "twitter" }}twitterbird{{ else }}{{ $key }}{{ end }}
</a>
{{ end }}
{{ end }}
{{ end }}
</div>

@ -1,14 +0,0 @@
<svg fill="{{ .fill }}" width="{{ .width }}" height="{{ .height }}" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 49.2 (51160) - http://www.bohemiancoding.com/sketch -->
<title>Facebook</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Social-Icons---Rounded-Black" transform="translate(-152.000000, -43.000000)">
<g id="Facebook" transform="translate(152.000000, 43.000000)">
<rect id="Rounded" fill="{{ .fill }}" x="0" y="0" width="72" height="72" rx="8"></rect>
<path d="M60.4641463,13.4173171 L60.4641463,22.7278049 L54.9382927,22.7421951 C50.6068293,22.7421951 49.7721951,24.8 49.7721951,27.807561 L49.7721951,34.4702439 L60.09,34.4702439 L58.7517073,44.8887805 L49.7721951,44.8887805 L49.7721951,72 L39.0097317,72 L39.0097317,44.8887805 L30,44.8887805 L30,34.4702439 L39.0097317,34.4702439 L39.0097317,26.7858537 C39.0097317,17.8639024 44.4478049,13 52.42,13 C56.2204634,13 59.5,13.2878049 60.4641463,13.4173171 Z" fill="#FFFFFF"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

@ -1,14 +0,0 @@
<svg fill="{{ .fill }}" width="{{ .width }}" height="{{ .height }}" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 49.2 (51160) - http://www.bohemiancoding.com/sketch -->
<title>Github</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Social-Icons---Rounded-Black" transform="translate(-264.000000, -939.000000)">
<g id="Github" transform="translate(264.000000, 939.000000)">
<path d="M8,72 L64,72 C68.418278,72 72,68.418278 72,64 L72,8 C72,3.581722 68.418278,-8.11624501e-16 64,0 L8,0 C3.581722,8.11624501e-16 -5.41083001e-16,3.581722 0,8 L0,64 C5.41083001e-16,68.418278 3.581722,72 8,72 Z" id="Rounded" fill="{{ .fill }}"></path>
<path d="M35.9985,13 C22.746,13 12,23.7870921 12,37.096644 C12,47.7406712 18.876,56.7718301 28.4145,59.9584121 C29.6145,60.1797862 30.0525,59.4358488 30.0525,58.7973276 C30.0525,58.2250681 30.0315,56.7100863 30.0195,54.6996482 C23.343,56.1558981 21.9345,51.4693938 21.9345,51.4693938 C20.844,48.6864054 19.2705,47.9454799 19.2705,47.9454799 C17.091,46.4500754 19.4355,46.4801943 19.4355,46.4801943 C21.843,46.6503662 23.1105,48.9634994 23.1105,48.9634994 C25.2525,52.6455377 28.728,51.5823398 30.096,50.9649018 C30.3135,49.4077535 30.9345,48.3460615 31.62,47.7436831 C26.2905,47.1352808 20.688,45.0691228 20.688,35.8361671 C20.688,33.2052792 21.6225,31.0547881 23.1585,29.3696344 C22.911,28.7597262 22.0875,26.3110578 23.3925,22.9934585 C23.3925,22.9934585 25.4085,22.3459017 29.9925,25.4632101 C31.908,24.9285993 33.96,24.6620468 36.0015,24.6515052 C38.04,24.6620468 40.0935,24.9285993 42.0105,25.4632101 C46.5915,22.3459017 48.603,22.9934585 48.603,22.9934585 C49.9125,26.3110578 49.089,28.7597262 48.8415,29.3696344 C50.3805,31.0547881 51.309,33.2052792 51.309,35.8361671 C51.309,45.0917119 45.6975,47.1292571 40.3515,47.7256117 C41.2125,48.4695491 41.9805,49.9393525 41.9805,52.1877301 C41.9805,55.4089489 41.9505,58.0067059 41.9505,58.7973276 C41.9505,59.4418726 42.3825,60.1918338 43.6005,59.9554002 C53.13,56.7627944 60,47.7376593 60,37.096644 C60,23.7870921 49.254,13 35.9985,13" fill="#FFFFFF"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

@ -1,3 +0,0 @@
<svg fill="{{ .fill }}" width="{{ .width }}" height="{{ .height }}" version="1.1" id="heart-15" xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 15 15">
<path d="M13.91,6.75c-1.17,2.25-4.3,5.31-6.07,6.94c-0.1903,0.1718-0.4797,0.1718-0.67,0C5.39,12.06,2.26,9,1.09,6.75&#xA;&#x9;C-1.48,1.8,5-1.5,7.5,3.45C10-1.5,16.48,1.8,13.91,6.75z"/>
</svg>

Before

Width:  |  Height:  |  Size: 369 B

@ -1,14 +0,0 @@
<svg fill="{{ .fill }}" width="{{ .width }}" height="{{ .height }}" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 49.2 (51160) - http://www.bohemiancoding.com/sketch -->
<title>stackoverflow</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Social-Icons---Rounded-Black" transform="translate(-488.000000, -1163.000000)">
<g id="stackoverflow" transform="translate(488.000000, 1163.000000)">
<path d="M8,72 L64,72 C68.418278,72 72,68.418278 72,64 L72,8 C72,3.581722 68.418278,-8.11624501e-16 64,0 L8,0 C3.581722,8.11624501e-16 -5.41083001e-16,3.581722 0,8 L0,64 C5.41083001e-16,68.418278 3.581722,72 8,72 Z" id="Rounded" fill="{{ .fill }}"></path>
<path d="M42.0860128,53.5922927 L22.9745951,53.6011499 L22.9729497,49.5538824 L42.0835447,49.5440929 L42.0860128,53.5922927 L42.0860128,53.5922927 Z M55,30.6708298 L51.7306912,12 L47.7087256,12.6920259 L50.9775643,31.3628557 L55,30.6708298 L55,30.6708298 Z M42.5455518,44.3547147 L23.5156994,42.616026 L23.1410164,46.6470941 L42.1712214,48.3841513 L42.5455518,44.3547147 L42.5455518,44.3547147 Z M43.8009984,39.0731519 L25.3459811,34.1539179 L24.285633,38.0621508 L42.7419431,42.9819676 L43.8009984,39.0731519 L43.8009984,39.0731519 Z M46.2103463,34.4436411 L29.7494464,24.8164635 L27.6748215,28.3015328 L44.1365441,37.9292931 L46.2103463,34.4436411 L46.2103463,34.4436411 Z M50.2466504,31.6088756 L46.8745036,33.8883189 L36.106599,18.2318456 L39.4792159,15.9517031 L50.2466504,31.6088756 Z M45.3315807,40.2784283 L48.5799693,40.2784283 L48.5799693,60 L17,60 L17,40.2784283 L20.2648427,40.2784283 L20.2648427,56.8243495 L45.3315807,56.8243495 L45.3315807,40.2784283 Z" fill="#FFFFFF"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

@ -1,20 +0,0 @@
<svg fill="{{ .fill }}" width="{{ .width }}" height="{{ .height }}" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="438.536px" height="438.536px" viewBox="0 0 438.536 438.536" style="enable-background:new 0 0 438.536 438.536;"
xml:space="preserve">
<g>
<path d="M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123
C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126
h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225
C438.532,59.576,430.49,40.204,414.41,24.123z M335.471,168.735c0.191,1.713,0.288,4.278,0.288,7.71
c0,15.989-2.334,32.025-6.995,48.104c-4.661,16.087-11.8,31.504-21.416,46.254c-9.606,14.749-21.074,27.791-34.396,39.115
c-13.325,11.32-29.311,20.365-47.968,27.117c-18.648,6.762-38.637,10.143-59.953,10.143c-33.116,0-63.76-8.952-91.931-26.836
c4.568,0.568,9.329,0.855,14.275,0.855c27.6,0,52.439-8.565,74.519-25.7c-12.941-0.185-24.506-4.179-34.688-11.991
c-10.185-7.803-17.273-17.699-21.271-29.691c4.947,0.76,8.658,1.137,11.132,1.137c4.187,0,9.042-0.76,14.56-2.279
c-13.894-2.669-25.598-9.562-35.115-20.697c-9.519-11.136-14.277-23.84-14.277-38.114v-0.571
c10.085,4.755,19.602,7.229,28.549,7.422c-17.321-11.613-25.981-28.265-25.981-49.963c0-10.66,2.758-20.747,8.278-30.264
c15.035,18.464,33.311,33.213,54.816,44.252c21.507,11.038,44.54,17.227,69.092,18.558c-0.95-3.616-1.427-8.186-1.427-13.704
c0-16.562,5.853-30.692,17.56-42.399c11.703-11.706,25.837-17.561,42.394-17.561c17.515,0,32.079,6.283,43.688,18.846
c13.134-2.474,25.892-7.33,38.26-14.56c-4.757,14.652-13.613,25.788-26.55,33.402c12.368-1.716,23.88-4.95,34.537-9.708
C357.458,149.793,347.462,160.166,335.471,168.735z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1,46 @@
{{ if .IsPage }}
{{ with .Params.images }}
<!-- Twitter summary card with large image must be at least 280x150px -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image:src" content="{{ index . 0 | absURL }}"/>
{{ else }}
<meta name="twitter:card" content="summary"/>
{{ if .Site.Params.twitterCardImage }}
<meta name="twitter:image" content="{{ .Site.Params.twitterCardImage | absURL }}" />
{{ else }}
<meta name="twitter:image" content="{{ .Site.BaseURL }}images/avatar.png" />
{{ end }}
{{ end }}
<!-- Twitter Card data -->
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>
{{ with .Site.Params.twitter }}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end }}
{{ range .Site.Authors }}
{{ with .twitter }}
<meta name="twitter:creator" content="@{{ . }}"/>
{{ end }}
{{ end }}
<!-- no post authors, show site author -->
{{ if eq (len .Site.Authors) 0 }}
<meta name="twitter:creator" content="@{{ .Site.Params.author }}"/>
{{ end }}
{{ else }}
<meta name="twitter:card" content="summary" />
{{ with .Site.Params.twitter }}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end }}
{{ with .Site.Params.author }}
<meta name="twitter:creator" content="@{{ . }}"/>
{{ end }}
<meta name="twitter:title" content="{{ .Site.Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>
{{ if .Site.Params.twitterCardImage }}
<meta name="twitter:image" content="{{ .Site.Params.twitterCardImage | absURL }}" />
{{ else }}
<meta name="twitter:image" content="{{ .Site.BaseURL }}images/avatar.png" />
{{ end }}
{{ end }}

@ -1,11 +1,19 @@
{{ define "main" }}
{{ partial "head.html" . }}
<body>
{{ partial "navigation.html" . }}
{{ partial "profile.html" . }}
<section id="section">
<section id="wrapper" class="home">
{{ .Content }}
{{ partial "comment.html" . }}
</section>
{{ if .Site.Params.enableDisqus }}
{{ if ne .Params.disabledisqus "true" }}
{{ partial "disqus.html" . }}
{{ end }}
{{ end }}
{{ partial "footer.html" . }}
</section>
{{ end }}
{{ partial "js.html" . }}
</body>

File diff suppressed because one or more lines are too long

@ -0,0 +1,99 @@
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
code {
background: #fff;
font-size: 11px;
/*font-weight: 100;*/
padding: 4px;
border: none;
box-shadow: inset 0 0 0 1px #E4EBF2;
border-radius: 4px;
overflow: scroll;
font-family: 'Menlo', 'Monaco', Courier, monospace;
}
pre code {
font-size: 11px;
word-wrap: break-word;
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: auto;
padding: 16px;
padding-bottom: 14px;
display: block;
color: #808080;
background: #fff;
border: none;
box-shadow: inset 0 0 0 1px #E4EBF2;
border-radius: 4px;
overflow: auto;
}
/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #8e908c;
}
/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #c82829;
}
/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #f5871f;
}
/* Tomorrow Yellow */
.hljs-attribute {
color: #eab700;
}
/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #718c00;
}
/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #4271ae;
}
/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8959a8;
}
code.hljs {
display: block;
white-space: pre;
overflow-x: auto;
word-wrap: normal;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

@ -0,0 +1,25 @@
@font-face {
font-family: 'Mono Social Icons Font';
src: url('../fonts/MonoSocialIconsFont-1.10.eot');
src: url('../fonts/MonoSocialIconsFont-1.10.eot?#iefix') format('embedded-opentype'),
url('../fonts/MonoSocialIconsFont-1.10.woff') format('woff'),
url('../fonts/MonoSocialIconsFont-1.10.ttf') format('truetype'),
url('../fonts/MonoSocialIconsFont-1.10.svg#MonoSocialIconsFont') format('svg');
src: url('../fonts/MonoSocialIconsFont-1.10.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.symbol, a.symbol:before {
font-family: 'Mono Social Icons Font';
-webkit-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility;
-ms-text-rendering: optimizeLegibility;
-o-text-rendering: optimizeLegibility;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
-ms-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
font-smoothing: antialiased;
}

@ -0,0 +1,943 @@
/* Reset */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
margin: 0;
padding: 0
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block
}
body {
line-height: 1;
font: normal 14px/1.5em "Helvetica Neue", Helvetica, Arial, sans-serif;
}
blockquote, q {
quotes: none
}
blockquote:before, blockquote:after, q:before, q:after {
content: none
}
table {
border-collapse: collapse;
border-spacing: 0
}
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* Clearfix */
.clearfix:after {
content: "";
display: table;
clear: both;
}
.hidden {
display: none;
}
/* Icons */
@font-face {
font-family: 'icons';
src: url('../fonts/icons.eot');
src: url('../fonts/icons.eot#iefix') format('embedded-opentype'), url('../fonts/icons.woff') format('woff'), url('../fonts/icons.ttf') format('truetype'), url('../fonts/icons.svg#icons') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "icons";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
text-align: center;
font-variant: normal;
text-transform: none;
line-height: 1em;
}
.icon-facebook:before {
content: '\e802';
}
.icon-facebook-squared:before {
content: '\e800';
}
.icon-twitter:before {
content: '\e801';
}
.icon-twitter-1:before {
content: '\e804';
}
.icon-facebook-circled:before {
content: '\e805';
}
.icon-twitter-circled:before {
content: '\e806';
}
.icon-facebook-rect:before {
content: '\e803';
}
/* Spacing */
.post h1, h3, h4, h5, p, #post-body ul, #post-list li, #post-body ol, pre {
margin-bottom: 20px;
}
/* Base */
html, body {
height: 100%;
}
body {
font: 16px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #666;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
h1 {
font-size: 30px;
letter-spacing: -1px;
color: #222;
font-weight: bold;
}
h2 {
font: italic 19px/1.3em Georgia, serif;
color: #bbb;
}
.profile #wrapper {
padding: 60px 40px 0px;
max-width: 600px;
margin: 0 auto;
}
.profile #header {
margin-bottom: 60px;
text-align: center;
position: relative;
}
.profile #avatar {
display: inline-block;
width: 80px;
height: 80px;
border-radius: 50%;
margin-bottom: 20px;
}
.profile h1 {
font-weight: 400;
letter-spacing: 0px;
font-size: 20px;
color: #222;
}
.profile h2 {
font-size: 20px;
font-weight: 300;
color: #aaa;
margin-top: 10px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-style: normal;
}
nav.main-nav {
padding: 20px 20px 0;
background: #fff;
background: rgba(255, 255, 255, .90);
margin: 0 auto;
text-align: right;
z-index: 100;
}
nav.main-nav a {
top: 8px;
right: 6px;
padding: 8px 12px;
color: #5badf0;
font-size: 13px;
line-height: 1.35;
border-radius: 3px;
}
nav.main-nav a.cta {
background: #5badf0;
color: #fff;
margin-left: 12px;
}
@media (max-width: 700px) {
nav.main-nav {
padding: 20px 10px 0 0;
background: #fff;
background: rgba(255, 255, 255, .90);
margin: 0 auto;
text-align: right;
z-index: 100;
}
nav.main-nav a {
top: 8px;
right: 6px;
padding: 8px 8px;
color: #5badf0;
font-size: 13px;
line-height: 1.35;
border-radius: 3px;
}
}
@media (max-width: 324px) {
nav.main-nav a.cta {
display: none;
}
}
#wrapper {
max-width: 600px;
margin: 0 auto;
padding: 60px 20px 100px 20px;
}
#wrapper.home {
max-width: 600px;
margin: 0 auto;
padding: 0px 40px 20px 40px;
}
.home #avatar {
float: right;
width: 40px;
height: 40px;
border-radius: 50%;
}
/* Typography */
/*Accent color*/
a, #title, #post-list a:hover, #title:hover {
text-decoration: none;
color: #5badf0;
color: #5694f1;
}
p a {
color: #5694f1;
}
/*Transitions*/
a, #post-nav a, #post-list a {
-webkit-transition: all 0.15s ease;
-moz-transition: all 0.15s ease;
-ms-transition: all 0.15s ease;
-o-transition: all 0.15s ease;
transition: all 0.15s ease;
}
ul {
margin: 0;
padding: 0;
}
li {
list-style-position: outside;
/* text-indent: -1.5em; */
margin-left: 1.5em;
}
ul>li {
list-style-type: disc;
}
/* Line Height */
#post-body, p {
line-height: 1.7;
}
#post-body p > a {
word-break: break-word;
white-space: pre-wrap;
}
b, strong {
font-weight: 500;
color: #1E2025;
}
em, i {
font-style: italic;
}
#title {
display: inline-block;
line-height: 100%;
font-weight: 500;
font-size: 19px;
margin: 0;
padding-bottom: 20px;
}
.description {
float: right;
font: italic 14px/1.4em Georgia, serif;
color: #aaa;
}
.home h1 {
font-size: 30px;
letter-spacing: -1px;
color: #222;
font-weight: bold;
}
.home h2 {
font: italic 19px/1.3em Georgia, serif;
color: #bbb;
}
.post header {
text-align: center;
}
.post h1 {
margin-top: 40px;
margin-bottom: 20px;
color: #222;
font: 300 32px/1.4em "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.post h2 {
margin-top: 20px;
margin-bottom: 10px;
font: 300 24px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #111;
}
.post h2.headline {
font: normal 13px/1.5em "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: -5px 0 0 0;
color: #b2b9be;
font-size: 13px;
letter-spacing: 1px;
display: inline-block;
}
.post h2.headline .tags {
font: normal 13px/1.5em "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: -5px 0 40px 0;
color: #b2b9be;
font-size: 13px;
text-transform: uppercase;
letter-spacing: 2px;
margin-top: 5px;
display: block;
}
#post-list h2 {
font: normal 17px/1.5em "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #aaa;
margin-top: 2px;
}
h3, h4, h5 {
color: #333;
}
h3 {
font-size: 20px;
font-weight: 400;
}
h4 {
font-size: 16px;
font-weight: bold;
}
h5 {
font-size: 15px;
font-weight: bold;
}
h6 {
font-size: 13px;
font-weight: bold;
color: #666;
margin-bottom: 6px;
}
p.small {
color: #bbb;
font-size: 14px;
line-height: 1.5;
display: block;
text-align: center;
margin-top: 20px;
}
blockquote {
padding-left: 15px;
border-left: 3px solid #eee;
}
hr {
display: block;
border: none;
height: 1px;
margin: 40px auto;
background: #eee;
}
table {
width: 100%;
margin: 40px 0;
border-collapse: collapse;
font-size: 13px;
line-height: 1.5em;
}
th, td {
text-align: left;
padding-right: 20px;
vertical-align: top;
}
table td, td {
border-spacing: none;
border-style: solid;
padding: 10px 15px;
border-width: 1px 0 0 0;
}
tr>td {
border-top: 1px solid #eaeaea;
}
tr:nth-child(odd)>td {
background: #fcfcfc;
}
thead th, th {
text-align: left;
padding: 10px 15px;
height: 20px;
font-size: 13px;
font-weight: bold;
color: #444;
border-bottom: 1px solid #dadadc;
cursor: default;
white-space: nowrap;
}
img {
width: 100%;
max-width: 100%;
border-radius: 3px;
}
/* Made with Cactus Badge */
#badge {
position: absolute;
bottom: 8px;
right: 8px;
height: 48px;
width: 48px;
}
/*=========================================
Post List
=========================================== */
#post-list li, #archive-list li {
list-style-type: none;
}
#post-list li:last-child {
margin-bottom: 0;
}
#post-list li+li {
padding-top: 20px;
}
#post-list .title {
display: inline-block;
}
#post-list .title h1 {
color: #333;
display: block;
font: bold 18px/1.7 "Helvetica Neue", helvetica, Arial, sans-serif;
}
#post-list a {
color: #333;
display: block;
font: bold 19px/1.7 "Helvetica Neue", helvetica, Arial, sans-serif;
}
#post-list .dates {
float: right;
position: relative;
top: 1px;
font: 300 17px/1.8 "Helvetica Neue", helvetica, Arial, sans-serif;
color: #bbb;
}
#post-list-footer {
border-top: 1px solid #eee;
margin-top: 20px;
padding-top: 100px;
}
#archive-link {
display: inline-block;
font-size: 13px;
font-weight: bold;
border-radius: 4px;
padding: 3px 10px 6px;
box-shadow: 0 0 0 1px hsla(207, 83%, 80%, 1);
}
#archive-link:hover {
background: #5694f1;
color: #fff;
box-shadow: 0 0 0 1px #5694f1;
}
#archive-link span {
position: relative;
top: 0;
font-size: 17px;
}
#footer {
margin-top: 100px;
}
/* Post Page */
#header {
}
#wrapper.post {
max-width: 670px;
}
.post {
margin: auto;
}
#post-meta {
font-size: 13px;
font-weight: bold;
line-height: 1.4;
border-top: 1px solid #eee;
padding-top: 40px;
margin-bottom: 40px;
padding-bottom: 40px;
margin-top: 40px;
color: #444;
border-bottom: 1px solid #eee;
}
#post-meta div span {
color: #aaa;
font-weight: 500;
display: block;
}
#post-meta div span.dark {
color: #1E2025;
}
#post-meta div {
margin: 0 25px 0 0;
float: left;
}
#sharing {
float: right;
margin: -2px;
}
#sharing a {
font-size: 20px;
font-size: 23px;
margin-left: 1px;
margin-top: 4px;
color: #d4d4d4;
display: inline-block;
vertical-align: middle;
}
#sharing a:hover {
opacity: 0.8;
}
/* Post Navigation */
#post-nav {
text-align: center;
padding-top: 20px;
font-size: 13px;
font-weight: 500;
margin-top: 40px;
}
#post-nav span {
-webkit-transition: all 0.1s linear;
-moz-transition: all 0.1s linear;
-ms-transition: all 0.1s linear;
-o-transition: all 0.1s linear;
transition: all 0.1s linear;
position: relative;
}
#post-nav span.prev {
float: left;
}
#post-nav span.next {
float: right;
}
#post-nav span .arrow {
position: relative;
padding: 1px;
}
#post-nav span.prev:hover .arrow {
left: -4px;
}
#post-nav span.next:hover .arrow {
right: -4px;
}
#post-nav span.prev:hover {
left: -3px;
}
#post-nav span.next:hover {
right: -3px;
}
/* Archive */
h1.archive {
margin-bottom: 0px;
}
h2.month {
width: 100%;
font: bold 13px/1 "Helvetica Neue", helvetica, Arial, sans-serif;
text-transform: uppercase;
margin-top: 40px;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
#archive-list li:last-child {
margin-bottom: 0;
}
#archive-list a {
display: block;
font: bold 17px/1.7 "Helvetica Neue", helvetica, Arial, sans-serif;
color: #333;
}
#archive-list .dates {
float: right;
position: relative;
top: 1px;
font: 300 17px/1.7 "Helvetica Neue", helvetica, Arial, sans-serif;
color: #bbb;
}
#archive-list li a:hover, #archive-list li:hover .dates {
color: #5694f1;
}
#post-meta img.avatar {
height: 36px;
width: 36px;
float: left;
border-radius: 50%;
margin-top: 3px;
margin-right: 20px;
box-shadow: 0 0 0 3px #fff, 0 0 0 4px #eee;
}
#post-list.archive.readmore {
margin-top: 70px;
}
#post-list.archive.readmore li {
margin-bottom: 0px;
}
#post-list.archive.readmore h3 {
font: 400 20px "Helvetica Neue", Helvetica, Arial, sans-serif;
margin-bottom: 30px;
}
#post-list.archive.readmore a {
font: 400 16px/1.6 "Helvetica Neue", helvetica, Arial, sans-serif;
color: #5694f1;
}
#post-list.archive.readmore a:hover {
opacity: 0.8;
}
#post-list.archive.readmore .dates {
font: 300 16px/1.6 "Helvetica Neue", helvetica, Arial, sans-serif;
}
#disqus_thread, #ds-thread {
margin-top: 100px;
}
#sharing a.facebook {
background: #4361b3;
}
#sharing a.twitter {
background: #4fafed;
}
#sharing a {
font-size: 20px;
font-size: 13px;
font-weight: bold;
color: #fff;
padding: 6px 10px;
border-radius: 4px;
margin-left: 2px;
}
/* Media Queries */
@media screen and (max-width: 540px) {
#wrapper {
padding: 20px 20px 20px 20px;
}
#header {
margin-bottom: 60px;
}
.post {
margin: 40px 0;
}
#footer {
margin-top: 60px;
}
#post-list, #archive-list {
margin-top: 0;
}
#post-meta {
margin-top: 60px;
}
#title {
font-size: 17px;
}
#post-list .dates {
display: none;
}
#post-list-footer {
margin-top: 20px;
padding-top: 40px;
}
h1 {
font-size: 26px;
}
.post h2.headline {
font-size: 13px;
}
.post h1 {
font-size: 24px;
}
.post h2 {
font-size: 20px;
}
}
.archive {
margin: 0 0 50px 0;
font-size: 16px;
}
.archive .post-item {
padding: 10px 0px;
overflow-x: hidden;
white-space:nowrap;
}
.archive .post-time {
display: inline-block;
width: 60px;
margin: 0;
color: #8a8a8a;
}
@media screen and (max-width: 768px) {
.archive .post-time {
margin: 5px 0;
width: auto;
font-size: 13px;
display: block;
}
}
.archive .post-link {
color: #8a8a8a;
}
.archive .post-item:hover {
color: #5694f1;
transition: 0.3s ease-out;
}
.archive .post-item:hover .post-link {
color: #5694f1;
}
.fa.fa-heart:hover {
color: #ff3356;
transition: 0.7s ease-out;
cursor: pointer;
}
/* CUSTOM ADDITIONS */
#social {
text-align: center;
}
a.symbol {
color: #cdd4da;
font-size: 2rem;
text-decoration: none;
margin-right: 0.3rem;
}
a.symbol:hover {
color: #BCD4DA;
}
/**
* Table of content
*/
#toc {
line-height: 1em;
font-size: .7em;
word-wrap: break-word;
padding: 8px;
padding-left: 16px;
padding-bottom: 14px;
margin: 0 0 25px 0;
display: block;
color: #808080;
background: #fff;
border: none;
box-shadow: inset 0 0 0 1px #E4EBF2;
border-radius: 4px;
overflow: hidden;
font-family: 'Menlo', 'Monaco', Courier, monospace;
}
#TableOfContents {
margin: 1em 0 0 0;
overflow-x: auto;
word-wrap: normal;
word-break: break-all;
white-space: nowrap;
}
#TableOfContents ul {
list-style-type:none;
margin: 0;
padding: 0 .5em;
}
#TableOfContents ul li {
list-style-type: none;
line-height: 1.7em;
}
#TableOfContents > ul {
padding: 0;
}
#TableOfContents > ul > li > ul {
padding: 0;
}
#TableOfContents a code{
font-family: Menlo, Monaco, Courier;
background-color: #fff;
font-size: 11px;
padding: 2px 3px;
font-weight: 100;
}
/**
* tags page
*/
#wrapper.tags {
max-width: 768px;
padding-top: 0;
}
.page-tags {
text-align: center;
}
.page-tags ul li {
margin: 10px 15px;
display: inline-block;
font-size: 1.2em;
}
.page-tags ul li a {
color: #8a8a8a;
}
.page-tags ul li a span {
font-size: .9em;
}
.page-tags ul li a:hover {
color: #5694f1;
}

@ -1,126 +1,130 @@
body {
line-height: 1;
font: normal 15px/1.5em 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: #404040;
line-height: 1.75;
letter-spacing: 0.008em;
}
a {
text-decoration: none;
color: #5badf0;
/* Reset */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
margin: 0;
padding: 0;
}
a:hover {
color: #0366d6;
body {
line-height: 1;
font: normal 14px/1.5em 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
/* markdown content styles */
blockquote {
margin-top: 5px;
margin-bottom: 5px;
padding-left: 1em;
margin-left: 0px;
border-left: 3px solid #eee;
color: #757575;
blockquote,
q {
quotes: none;
}
hr {
display: block;
border: none;
height: 2px;
margin: 40px auto;
background: #eee;
blockquote:before,
blockquote:after,
q:before,
q:after {
content: none;
}
table {
width: 100%;
margin: 40px 0;
border-collapse: collapse;
line-height: 1.5em;
}
th, td {
text-align: left;
padding-right: 20px;
vertical-align: top;
border-spacing: 0;
}
table td, td {
border-spacing: none;
border-style: solid;
padding: 10px 15px;
border-width: 1px 0 0 0;
}
thead th, th {
text-align: left;
padding: 10px 15px;
height: 20px;
font-size: 13px;
font-weight: bold;
color: #444;
cursor: default;
white-space: nowrap;
border: 1px solid #dadadc;
*,
*:before,
*:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
tr>td {
border: 1px solid #dadadc;
}
tr:nth-child(odd)>td {
background: #fcfcfc;
}
h1,
h2,
h3 {
font-weight: 400;
}
p {
margin-block-start: 1.5em;
margin-block-end: 1.5em;
}
p, pre {
text-align: justify;
}
.markdown-image img {
max-width: 100%;
}
.anchor {
font-size: 100%;
visibility: hidden;
color:silver;
}
h1:hover a,
h2:hover a,
h3:hover a,
h4:hover a {
visibility: visible
}
.highlight pre {
padding: 7px;
a {
text-decoration: none;
color: #5badf0;
}
.highlight {
max-width: 100%;
overflow-x: auto;
}
p code {
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
font-size: inherit;
background-color: rgba(0, 0, 0, 0.06);
padding: 0 2px;
border: 1px solid rgba(0, 0, 0, 0.08);
border-radius: 2px 2px;
line-height: inherit;
word-wrap: break-word;
text-indent: 0;
}
pre code {
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
a:hover {
color: #0366d6;
}
@ -179,47 +183,15 @@ nav.navigation a.button {
}
}
/* comment */
#comment {
margin-top: 64px;
}
/* footer */
#footer {
display: flex;
align-items: center;
color: #bbbbbb;
font-size: 14px;
line-break: anywhere;
margin: 100px auto;
}
#footer .copyright {
margin: 20px auto;
font-size: 15px;
}
.powerby {
margin: 20px auto;
font-size: 13px;
}
#footer .split {
cursor: pointer;
}
#footer .split:hover path {
fill: #ff3356;
transition: 0.7s ease-out;
cursor: pointer;;
}
#social a {
margin: 0 4px;
}
/* main content */
.main {
width: 100%;
max-width: 580px;
margin: 0 auto;
padding: 24px;
}
/* profile */
.profile {
@ -227,6 +199,7 @@ nav.navigation a.button {
text-align: center;
}
.profile .avatar {
display: inline-block;
width: 80px;
@ -238,40 +211,32 @@ nav.navigation a.button {
font-weight: 400;
letter-spacing: 0px;
font-size: 20px;
color: #404040;
margin-bottom: 0;
margin-top: 0;
color: #222;
margin-top: 12px;
}
.profile h2 {
font-size: 20px;
font-weight: 300;
color: #757575;
margin-top: 0;
color: #aaa;
margin-top: 10px;
}
/* index post list */
#list-page {
max-width: 580px;
margin: 0 auto;
padding: 0 24px;
}
#list-page .item {
/* index post list */
/* #list-page .item {
margin: 48px 0 0 0;
}
#list-page .title {
display: inline-block;
color: #404040;
color: #333;
font-size: 20px;
font-weight: 400;
margin: 0;
width: 80%;
}
#list-page .title a {
color: #404040;
color: #333;
display: block;
}
@ -280,16 +245,14 @@ nav.navigation a.button {
}
#list-page .date {
width: 20%;
float: right;
text-align: right;
position: relative;
top: 1px;
color: #bbb;
float: right;
position: relative;
top: 1px;
color: #bbb;
}
#list-page .summary {
color: #757575;
color: #8c8c8c;
margin-top: 12px;
}
@ -302,203 +265,20 @@ nav.navigation a.button {
#list-page .cover img {
width: 100%;
text-align: center;
}
#list-page .pagination {
margin: 48px 0;
width: 100%;
height: 32px;
margin-top: 48px;
}
#list-page .pagination .pre {
float: left;
}
#list-page .pagination .next {
float: right;
}
/* single page */
#single {
max-width: 680px;
margin: 60px auto 0 auto;
padding: 0 64px;
}
#single .title {
text-align: center;
font-size: 32px;
font-weight: 400;
line-height: 48px;
}
@media (max-width: 700px) {
#single {
padding: 0 18px;
margin: 20px auto 0 auto;
}
#single .title {
font-size: 24px;
line-height: 32px;
}
}
#single .tip {
text-align: center;
color: #8c8c8c;
margin-top: 18px;
font-size: 14px;
}
#single .tip .split {
margin: 0 4px;
}
#single .content {
margin-top: 36px;
}
#single .tags {
margin-top: 24px;
}
#single .tags a {
background: #f2f2f2;
padding: 4px 7px;
color: #757575;
font-size: 14px;
margin-right: 3px;
}
#single .tags a:hover {
color: #0366d6;
}
#archive {
max-width: 580px;
margin: 0 auto;
padding: 0 24px;
}
#archive .total {
font-size: 15px;
}
#archive .group {
margin: 24px auto;
}
#archive .group .key {
font-size: 20px;
margin-bottom: 12px;
}
#archive .group .value {
display: block;
font-size: 16px;
margin-bottom: 12px;
}
#archive .group .value .date {
display: inline-block;
color: #999;
width: 60px;
}
#archive .group .value .title {
display: inline;
}
#archive .group .value .title a {
color:#404040;
}
#archive .group .value .title a:hover {
color: #0366d6;
}
#archive .group .value .tags {
display: inline;
margin-left: 7px;
}
#archive .group .value .tags a {
background: #f2f2f2;
padding: 4px 7px;
color: #999;
font-size: 14px;
margin-right: 3px;
}
#archive .group .value .tags a:hover {
color: #0366d6;
}
/* taxonomy */
#tags {
max-width: 700px;
margin: 48px auto 0 auto;
padding: 0 12px;
text-align: center;
}
#tags .tag {
display: inline-block;
margin: 7px 7px;
}
@media (max-width: 700px) {
#tags {
margin: 0 auto 0 auto;
}
#tags .tag {
display: inline-block;
margin: 4px 5px;
}
}
} */
#tags .tag a {
background: #f2f2f2;
padding: 4px 7px;
color: #757575;
color: #404040;
font-size: 14px;
margin-right: 3px;
}
#tags .tag a:hover {
color: #0366d6;
}
/* section page */
#section {
max-width: 580px;
margin: 48px auto 0 auto;
padding: 0 12px;
}
/* 404 page */
#page-404 {
max-width: 580px;
margin: 0 auto;
padding: 0 24px;
}
#page-404 .item {
margin: 12px 0 0 0;
}
#page-404 .title {
#list-page .item {
display: inline-block;
color: #404040;
font-size: 15px;
font-weight: 400;
margin: 0;
width: 80%;
}
#page-404 .text {
text-align: center;
margin-top: 60px;
}
#page-404 .read-more {
font-weight: 300;
font-size: 20px;
margin-top: 48px;
margin-bottom: 12px;
#list-page .item .left {
float: left;
}
#page-404 .date {
width: 20%;
#list-page .item .right {
float: right;
text-align: right;
position: relative;
top: 1px;
color: #bbb;
}
width: 200px;
min-width: 200px;
max-height: 150px;
border-radius: 4px;
overflow: hidden;
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 283 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

@ -0,0 +1,18 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2013 by original authors @ fontello.com</metadata>
<defs>
<font id="icons" horiz-adv-x="1000" >
<font-face font-family="icons" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="facebook" unicode="&#xe802;" d="m285 540h144l-17-159h-127v-460h-190v460h-95v159h95v95q0 102 48 154t158 52h126v-158h-79q-22 0-35-4t-19-13t-7-19t-2-28v-79z" horiz-adv-x="428.6" />
<glyph glyph-name="facebook-squared" unicode="&#xe800;" d="m729 338l13 122h-110v61q0 27 8 38t40 11h62v122h-98q-85 0-122-40t-36-119v-73h-74v-122h74v-355h146v355h97z m128 280v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
<glyph glyph-name="twitter" unicode="&#xe801;" d="m904 622q-37-54-90-93q0-8 0-23q0-73-21-145t-64-139t-103-117t-144-82t-181-30q-151 0-276 81q19-3 43-3q126 0 224 77q-59 2-105 36t-64 89q19-2 34-2q24 0 48 6q-63 13-104 62t-41 115v2q38-21 82-23q-37 25-59 64t-22 86q0 49 25 91q68-83 164-133t208-55q-5 21-5 41q0 75 53 127t127 53q79 0 132-57q61 12 114 44q-20-64-79-100q52 6 104 28z" horiz-adv-x="928.6" />
<glyph glyph-name="twitter-1" unicode="&#xe804;" d="m920 636q-36-54-94-98l0-24q0-130-60-250t-186-203t-290-83q-160 0-290 84q14-2 46-2q132 0 234 80q-62 2-110 38t-66 94q10-4 34-4q26 0 50 6q-66 14-108 66t-42 120l0 2q36-20 84-24q-84 58-84 158q0 48 26 94q154-188 390-196q-6 18-6 42q0 78 55 133t135 55q82 0 136-58q60 12 120 44q-20-66-82-104q56 8 108 30z" horiz-adv-x="920" />
<glyph glyph-name="facebook-circled" unicode="&#xe805;" d="m800 683q138-138 138-333q0-193-138-331t-331-137q-195 0-333 137q-136 136-136 331q0 197 136 333q135 136 333 136q195 0 331-136z m-384-271q0 61 39 104t98 43l72 0l0-105l-72 0q-13 0-22-9t-10-22l0-73l104 0l0-103l-104 0l0-258q117 15 205 104q108 107 108 257q0 153-108 259t-257 106q-153 0-259-106t-106-259q0-150 106-257q89-89 206-104l0 258l-103 0l0 103l103 0l0 62z" horiz-adv-x="938" />
<glyph glyph-name="twitter-circled" unicode="&#xe806;" d="m475 408q0 35 25 60t61 25t62-26q27 6 53 20q-10-30-36-47q30 4 49 14q-16-24-44-45l0-11q0-133-111-205q-56-38-131-38q-72 0-132 39q4-1 22-1q58 0 106 36q-29 1-51 18t-29 42q5-2 15-2q15 0 22 2q-28 6-48 29t-19 56q14-7 39-10q-39 28-39 71q0 20 12 43q69-85 177-89q-3 10-3 19z m-6-527q-195 0-333 138q-136 136-136 331q0 197 136 333q135 136 333 136q195 0 331-136q138-138 138-333q0-193-138-331t-331-137z m0 834q-153 0-259-106t-106-259q0-150 106-257t259-108q150 0 257 108t108 257q0 153-108 259t-257 106z" horiz-adv-x="938" />
<glyph glyph-name="facebook-rect" unicode="&#xe803;" d="m183 850c-102 0-183-81-183-183l0-634c0-102 81-183 183-183l344 0l0 391l-104 0l0 141l104 0l0 120c0 94 61 181 201 181c57 0 100-5 100-5l-4-132s-43 1-90 1c-50 0-58-24-58-62l0-103l152 0l-6-141l-146 0l0-391l141 0c102 0 183 81 183 183l0 634c0 102-81 183-183 183l-634 0z" horiz-adv-x="1000" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,92 @@
/*!
* jquery.tagcloud.js
* A Simple Tag Cloud Plugin for JQuery
*
* https://github.com/addywaddy/jquery.tagcloud.js
* created by Adam Groves
*/
(function($) {
/*global jQuery*/
"use strict";
var compareWeights = function(a, b)
{
return a - b;
};
// Converts hex to an RGB array
var toRGB = function(code) {
if (code.length === 4) {
code = code.replace(/(\w)(\w)(\w)/gi, "\$1\$1\$2\$2\$3\$3");
}
var hex = /(\w{2})(\w{2})(\w{2})/.exec(code);
return [parseInt(hex[1], 16), parseInt(hex[2], 16), parseInt(hex[3], 16)];
};
// Converts an RGB array to hex
var toHex = function(ary) {
return "#" + jQuery.map(ary, function(i) {
var hex = i.toString(16);
hex = (hex.length === 1) ? "0" + hex : hex;
return hex;
}).join("");
};
var colorIncrement = function(color, range) {
return jQuery.map(toRGB(color.end), function(n, i) {
return (n - toRGB(color.start)[i])/range;
});
};
var tagColor = function(color, increment, weighting) {
var rgb = jQuery.map(toRGB(color.start), function(n, i) {
var ref = Math.round(n + (increment[i] * weighting));
if (ref > 255) {
ref = 255;
} else {
if (ref < 0) {
ref = 0;
}
}
return ref;
});
return toHex(rgb);
};
$.fn.tagcloud = function(options) {
var opts = $.extend({}, $.fn.tagcloud.defaults, options);
var tagWeights = this.map(function(){
return $(this).attr("rel");
});
tagWeights = jQuery.makeArray(tagWeights).sort(compareWeights);
var lowest = tagWeights[0];
var highest = tagWeights.pop();
var range = highest - lowest;
if(range === 0) {range = 1;}
// Sizes
var fontIncr, colorIncr;
if (opts.size) {
fontIncr = (opts.size.end - opts.size.start)/range;
}
// Colors
if (opts.color) {
colorIncr = colorIncrement (opts.color, range);
}
return this.each(function() {
var weighting = $(this).attr("rel") - lowest;
if (opts.size) {
$(this).css({"font-size": opts.size.start + (weighting * fontIncr) + opts.size.unit});
}
if (opts.color) {
$(this).css({"color": tagColor(opts.color, colorIncr, weighting)});
}
});
};
$.fn.tagcloud.defaults = {
size: {start: 14, end: 18, unit: "pt"}
};
})(jQuery);

@ -0,0 +1,36 @@
// To make images retina, add a class "2x" to the img element
// and add a <image-name>@2x.png image. Assumes jquery is loaded.
function isRetina() {
var mediaQuery = "(-webkit-min-device-pixel-ratio: 1.5),\
(min--moz-device-pixel-ratio: 1.5),\
(-o-min-device-pixel-ratio: 3/2),\
(min-resolution: 1.5dppx)";
if (window.devicePixelRatio > 1)
return true;
if (window.matchMedia && window.matchMedia(mediaQuery).matches)
return true;
return false;
};
function retina() {
if (!isRetina())
return;
$("img.2x").map(function(i, image) {
var path = $(image).attr("src");
path = path.replace(".png", "@2x.png");
path = path.replace(".jpg", "@2x.jpg");
$(image).attr("src", path);
});
};
$(document).ready(retina);

@ -1,12 +1,17 @@
name = "mini"
name = "Cactus Plus"
license = "MIT"
licenselink = "https://github.com/nodejh/hugo-theme-mini/blob/master/LICENSE.md"
description = "A fast, minimalist and responsive hugo theme for bloggers."
homepage = "https://github.com/nodejh/hugo-theme-mini"
tags = ["blog", "fast", "minimalist", "responsive", "simple", "beautiful", "tags", "pages"]
features = ["fast", "minimalist", "responsive", "archive", "tags"]
min_version = "0.75.0"
licenselink = "https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/LICENSE.md"
description = "A minimalistic and responsive theme for bloggers."
homepage = "https://github.com/nodejh/hugo-theme-cactus-plus"
tags = ["blog", "beautiful", "disqus", "rss", "syntax highlighting", "tags"]
features = ["blog", "beautiful", "disqus", "rss", "syntax highlighting", "tags"]
min_version = 0.20
[author]
name = "nodejh"
homepage = "https://github.com/nodejh"
name = "nodejh"
homepage = "https://github.com/nodejh"
[[original]]
name = "Cactus"
homepage = "https://themes.gohugo.io/cactus/"
repo = "https://github.com/digitalcraftsman/hugo-cactus-theme"

Loading…
Cancel
Save