`;
+
+ rootElement.parentElement.replaceChild(figure, rootElement);
+ }
+};
+
+Even.chroma = function() {
+ const blocks = document.querySelectorAll('.highlight > .chroma');
+ for (let i = 0; i < blocks.length; i++) {
+ const block = blocks[i];
+ const afterHighLight = block.querySelector('pre.chroma > code[data-lang]');
+ const lang = afterHighLight ? afterHighLight.className : '';
+ block.className += ' ' + lang;
+ }
+};
+
+Even.toc = function() {
+ const tocContainer = document.getElementById('post-toc');
+ if (tocContainer !== null) {
+ const toc = document.getElementById('TableOfContents');
+ if (toc === null) {
+ // toc = true, but there are no headings
+ tocContainer.parentNode.removeChild(tocContainer);
+ } else {
+ this._refactorToc(toc);
+ this._linkToc();
+ this._initToc();
+ }
+ }
+};
+
+Even._refactorToc = function(toc) {
+ // when headings do not start with `h1`
+ const oldTocList = toc.children[0];
+ let newTocList = oldTocList;
+ let temp;
+ while (newTocList.children.length === 1
+ && (temp = newTocList.children[0].children[0]).tagName === 'UL') {
+ newTocList = temp;
+ }
+
+ if (newTocList !== oldTocList) toc.replaceChild(newTocList, oldTocList);
+};
+
+Even._linkToc = function() {
+ const links = document.querySelectorAll('#TableOfContents a:first-child');
+ for (let i = 0; i < links.length; i++) links[i].className += ' toc-link';
+
+ for (let num = 1; num <= 6; num++) {
+ const headers = document.querySelectorAll('.post-content>h' + num);
+ for (let i = 0; i < headers.length; i++) {
+ const header = headers[i];
+ header.innerHTML = `${header.innerHTML}`;
+ }
+ }
+};
+
+Even.flowchart = function() {
+ if (!window.flowchart) return;
+
+ const blocks = document.querySelectorAll('pre code.language-flowchart, pre code.language-flow');
+ for (let i = 0; i < blocks.length; i++) {
+ if (!window.hljs && i % 2 === 0) continue;
+
+ const block = blocks[i];
+ const rootElement = window.hljs
+ ? block.parentElement
+ : block.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
+
+ const container = document.createElement('div');
+ const id = `js-flowchart-diagrams-${i}`;
+ container.id = id;
+ container.className = 'align-center';
+ rootElement.parentElement.replaceChild(container, rootElement);
+
+ const diagram = flowchart.parse(block.childNodes[0].nodeValue);
+ diagram.drawSVG(id, window.flowchartDiagramsOptions ? window.flowchartDiagramsOptions : {});
+ }
+};
+
+Even.sequence = function() {
+ if (!window.Diagram) return;
+
+ const blocks = document.querySelectorAll('pre code.language-sequence');
+ for (let i = 0; i < blocks.length; i++) {
+ if (!window.hljs && i % 2 === 0) continue;
+
+ const block = blocks[i];
+ const rootElement = window.hljs
+ ? block.parentElement
+ : block.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
+
+ const container = document.createElement('div');
+ const id = `js-sequence-diagrams-${i}`;
+ container.id = id;
+ container.className = 'align-center';
+ rootElement.parentElement.replaceChild(container, rootElement);
+
+ const diagram = Diagram.parse(block.childNodes[0].nodeValue);
+ diagram.drawSVG(id, window.sequenceDiagramsOptions
+ ? window.sequenceDiagramsOptions
+ : {theme: 'simple'});
+ }
+};
+
+Even.responsiveTable = function() {
+ const tables = document.querySelectorAll('.post-content table:not(.lntable)');
+ for (let i = 0; i < tables.length; i++) {
+ const table = tables[i];
+ const wrapper = document.createElement('div');
+ wrapper.className = 'table-wrapper';
+ table.parentElement.replaceChild(wrapper, table);
+ wrapper.appendChild(table);
+ }
+};
+
diff --git a/assets/js/main.js b/assets/js/main.js
new file mode 100644
index 0000000..96db5db
--- /dev/null
+++ b/assets/js/main.js
@@ -0,0 +1,18 @@
+$(document).ready(function () {
+ Even.backToTop();
+ Even.mobileNavbar();
+ Even.toc();
+ Even.fancybox();
+});
+
+Even.responsiveTable();
+Even.flowchart();
+Even.sequence();
+
+if (window.hljs) {
+ hljs.initHighlighting();
+ Even.highlight();
+} else {
+ Even.chroma();
+}
+
diff --git a/assets/sass/_base.scss b/assets/sass/_base.scss
new file mode 100644
index 0000000..0e1c342
--- /dev/null
+++ b/assets/sass/_base.scss
@@ -0,0 +1,98 @@
+@import '_common/normalize';
+
+html {
+ font-size: $global-font-size;
+ box-sizing: border-box;
+}
+
+body {
+ padding: 0;
+ margin: 0;
+ font-family: $global-font-family;
+ font-weight: normal;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ line-height: $global-lineheight;
+ color: $global-font-color;
+ background: $global-background;
+ scroll-behavior: smooth;
+ border-top: 3px solid $theme-color;
+}
+
+@include max-screen() {
+ body {
+ border-top: 0;
+ }
+}
+
+::selection {
+ background: $theme-color;
+ color: #fff;
+}
+
+// ::-webkit-scrollbar {
+// width: 8px;
+// height: 6px;
+// }
+
+// ::-webkit-scrollbar-thumb {
+// background: lighten($theme-color, 10%);
+// border-radius: 5px;
+// }
+
+// ::-webkit-scrollbar-track {
+// background: rgba(211, 211, 211, 0.4);
+// border-radius: 5px;
+// }
+
+img {
+ max-width: 100%;
+ height: auto;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+a {
+ color: $global-font-color;
+ text-decoration: none;
+}
+
+@each $header, $size in $global-headings {
+ #{$header} {
+ font-size: $size;
+ font-family: $global-serif-font-family;
+ }
+}
+
+.container {
+ margin: 0 auto;
+ width: $global-body-width;
+}
+
+@include max-screen() {
+ .container {
+ width: 100%;
+ box-shadow: -1px -5px 5px $gray;
+ }
+}
+
+.content-wrapper {
+ padding: $global-container-padding;
+}
+
+// make video fluid:
+// https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php
+// class video-container is the wrapper used by hexo youtube tag plugin
+.video-container {
+ position: relative;
+ padding-bottom: 56.25%; /* 16:9 */
+ padding-top: 25px;
+ height: 0;
+}
+.video-container iframe {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
\ No newline at end of file
diff --git a/assets/sass/_common/_animation.scss b/assets/sass/_common/_animation.scss
new file mode 100644
index 0000000..d596b16
--- /dev/null
+++ b/assets/sass/_common/_animation.scss
@@ -0,0 +1,156 @@
+@mixin underline-from-center() {
+ display: inline-block;
+ vertical-align: middle;
+ transform: translateZ(0);
+ backface-visibility: hidden;
+ box-shadow: 0 0 1px transparent;
+ position: relative;
+ overflow: hidden;
+
+ &:before {
+ content: '';
+ position: absolute;
+ z-index: -1;
+ height: 2px;
+ bottom: 0;
+ left: 51%;
+ right: 51%;
+ background: $theme-color;
+ transition-duration: 0.2s;
+ transition-property: right, left;
+ transition-timing-function: ease-out;
+ }
+
+ &.active,
+ &:active,
+ &:focus,
+ &:hover {
+ &:before {
+ right: 0;
+ left: 0;
+ }
+ }
+}
+
+@mixin mobile-menu-icon() {
+ @keyframes clickfirst {
+ 0% {
+ transform: translateY(6px) rotate(0deg);
+
+ }
+
+ 100% {
+ transform: translateY(0) rotate(45deg);
+ }
+ }
+
+ @keyframes clickmid {
+ 0% {
+ opacity: 1;
+ }
+
+ 100% {
+ opacity: 0;
+ }
+ }
+
+ @keyframes clicklast {
+ 0% {
+ transform: translateY(-6px) rotate(0deg);
+ }
+
+ 100% {
+ transform: translateY(0) rotate(-45deg);
+ }
+ }
+
+ @keyframes outfirst {
+ 0% {
+ transform: translateY(0) rotate(-45deg);
+ }
+
+ 100% {
+ transform: translateY(-6px) rotate(0deg);
+ }
+ }
+
+ @keyframes outmid {
+ 0% {
+ opacity: 0;
+ }
+
+ 100% {
+ opacity: 1;
+ }
+ }
+
+ @keyframes outlast {
+ 0% {
+ transform: translateY(0) rotate(45deg);
+ }
+
+ 100% {
+ transform: translateY(6px) rotate(0deg);
+ }
+ }
+
+ span {
+ position: absolute;
+ /* fallback for browsers which still doesn't support for `calc()` */
+ left: 15px;
+ top: 25px;
+ left: calc((100% - 20px) / 2);
+ top: calc((100% - 1px) / 2);
+ width: 20px;
+ height: 1px;
+ background-color: $theme-color;
+
+ &:nth-child(1) {
+ transform: translateY(6px) rotate(0deg);
+ }
+
+ &:nth-child(3) {
+ transform: translateY(-6px) rotate(0deg);
+ }
+ }
+
+ &.icon-click {
+ span:nth-child(1) {
+ animation-duration: 0.5s;
+ animation-fill-mode: both;
+ animation-name: clickfirst;
+ }
+
+ span:nth-child(2) {
+ animation-duration: 0.2s;
+ animation-fill-mode: both;
+ animation-name: clickmid;
+ }
+
+ span:nth-child(3) {
+ animation-duration: 0.5s;
+ animation-fill-mode: both;
+ animation-name: clicklast;
+ }
+ }
+
+ &.icon-out {
+ span:nth-child(1) {
+ animation-duration: 0.5s;
+ animation-fill-mode: both;
+ animation-name: outfirst;
+ }
+
+ span:nth-child(2) {
+ animation-duration: 0.2s;
+ animation-fill-mode: both;
+ animation-name: outmid;
+ }
+
+ span:nth-child(3) {
+ animation-duration: 0.5s;
+ animation-fill-mode: both;
+ animation-name: outlast;
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/sass/_common/_normalize.scss b/assets/sass/_common/_normalize.scss
new file mode 100644
index 0000000..81c6f31
--- /dev/null
+++ b/assets/sass/_common/_normalize.scss
@@ -0,0 +1,427 @@
+/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
+
+/**
+ * 1. Set default font family to sans-serif.
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
+ * user zoom.
+ */
+
+html {
+ font-family: sans-serif; /* 1 */
+ -ms-text-size-adjust: 100%; /* 2 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/**
+ * Remove default margin.
+ */
+
+body {
+ margin: 0;
+}
+
+/* HTML5 display definitions
+ ========================================================================== */
+
+/**
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11
+ * and Firefox.
+ * Correct `block` display not defined for `main` in IE 11.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+menu,
+nav,
+section,
+summary {
+ display: block;
+}
+
+/**
+ * 1. Correct `inline-block` display not defined in IE 8/9.
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
+ */
+
+audio,
+canvas,
+progress,
+video {
+ display: inline-block; /* 1 */
+ vertical-align: baseline; /* 2 */
+}
+
+/**
+ * Prevent modern browsers from displaying `audio` without controls.
+ * Remove excess height in iOS 5 devices.
+ */
+
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+
+/**
+ * Address `[hidden]` styling not present in IE 8/9/10.
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
+ */
+
+[hidden],
+template {
+ display: none;
+}
+
+/* Links
+ ========================================================================== */
+
+/**
+ * Remove the gray background color from active links in IE 10.
+ */
+
+a {
+ background-color: transparent;
+}
+
+/**
+ * Improve readability when focused and also mouse hovered in all browsers.
+ */
+
+a:active,
+a:hover {
+ outline: 0;
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
+ */
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+/**
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
+ */
+
+b,
+strong {
+ font-weight: bold;
+}
+
+/**
+ * Address styling not present in Safari and Chrome.
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/**
+ * Address variable `h1` font-size and margin within `section` and `article`
+ * contexts in Firefox 4+, Safari, and Chrome.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/**
+ * Address styling not present in IE 8/9.
+ */
+
+mark {
+ background: #ff0;
+ color: #000;
+}
+
+/**
+ * Address inconsistent and variable font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove border when inside `a` element in IE 8/9/10.
+ */
+
+img {
+ border: 0;
+}
+
+/**
+ * Correct overflow not hidden in IE 9/10/11.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * Address margin not present in IE 8/9 and Safari.
+ */
+
+figure {
+ margin: 1em 40px;
+}
+
+/**
+ * Address differences between Firefox and other browsers.
+ */
+
+hr {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0;
+}
+
+/**
+ * Contain overflow in all browsers.
+ */
+
+pre {
+ overflow: auto;
+}
+
+/**
+ * Address odd `em`-unit font size rendering in all browsers.
+ */
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
+ * styling of `select`, unless a `border` property is set.
+ */
+
+/**
+ * 1. Correct color not being inherited.
+ * Known issue: affects color of disabled elements.
+ * 2. Correct font properties not being inherited.
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ color: inherit; /* 1 */
+ font: inherit; /* 2 */
+ margin: 0; /* 3 */
+}
+
+/**
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
+ */
+
+button {
+ overflow: visible;
+}
+
+/**
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
+ * All other form control elements do not inherit `text-transform` values.
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
+ * Correct `select` style inheritance in Firefox.
+ */
+
+button,
+select {
+ text-transform: none;
+}
+
+/**
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ * and `video` controls.
+ * 2. Correct inability to style clickable `input` types in iOS.
+ * 3. Improve usability and consistency of cursor style between image-type
+ * `input` and others.
+ */
+
+button,
+html input[type="button"], /* 1 */
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button; /* 2 */
+ cursor: pointer; /* 3 */
+}
+
+/**
+ * Re-set default cursor for disabled elements.
+ */
+
+button[disabled],
+html input[disabled] {
+ cursor: default;
+}
+
+/**
+ * Remove inner padding and border in Firefox 4+.
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/**
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
+ * the UA stylesheet.
+ */
+
+input {
+ line-height: normal;
+}
+
+/**
+ * It's recommended that you don't attempt to style these elements.
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
+ *
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
+ * 2. Remove excess padding in IE 8/9/10.
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
+ * `font-size` values of the `input`, it causes the cursor style of the
+ * decrement button to change from `default` to `text`.
+ */
+
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
+ * (include `-moz` to future-proof).
+ */
+
+input[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box; /* 2 */
+ box-sizing: content-box;
+}
+
+/**
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
+ * Safari (but not Chrome) clips the cancel button when the search input has
+ * padding (and `textfield` appearance).
+ */
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * Define consistent border, margin, and padding.
+ */
+
+fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+
+/**
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
+ */
+
+legend {
+ border: 0; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Remove default vertical scrollbar in IE 8/9/10/11.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * Don't inherit the `font-weight` (applied by a rule above).
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ */
+
+optgroup {
+ font-weight: bold;
+}
+
+/* Tables
+ ========================================================================== */
+
+/**
+ * Remove most spacing between table cells.
+ */
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+td,
+th {
+ padding: 0;
+}
\ No newline at end of file
diff --git a/assets/sass/_common/_utils.scss b/assets/sass/_common/_utils.scss
new file mode 100644
index 0000000..1c7b777
--- /dev/null
+++ b/assets/sass/_common/_utils.scss
@@ -0,0 +1,23 @@
+@mixin clearfix() {
+ &:before,
+ &:after {
+ content: " ";
+ display: table;
+ }
+
+ &:after {
+ clear: both;
+ }
+}
+
+@mixin min-screen($min-width: $global-body-width) {
+ @media screen and (min-width: $min-width) {
+ @content;
+ }
+}
+
+@mixin max-screen($max-width: $global-body-width) {
+ @media screen and (max-width: $max-width) {
+ @content;
+ }
+}
diff --git a/assets/sass/_custom/_custom.scss b/assets/sass/_custom/_custom.scss
new file mode 100644
index 0000000..f7cbb5a
--- /dev/null
+++ b/assets/sass/_custom/_custom.scss
@@ -0,0 +1,4 @@
+// ==============================
+// Custom style
+// ==============================
+// You can override the variables in _variables.scss to customize the style
diff --git a/assets/sass/_iconfont.scss b/assets/sass/_iconfont.scss
new file mode 100644
index 0000000..49550a1
--- /dev/null
+++ b/assets/sass/_iconfont.scss
@@ -0,0 +1,200 @@
+// ==============================
+// Iconfont
+// ==============================
+
+@font-face {
+ font-family: 'iconfont';
+
+ src: url('../fonts/iconfont/iconfont.eot');
+ src: url('../fonts/iconfont/iconfont.eot#iefix') format('embedded-opentype'), // not '?#iefix', because webpack will add '?hash=[hash]'
+ url('../fonts/iconfont/iconfont.woff') format('woff'),
+ url('../fonts/iconfont/iconfont.ttf') format('truetype'),
+ url('../fonts/iconfont/iconfont.svg#iconfont') format('svg');
+ font-display: swap;
+}
+
+%base-iconfont {
+ font-family: "iconfont" !important;
+ speak: none;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+
+ -webkit-text-stroke-width: 0.2px;
+ cursor: pointer;
+
+ /* Enable Ligatures ================ */
+ letter-spacing: 0;
+ font-feature-settings: "liga";
+ font-variant-ligatures: discretionary-ligatures;
+
+ /* Better Font Rendering =========== */
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.iconfont {
+ @extend %base-iconfont;
+}
+
+/* Social Icon */
+.icon-bilibili:before {
+ content: "\e900";
+ font-size: .9em;
+ position: relative;
+ top: -4px;
+}
+.icon-instagram:before {
+ font-size: .95em;
+ content: "\e611";
+ position: relative;
+ top: 1px;
+}
+.icon-douban:before {
+ content: "\e610";
+ position: relative;
+ top: 2px;
+}
+.icon-tumblr:before {
+ content: "\e69f";
+ font-size: .85em;
+ position: relative;
+ top: -2px;
+}
+.icon-linkedin:before {
+ content: "\e60d";
+ position: relative;
+ top: -2px;
+}
+.icon-twitter:before {
+ content: "\e600";
+}
+.icon-weibo:before {
+ content: "\e602";
+ position: relative;
+ top: 2px;
+}
+.icon-stack-overflow:before {
+ content: "\e902";
+ font-size: .85em;
+ position: relative;
+ top: -4px;
+}
+.icon-email:before {
+ content: "\e605";
+ position: relative;
+ top: -2px;
+}
+.icon-facebook:before {
+ content: "\e601";
+ font-size: .95em;
+ position: relative;
+ top: -2px;
+}
+.icon-gitlab:before {
+ content: "\e901";
+ font-size: .9em;
+ position: relative;
+ top: -4px;
+}
+.icon-github:before {
+ content: "\e606";
+ position: relative;
+ top: -1px;
+}
+.icon-rss:before {
+ content: "\e604";
+}
+.icon-google:before {
+ content: "\e609";
+ position: relative;
+ top: 2px;
+}
+.icon-zhihu:before {
+ content: "\e607";
+ font-size: .9em;
+}
+.icon-pocket:before {
+ content: "\e856";
+ position: relative;
+ top: 2px;
+}
+
+.inline-svg:before {
+ display: inline-block;
+ height: 1.15rem;
+ width: 1.15rem;
+ top: 0.15rem;
+ position: relative;
+}
+
+/* Generic Icon */
+.icon-heart:before {
+ content: "\e608";
+}
+.icon-right:before {
+ content: "\e60a";
+}
+.icon-left:before {
+ content: "\e60b";
+}
+.icon-up:before {
+ content: "\e60c";
+}
+.icon-close:before {
+ content: "\e60f";
+}
+.icon-link:before {
+ content: "\e909";
+}
+
+/* Admonition Icon */
+/*
+.icon-chevron-down:before {
+ content: "\e908";
+}
+.icon-format-quote:before {
+ content: "\e904";
+}
+.icon-pencil:before {
+ content: "\e903";
+}
+.icon-list-numbered:before {
+ content: "\e9b9";
+}
+.icon-list:before {
+ content: "\e9bb";
+}
+.icon-warning:before {
+ content: "\ea07";
+}
+.icon-question:before {
+ content: "\ea09";
+}
+.icon-info:before {
+ content: "\ea0c";
+}
+.icon-cross:before {
+ content: "\ea0f";
+}
+.icon-checkmark:before {
+ content: "\ea10";
+}
+.icon-fire:before {
+ content: "\e905";
+}
+.icon-danger:before {
+ content: "\e905";
+}
+.icon-flame:before {
+ content: "\e905";
+}
+.icon-hot:before {
+ content: "\e905";
+}
+.icon-bulb:before {
+ content: "\e906";
+}
+*/
diff --git a/assets/sass/_partial/_404.scss b/assets/sass/_partial/_404.scss
new file mode 100644
index 0000000..63eb465
--- /dev/null
+++ b/assets/sass/_partial/_404.scss
@@ -0,0 +1,25 @@
+// ==============================
+// Archive
+// =============================
+
+.not-found {
+ text-align: center;
+
+ .error-emoji {
+ color: #363636;
+ font-size: 3rem;
+ }
+
+ .error-text {
+ color: #797979;
+ font-size: 1.25rem;
+ }
+
+ .error-link {
+ margin-top: 2rem;
+
+ a {
+ color: $theme-color;
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/sass/_partial/_archive.scss b/assets/sass/_partial/_archive.scss
new file mode 100644
index 0000000..f1431c4
--- /dev/null
+++ b/assets/sass/_partial/_archive.scss
@@ -0,0 +1,100 @@
+// ==============================
+// Archive
+// =============================
+
+.archive {
+ margin: $archive-margin;
+ max-width: $archive-max-width;
+
+ .archive-title {
+ font-family: $global-serif-font-family;
+
+ &.tag,
+ &.category {
+ margin: 15px 0;
+ }
+
+ .archive-name {
+ margin: 0;
+ display: inline-block;
+ font-weight: 400;
+ font-size: $archive-name-font-size;
+ line-height: $archive-name-font-size + 2px;
+ }
+
+ .archive-post-counter {
+ color: $dark-gray;
+ }
+ }
+
+ .collection-title {
+ font-family: $global-serif-font-family;
+
+ .archive-year {
+ margin: 15px 0;
+ font-weight: 400;
+ font-size: $collection-title-font-size;
+ line-height: $collection-title-font-size + 2px;
+ }
+ }
+
+ .archive-post {
+ padding: $archive-post-padding;
+ border-left: $archive-post-border-left;
+
+ .archive-post-time {
+ margin-right: 10px;
+ color: $dark-gray;
+ }
+
+ .archive-post-title {
+
+ .archive-post-link {
+ color: $theme-color;
+ }
+ }
+
+ &::first-child {
+ margin-top: 10px;
+ }
+
+ &:hover {
+ border-left: $archive-post-hover-border-left;
+ transition: $archive-post-hover-transition;
+ transform: $archive-post-hover-transform;
+
+ .archive-post-time {
+ color: darken($dark-gray, 10%);
+ }
+
+ .archive-post-title .archive-post-link {
+ color: darken($theme-color, 10%);
+ }
+ }
+ }
+}
+
+@include max-screen() {
+ .archive {
+ margin-left: auto;
+ margin-right: auto;
+
+ .archive-title .archive-name {
+ font-size: $archive-name-font-size - 4px;
+ }
+
+ .collection-title .archive-year {
+ margin: 10px 0;
+ font-size: $collection-title-font-size - 4px;
+ }
+
+ .archive-post {
+ padding: $archive-post-mobile-padding;
+
+ .archive-post-time {
+ font-size: $archive-post-mobile-time-font-size;
+ display: block;
+ }
+ }
+ }
+}
diff --git a/assets/sass/_partial/_back-to-top.scss b/assets/sass/_partial/_back-to-top.scss
new file mode 100644
index 0000000..ee67aa2
--- /dev/null
+++ b/assets/sass/_partial/_back-to-top.scss
@@ -0,0 +1,24 @@
+// ==============================
+// Back to top
+// =============================
+
+.back-to-top {
+ display: none;
+ position: fixed;
+ right: 20px;
+ bottom: 20px;
+ transition-property: transform;
+ transition-timing-function: ease-out;
+ transition-duration: 0.3s;
+ z-index: 10;
+
+ &:hover {
+ transform: translateY(-5px);
+ }
+}
+
+@include max-screen() {
+ .back-to-top {
+ display: none !important;
+ }
+}
\ No newline at end of file
diff --git a/assets/sass/_partial/_footer.scss b/assets/sass/_partial/_footer.scss
new file mode 100644
index 0000000..1f8cdae
--- /dev/null
+++ b/assets/sass/_partial/_footer.scss
@@ -0,0 +1,10 @@
+// ==============================
+// Post footer
+// =============================
+
+.footer {
+ margin-top: $footer-margin-top;
+
+ @import "_footer/social";
+ @import "_footer/copyright";
+}
\ No newline at end of file
diff --git a/assets/sass/_partial/_footer/_copyright.scss b/assets/sass/_partial/_footer/_copyright.scss
new file mode 100644
index 0000000..4e63063
--- /dev/null
+++ b/assets/sass/_partial/_footer/_copyright.scss
@@ -0,0 +1,24 @@
+// ==============================
+// Copyright
+// =============================
+
+.copyright {
+ margin: $copyright-margin;
+ color: $dark-gray;
+ text-align: center;
+ font-family: $global-serif-font-family;
+
+ .hexo-link,
+ .theme-link {
+ color: $theme-color;
+ }
+
+ .copyright-year {
+ display: block;
+
+ .heart {
+ font-size: 14px;
+ margin: 4px;
+ }
+ }
+}
diff --git a/assets/sass/_partial/_footer/_social.scss b/assets/sass/_partial/_footer/_social.scss
new file mode 100644
index 0000000..a23eb69
--- /dev/null
+++ b/assets/sass/_partial/_footer/_social.scss
@@ -0,0 +1,19 @@
+// ==============================
+// Social
+// =============================
+
+.social-links {
+ text-align: center;
+
+ .iconfont {
+ font-size: $social-icon-font-size;
+
+ & + .iconfont {
+ margin-left: $social-link-margin-left;
+ }
+
+ &:hover {
+ color: $theme-color;
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/sass/_partial/_header.scss b/assets/sass/_partial/_header.scss
new file mode 100644
index 0000000..9c4de56
--- /dev/null
+++ b/assets/sass/_partial/_header.scss
@@ -0,0 +1,26 @@
+// ==============================
+// Header
+// ==============================
+
+.header {
+ @include clearfix;
+ padding: $header-padding;
+
+ @import '_header/logo';
+ @import '_header/menu';
+
+ .language-selector {
+ float: right;
+ }
+}
+
+@include max-screen() {
+ .header {
+ padding: 50px 0 0;
+ text-align: center;
+
+ .language-selector {
+ display: none;
+ }
+ }
+}
diff --git a/assets/sass/_partial/_header/_logo.scss b/assets/sass/_partial/_header/_logo.scss
new file mode 100644
index 0000000..cd6435f
--- /dev/null
+++ b/assets/sass/_partial/_header/_logo.scss
@@ -0,0 +1,18 @@
+// ==============================
+// Logo
+// =============================
+
+.logo-wrapper {
+ float: left;
+
+ .logo {
+ font-size: $logo-font-size;
+ font-family: $logo-font-family;
+ }
+}
+
+@include max-screen() {
+ .logo-wrapper {
+ display: none;
+ }
+}
diff --git a/assets/sass/_partial/_header/_menu.scss b/assets/sass/_partial/_header/_menu.scss
new file mode 100644
index 0000000..7209c80
--- /dev/null
+++ b/assets/sass/_partial/_header/_menu.scss
@@ -0,0 +1,35 @@
+// ==============================
+// Menu
+// =============================
+
+.site-navbar {
+ float: right;
+
+ .menu {
+ display: inline-block;
+ position: relative;
+ padding-left: 0;
+ padding-right: 25px;
+ font-family: $global-serif-font-family;
+
+ .menu-item {
+ display: inline-block;
+
+ & + .menu-item {
+ margin-left: $menu-item-margin-left;;
+ }
+
+ @include underline-from-center;
+ }
+
+ .menu-item-link {
+ font-size: $menu-link-font-size;
+ }
+ }
+}
+
+@include max-screen() {
+ .site-navbar {
+ display: none;
+ }
+}
diff --git a/assets/sass/_partial/_language-selector.scss b/assets/sass/_partial/_language-selector.scss
new file mode 100644
index 0000000..7640e61
--- /dev/null
+++ b/assets/sass/_partial/_language-selector.scss
@@ -0,0 +1,25 @@
+.language-selector {
+ width: max-content;
+
+ .languages-list {
+ padding: 0;
+ background: darken($deputy-color, 3%);
+
+ .language-item {
+ display: inline-block;
+ list-style-type: none;
+ text-transform: uppercase;
+ font-family: $global-serif-font-family;
+ font-size: 18px;
+ padding: 0 10px;
+
+ &.active {
+ background: $theme-color;
+
+ > a {
+ color: #fff;
+ }
+ }
+ }
+ }
+}
diff --git a/assets/sass/_partial/_mobile.scss b/assets/sass/_partial/_mobile.scss
new file mode 100644
index 0000000..26e4c76
--- /dev/null
+++ b/assets/sass/_partial/_mobile.scss
@@ -0,0 +1,77 @@
+// ==============================
+// Mobile Navbar
+// ==============================
+
+.mobile-navbar {
+ display: none;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: $mobile-navbar-height;
+ background: $white;
+ box-shadow: 0px 2px 2px $gray;
+ text-align: center;
+ transition: transform 300ms ease;
+ z-index: 99;
+
+ &.fixed-open {
+ transform: translate3d(180px, 0px, 0px);
+ }
+
+ .mobile-header-logo {
+ display: inline-block;
+ margin-right: 50px;
+
+ .logo {
+ font-size: 22px;
+ line-height: $mobile-navbar-height;
+ font-family: $logo-font-family;
+ }
+ }
+
+ .mobile-navbar-icon {
+ color: $theme-color;
+ height: $mobile-navbar-height;
+ width: $mobile-navbar-height;
+ font-size: 24px;
+ text-align: center;
+ float: left;
+ position: relative;
+ transition: background 0.5s;
+
+ @include mobile-menu-icon();
+ }
+}
+
+.mobile-menu {
+ background-color: rgba($deputy-color, 0.5);
+
+ .mobile-menu-list {
+ position: relative;
+ list-style: none;
+ margin-top: 50px;
+ padding: 0;
+ border-top: 1px solid $deputy-color;
+
+ .mobile-menu-item {
+ padding: 10px 30px;
+ border-bottom: 1px solid $deputy-color;
+ }
+
+ a {
+ font-size: 18px;
+ font-family: $global-serif-font-family;
+
+ &:hover {
+ color: $theme-color;
+ }
+ }
+ }
+}
+
+@include max-screen() {
+ .mobile-navbar {
+ display: block;
+ }
+}
diff --git a/assets/sass/_partial/_pagination.scss b/assets/sass/_partial/_pagination.scss
new file mode 100644
index 0000000..c58f8db
--- /dev/null
+++ b/assets/sass/_partial/_pagination.scss
@@ -0,0 +1,36 @@
+// ==============================
+// Pagination
+// ==============================
+
+.pagination {
+ margin: $pagination-margin;
+ @include clearfix;
+
+ .prev,
+ .next {
+ font-weight: 600;
+ font-size: $pagination-font-size;
+ font-family: $global-serif-font-family;
+ transition-property: transform;
+ transition-timing-function: ease-out;
+ transition-duration: 0.3s;
+ }
+
+ .prev {
+ float: left;
+
+ &:hover {
+ color: $theme-color;
+ transform: translateX(-4px);
+ }
+ }
+
+ .next {
+ float: right;
+
+ &:hover {
+ color: $theme-color;
+ transform: translateX(4px);
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/sass/_partial/_post.scss b/assets/sass/_partial/_post.scss
new file mode 100644
index 0000000..a980b29
--- /dev/null
+++ b/assets/sass/_partial/_post.scss
@@ -0,0 +1,24 @@
+// ==============================
+// Post
+// ==============================
+
+.posts {
+ margin-bottom: $post-list-margin-bottom;
+ border-bottom: $post-border;
+}
+
+.post {
+ padding: $post-padding;
+
+ & + .post {
+ border-top: $post-border;
+ }
+
+ @import '_post/header';
+ @import '_post/toc';
+ @import '_post/content';
+ @import '_post/copyright';
+ @import '_post/reward';
+ @import '_post/footer';
+ @import '_post/outdated';
+}
diff --git a/assets/sass/_partial/_post/_admonition.scss b/assets/sass/_partial/_post/_admonition.scss
new file mode 100644
index 0000000..75444d6
--- /dev/null
+++ b/assets/sass/_partial/_post/_admonition.scss
@@ -0,0 +1,210 @@
+.admonition {
+ box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),
+ 0 1px 5px 0 rgba(0,0,0,.12),
+ 0 3px 1px -2px rgba(0,0,0,.2);
+ position: relative;
+ margin: .9765em 0;
+ padding: 0 .75rem;
+ border-left: .25rem solid #448aff;
+ border-radius: .125rem;
+ overflow: auto;
+
+ .admonition-title {
+ margin: 0 -0.75rem;
+ padding: .5rem .75rem .5rem 2.5rem;
+ border-bottom: .1rem solid rgba(68,138,255,.1);
+ background-color: rgba(68,138,255,.1);
+ font-weight: 700;
+ }
+
+ .admonition-title:before {
+ @extend %base-iconfont;
+ cursor: auto;
+ position: absolute;
+ left: .75rem;
+ top: .75rem;
+ }
+
+ &.note {
+ border-left-color: #448aff;
+
+ .admonition-title:before {
+ color: #448aff;
+ content: "\e903";
+ }
+ }
+
+ &.abstract {
+ border-left-color: #00b0ff;
+
+ .admonition-title {
+ background-color: rgba(0,176,255,.1);
+ }
+
+ .admonition-title:before {
+ color: #00b0ff;
+ content: "\e9bb";
+ }
+ }
+
+ &.info {
+ border-left-color: #00b8d4;
+
+ .admonition-title {
+ background-color: rgba(0,184,212,.1);
+ }
+
+ .admonition-title:before {
+ color: #00b8d4;
+ content: "\ea0c";
+ }
+ }
+
+ &.tip {
+ border-left-color: #00bfa5;
+
+ .admonition-title {
+ background-color: rgba(0,191,165,.1);
+ }
+
+ .admonition-title:before {
+ color: #00bfa5;
+ content: "\e906";
+ }
+ }
+
+ &.success {
+ border-left-color: #00c853;
+
+ .admonition-title {
+ background-color: rgba(0,200,83,.1);
+ }
+
+ .admonition-title:before {
+ color: #00c853;
+ content: "\ea10";
+ }
+ }
+
+ &.question {
+ border-left-color: #64dd17;
+
+ .admonition-title {
+ background-color: rgba(100,221,23,.1);
+ }
+
+ .admonition-title:before {
+ color: #64dd17;
+ content: "\ea09";
+ }
+ }
+
+ &.warning {
+ border-left-color: #ff9100;
+
+ .admonition-title {
+ background-color: rgba(255,145,0,.1);
+ }
+
+ .admonition-title:before {
+ color: #ff9100;
+ content: "\ea07";
+ }
+ }
+
+ &.failure {
+ border-left-color: #ff5252;
+
+ .admonition-title {
+ background-color: rgba(255,82,82,.1);
+ }
+
+ .admonition-title:before {
+ color: #ff5252;
+ content: "\ea0f";
+ }
+ }
+
+ &.danger {
+ border-left-color: #ff1744;
+
+ .admonition-title {
+ background-color: rgba(255,23,68,.1);
+ }
+
+ .admonition-title:before {
+ color: #ff1744;
+ content: "\e905";
+ }
+ }
+
+ &.bug {
+ border-left-color: #f50057;
+
+ .admonition-title {
+ background-color: rgba(245,0,87,.1);
+ }
+
+ .admonition-title:before {
+ color: #f50057;
+ content: "\e907";
+ }
+ }
+
+ &.example {
+ border-left-color: #651fff;
+
+ .admonition-title {
+ background-color: rgba(101,31,255,.1);
+ }
+
+ .admonition-title:before {
+ color: #651fff;
+ content: "\e9b9";
+ }
+ }
+
+ &.quote {
+ border-left-color: #9e9e9e;
+
+ .admonition-title {
+ background-color: hsla(0,0%,62%,.1);
+ }
+
+ .admonition-title:before {
+ color: #9e9e9e;
+ content: "\e904";
+ }
+ }
+
+ &:last-child {
+ margin-bottom: .75rem;
+ }
+}
+
+details.admonition {
+ summary {
+ display: block;
+ outline: none;
+ cursor: pointer;
+
+ &::-webkit-details-marker {
+ display: none;
+ }
+
+ &:after {
+ @extend %base-iconfont;
+ position: absolute;
+ top: .75rem;
+ right: .75rem;
+ color: rgba(0,0,0,.26);
+ content: "\e908";
+ }
+ }
+}
+
+details.admonition[open] {
+ > summary:after {
+ transform: rotate(180deg);
+ }
+}
diff --git a/assets/sass/_partial/_post/_code.scss b/assets/sass/_partial/_post/_code.scss
new file mode 100644
index 0000000..2bd16a1
--- /dev/null
+++ b/assets/sass/_partial/_post/_code.scss
@@ -0,0 +1,287 @@
+code, pre {
+ padding: 7px;
+ font-size: $code-font-size;
+ font-family: $code-font-family;
+ background: $code-background;
+}
+
+code {
+ padding: 3px 5px;
+ border-radius: 4px;
+ color: $code-color;
+}
+
+pre > code {
+ display: block;
+}
+
+// highlight.js
+figure.highlight {
+ margin: 1em 0;
+ border-radius: 5px;
+ overflow-x: auto;
+ box-shadow: 1px 1px 2px rgba(0,0,0,0.125);
+ position: relative;
+
+ table {
+ position: relative;
+
+ &::after {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ padding: 2px 7px;
+ font-size: $code-font-size;
+ font-weight: bold;
+ color: darken($gray, 10%);
+ background: darken($code-background, 3%);
+ content: 'Code';
+ }
+ }
+
+ @each $sign, $text in $code-type-list {
+ &.#{$sign} > table::after {
+ content: $text;
+ }
+ }
+
+ .code {
+ pre {
+ margin: 0;
+ padding: 30px 10px 10px;
+ }
+ }
+
+ .gutter {
+ width: 10px;
+ color: $gray;
+
+ pre {
+ margin: 0;
+ padding: 30px 7px 10px;
+ }
+ }
+
+ .line {
+ // Fix code block null line height and
+ // Synchronous gutter and code line highly.
+ height: round($code-font-size * 1.5);
+ }
+
+ table, tr, td {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ border-collapse: collapse;
+ }
+
+ .code {
+ .hljs-comment,
+ .hljs-quote {
+ color: map-get($code-highlight-color, comment);
+ }
+
+ .hljs-keyword,
+ .hljs-selector-tag,
+ .hljs-addition {
+ color: map-get($code-highlight-color, keyword);
+ }
+
+ .hljs-number,
+ .hljs-string,
+ .hljs-meta .hljs-meta-string,
+ .hljs-literal,
+ .hljs-doctag,
+ .hljs-regexp {
+ color: map-get($code-highlight-color, number);
+ }
+
+ .hljs-title,
+ .hljs-section,
+ .hljs-name,
+ .hljs-selector-id,
+ .hljs-selector-class {
+ color: map-get($code-highlight-color, title);
+ }
+
+ .hljs-attribute,
+ .hljs-attr,
+ .hljs-variable,
+ .hljs-template-variable,
+ .hljs-class .hljs-title,
+ .hljs-type {
+ color: map-get($code-highlight-color, attribute);
+ }
+
+ .hljs-symbol,
+ .hljs-bullet,
+ .hljs-subst,
+ .hljs-meta,
+ .hljs-meta .hljs-keyword,
+ .hljs-selector-attr,
+ .hljs-selector-pseudo,
+ .hljs-link {
+ color: map-get($code-highlight-color, symbol);
+ }
+
+ .hljs-built_in,
+ .hljs-deletion {
+ color: map-get($code-highlight-color, built_in);
+ }
+
+ .hljs-formula {
+ background: map-get($code-highlight-color, formula);
+ }
+
+ .hljs-emphasis {
+ font-style: italic;
+ }
+
+ .hljs-strong {
+ font-weight: bold;
+ }
+ }
+}
+
+// chroma
+.highlight > .chroma {
+ margin: 1em 0;
+ border-radius: 5px;
+ overflow-x: auto;
+ box-shadow: 1px 1px 2px rgba(0,0,0,0.125);
+ position: relative;
+ background: $code-background;
+
+ code {
+ padding: 0;
+ }
+
+ table {
+ position: relative;
+
+ &::after {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ padding: 2px 7px;
+ font-size: $code-font-size;
+ font-weight: bold;
+ color: darken($gray, 10%);
+ background: darken($code-background, 3%);
+ content: 'Code';
+ }
+ }
+
+ @each $sign, $text in $code-type-list {
+ &.#{$sign} > table::after {
+ content: $text;
+ }
+ }
+
+ .lntd {
+ // Fix code block null line height and
+ // Synchronous gutter and code line highly.
+ line-height: round($code-font-size * 1.5);
+
+ &:first-child {
+ width: 10px;
+
+ pre {
+ margin: 0;
+ padding: 30px 7px 10px;
+ }
+ }
+
+ &:last-child {
+ vertical-align: top;
+
+ pre {
+ margin: 0;
+ padding: 30px 10px 10px;
+ }
+ }
+ }
+
+ table, tr, td {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ border-collapse: collapse;
+ }
+
+ /* LineNumbersTable */ .lnt { color: $gray; }
+ /* LineHighlight */ .hl { display: block; width: 100%; background-color: #ffffcc }
+
+ /* Keyword */ .k { color: #859900 }
+ /* KeywordConstant */ .kc { color: #859900; font-weight: bold }
+ /* KeywordDeclaration */ .kd { color: #859900 }
+ /* KeywordNamespace */ .kn { color: #dc322f; font-weight: bold }
+ /* KeywordPseudo */ .kp { color: #859900 }
+ /* KeywordReserved */ .kr { color: #859900 }
+ /* KeywordType */ .kt { color: #859900; font-weight: bold }
+ /* Name */ .n { color: #268bd2 }
+ /* NameAttribute */ .na { color: #268bd2 }
+ /* NameBuiltin */ .nb { color: #cb4b16 }
+ /* NameBuiltinPseudo */ .bp { color: #268bd2 }
+ /* NameClass */ .nc { color: #cb4b16 }
+ /* NameConstant */ .no { color: #268bd2 }
+ /* NameDecorator */ .nd { color: #268bd2 }
+ /* NameEntity */ .ni { color: #268bd2 }
+ /* NameException */ .ne { color: #268bd2 }
+ /* NameFunction */ .nf { color: #268bd2 }
+ /* NameFunctionMagic */ .fm { color: #268bd2 }
+ /* NameLabel */ .nl { color: #268bd2 }
+ /* NameNamespace */ .nn { color: #268bd2 }
+ /* NameOther */ .nx { color: #268bd2 }
+ /* NameProperty */ .py { color: #268bd2 }
+ /* NameTag */ .nt { color: #268bd2; font-weight: bold }
+ /* NameVariable */ .nv { color: #268bd2 }
+ /* NameVariableClass */ .vc { color: #268bd2 }
+ /* NameVariableGlobal */ .vg { color: #268bd2 }
+ /* NameVariableInstance */ .vi { color: #268bd2 }
+ /* NameVariableMagic */ .vm { color: #268bd2 }
+ /* Literal */ .l { color: #2aa198 }
+ /* LiteralDate */ .ld { color: #2aa198 }
+ /* LiteralString */ .s { color: #2aa198 }
+ /* LiteralStringAffix */ .sa { color: #2aa198 }
+ /* LiteralStringBacktick */ .sb { color: #2aa198 }
+ /* LiteralStringChar */ .sc { color: #2aa198 }
+ /* LiteralStringDelimiter */ .dl { color: #2aa198 }
+ /* LiteralStringDoc */ .sd { color: #2aa198 }
+ /* LiteralStringDouble */ .s2 { color: #2aa198 }
+ /* LiteralStringEscape */ .se { color: #2aa198 }
+ /* LiteralStringHeredoc */ .sh { color: #2aa198 }
+ /* LiteralStringInterpol */ .si { color: #2aa198 }
+ /* LiteralStringOther */ .sx { color: #2aa198 }
+ /* LiteralStringRegex */ .sr { color: #2aa198 }
+ /* LiteralStringSingle */ .s1 { color: #2aa198 }
+ /* LiteralStringSymbol */ .ss { color: #2aa198 }
+ /* LiteralNumber */ .m { color: #2aa198; font-weight: bold }
+ /* LiteralNumberBin */ .mb { color: #2aa198; font-weight: bold }
+ /* LiteralNumberFloat */ .mf { color: #2aa198; font-weight: bold }
+ /* LiteralNumberHex */ .mh { color: #2aa198; font-weight: bold }
+ /* LiteralNumberInteger */ .mi { color: #2aa198; font-weight: bold }
+ /* LiteralNumberIntegerLong */ .il { color: #2aa198; font-weight: bold }
+ /* LiteralNumberOct */ .mo { color: #2aa198; font-weight: bold }
+ /* OperatorWord */ .ow { color: #859900 }
+ /* Comment */ .c { color: #93a1a1; font-style: italic }
+ /* CommentHashbang */ .ch { color: #93a1a1; font-style: italic }
+ /* CommentMultiline */ .cm { color: #93a1a1; font-style: italic }
+ /* CommentSingle */ .c1 { color: #93a1a1; font-style: italic }
+ /* CommentSpecial */ .cs { color: #93a1a1; font-style: italic }
+ /* CommentPreproc */ .cp { color: #93a1a1; font-style: italic }
+ /* CommentPreprocFile */ .cpf { color: #93a1a1; font-style: italic }
+ /* Generic */ .g { color: #d33682 }
+ /* GenericDeleted */ .gd { color: #b58900 }
+ /* GenericEmph */ .ge { color: #d33682 }
+ /* GenericError */ .gr { color: #d33682 }
+ /* GenericHeading */ .gh { color: #d33682 }
+ /* GenericInserted */ .gi { color: #859900 }
+ /* GenericOutput */ .go { color: #d33682 }
+ /* GenericPrompt */ .gp { color: #d33682 }
+ /* GenericStrong */ .gs { color: #d33682 }
+ /* GenericSubheading */ .gu { color: #d33682 }
+ /* GenericTraceback */ .gt { color: #d33682 }
+}
diff --git a/assets/sass/_partial/_post/_content.scss b/assets/sass/_partial/_post/_content.scss
new file mode 100644
index 0000000..b21d3df
--- /dev/null
+++ b/assets/sass/_partial/_post/_content.scss
@@ -0,0 +1,198 @@
+// ==============================
+// Post content
+// ==============================
+
+.post-content {
+ word-wrap: break-word;
+
+ @for $i from 1 through 6 {
+ h#{$i} {
+ font-weight: 400;
+ font-family: $global-serif-font-family;
+
+ .anchor {
+ float: left;
+ line-height: 1;
+ margin-left: -20px;
+ padding-right: 4px;
+
+ &:hover {
+ border-bottom: initial;
+ }
+
+ .icon-link {
+ visibility: hidden;
+ font-size: 16px;
+ display: contents;
+
+ &:before {
+ vertical-align: middle;
+ }
+ }
+ }
+
+ &:hover {
+ .icon-link {
+ visibility: visible;
+ }
+ }
+ }
+ }
+
+ a {
+ color: $theme-color;
+ word-break: break-all;
+
+ &:hover {
+ border-bottom: $content-link-border;
+ }
+
+ &.fancybox {
+ border: 0;
+ }
+ }
+
+ blockquote {
+ margin: 2em 0;
+ padding: 10px 20px;
+ position: relative;
+ color: rgba(#34495e, 0.8);
+ background-color: $content-blockquote-backgroud;
+ border-left: $content-blockquote-border-left;
+ box-shadow: 1px 1px 2px rgba(0,0,0,0.125);
+
+ p {
+ margin: 0;
+ }
+ }
+
+ img {
+ display: inline-block;
+ max-width: 100%;
+ }
+
+ .table-wrapper {
+ overflow-x: auto;
+
+ > table {
+ max-width: 100%;
+ margin: 10px 0;
+ border-spacing: 0;
+ box-shadow: 2px 2px 3px rgba(0,0,0,.125);
+
+ thead {
+ background: $deputy-color;
+ }
+
+ th, td {
+ padding: 5px 15px;
+ border: 1px double $content-table-border-color;
+ }
+
+ tr:hover {
+ background-color: $deputy-color;
+ }
+ }
+ }
+
+ @import 'code';
+ @import 'admonition';
+
+ .post-summary {
+ margin-bottom: 1em;
+ }
+
+ .read-more {
+ .read-more-link {
+ color: $theme-color;
+ font-size: 1.1em;
+ font-family: $global-serif-font-family;
+
+ &:hover {
+ border-bottom: $post-readMore-border-bottom;
+ }
+ }
+ }
+
+ kbd {
+ display: inline-block;
+ padding: 0.25em;
+ background-color: #fafafa;
+ border: 1px solid #dbdbdb;
+ border-bottom-color: #b5b5b5;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 #b5b5b5;
+ font-size: 0.8em;
+ line-height: 1.25;
+ font-family: "SFMono-Regular","Liberation Mono","Roboto Mono",Menlo,Monaco,Consolas,"Courier New",Courier,monospace;
+ color: #4a4a4a;
+ }
+
+ dl dt::after {
+ content: ':';
+ }
+
+ figure {
+ &.center {
+ text-align: center;
+ }
+
+ &.right {
+ text-align: right;
+ }
+
+ &.left {
+ text-align: left;
+ }
+
+ figcaption h4 {
+ color: #b5b5b5;
+ font-size: 0.9rem;
+ }
+ }
+
+ hr {
+ margin: 1rem 0;
+ position: relative;
+ border-top: 2px dashed $theme-color;
+ border-bottom: none;
+ }
+
+ .footnote-ref {
+ > a {
+ font-weight: bold;
+ margin-left: 3px;
+
+ &:before {
+ content: "[";
+ }
+
+ &:after {
+ content: "]";
+ }
+ }
+ }
+
+ .task-list {
+ list-style: none;
+ padding-left: 1.5rem;
+ }
+
+ .align-center {
+ text-align: center;
+ }
+
+ .align-right {
+ text-align: right;
+ }
+
+ .align-left {
+ text-align: left;
+ }
+
+ .MJXc-display {
+ overflow-x: auto;
+ overflow-y: hidden;
+ padding-right: 1px;
+ }
+}
diff --git a/assets/sass/_partial/_post/_copyright.scss b/assets/sass/_partial/_post/_copyright.scss
new file mode 100644
index 0000000..374061f
--- /dev/null
+++ b/assets/sass/_partial/_post/_copyright.scss
@@ -0,0 +1,29 @@
+.post-copyright {
+ margin-top: 20px;
+ padding-top: 10px;
+ border-top: 1px dashed $light-gray;
+
+ .copyright-item {
+ margin: 5px 0;
+
+ a {
+ color: $theme-color;
+ word-wrap: break-word;
+
+ &:hover {
+ border-bottom: $content-link-border;
+ }
+ }
+
+ .item-title {
+ display: inline-block;
+ min-width: 5rem;
+ margin-right: .5rem;
+ text-align: right;
+
+ &:after {
+ content: " :";
+ }
+ }
+ }
+}
diff --git a/assets/sass/_partial/_post/_footer.scss b/assets/sass/_partial/_post/_footer.scss
new file mode 100644
index 0000000..012110f
--- /dev/null
+++ b/assets/sass/_partial/_post/_footer.scss
@@ -0,0 +1,74 @@
+// ==============================
+// Post footer
+// ==============================
+
+.post-footer {
+ margin-top: $post-footer-margin-top;
+ border-top: $post-footer-border-top;
+ font-family: $global-serif-font-family;
+
+ .post-tags {
+ padding: $post-tags-padding;
+
+ a {
+ margin-right: 5px;
+ color: $theme-color;
+ word-break: break-all;
+
+ &::before {
+ content: '#';
+ }
+ }
+ }
+
+ .post-nav {
+ margin: 1em 0;
+ @include clearfix;
+
+ .prev,
+ .next {
+ font-weight: 600;
+ font-size: $post-nav-font-size;
+ font-family: $global-serif-font-family;
+ transition-property: transform;
+ transition-timing-function: ease-out;
+ transition-duration: 0.3s;
+ }
+
+ .prev {
+ float: left;
+
+ &:hover {
+ color: $theme-color;
+ transform: translateX(-4px);
+ }
+ }
+
+ .next {
+ float: right;
+
+ &:hover {
+ color: $theme-color;
+ transform: translateX(4px);
+ }
+ }
+
+ .nav-mobile {
+ display: none;
+ }
+ }
+}
+
+@include max-screen() {
+ .post-footer {
+ .post-nav {
+ .nav-default {
+ display: none;
+ }
+
+ .nav-mobile {
+ display: inline;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/sass/_partial/_post/_header.scss b/assets/sass/_partial/_post/_header.scss
new file mode 100644
index 0000000..7faf4e3
--- /dev/null
+++ b/assets/sass/_partial/_post/_header.scss
@@ -0,0 +1,46 @@
+.post-header {
+ margin-bottom: 20px;
+
+ .post-title {
+ margin: 0;
+ font-size: $post-title-font-size;
+ font-weight: $post-title-font-weight;
+ font-family: $global-serif-font-family;
+ }
+
+ .post-link {
+ @include underline-from-center;
+ }
+
+ .post-meta {
+ font-size: 14px;
+ color: $post-meta-font-color;
+
+ .post-time {
+ font-size: 15px;
+ }
+
+ .post-category {
+ display: inline;
+
+ a {
+ color: inherit;
+
+ &::before {
+ content: '·';
+ }
+
+ &:hover {
+ color: $theme-color;
+ }
+ }
+ }
+
+ .more-meta {
+ &::before {
+ content: '·';
+ }
+ }
+
+ }
+}
diff --git a/assets/sass/_partial/_post/_outdated.scss b/assets/sass/_partial/_post/_outdated.scss
new file mode 100644
index 0000000..be7b5ea
--- /dev/null
+++ b/assets/sass/_partial/_post/_outdated.scss
@@ -0,0 +1,25 @@
+.post-outdated {
+ .hint {
+ position: relative;
+ margin-top: 20px;
+ margin-bottom: 20px;
+ padding: 5px 10px;
+ border-left: 4px solid rgb(66, 172, 243);
+ background-color: rgb(239, 245, 255);
+ border-color: rgb(66, 172, 243);
+ }
+
+ .warn {
+ position: relative;
+ margin-top: 20px;
+ margin-bottom: 20px;
+ padding: 5px 10px;
+ border-left: 4px solid #f9cf63;
+ background-color: #ffffc0;
+ border-color: #f9cf63;
+ }
+}
+
+
+
+
diff --git a/assets/sass/_partial/_post/_reward.scss b/assets/sass/_partial/_post/_reward.scss
new file mode 100644
index 0000000..3a03a9f
--- /dev/null
+++ b/assets/sass/_partial/_post/_reward.scss
@@ -0,0 +1,54 @@
+.post-reward {
+ margin-top: 20px;
+ padding-top: 10px;
+ text-align: center;
+ border-top: 1px dashed $light-gray;
+
+ .reward-button {
+ margin: 15px 0;
+ padding: 3px 7px;
+ display: inline-block;
+ color: $theme-color;
+ border: 1px solid $theme-color;
+ border-radius: 5px;
+ cursor: pointer;
+
+ &:hover {
+ color: $white;
+ background-color: $theme-color;
+ transition: 0.5s;
+ }
+ }
+
+ #reward:checked {
+ & ~ .qr-code {
+ display: block;
+ }
+
+ & ~ .reward-button {
+ display: none;
+ }
+ }
+
+ .qr-code {
+ display: none;
+
+ .qr-code-image {
+ display: inline-block;
+ min-width: 200px;
+ width: 40%;
+ margin-top: 15px;
+
+ span {
+ display: inline-block;
+ width: 100%;
+ margin: 8px 0;
+ }
+ }
+
+ .image {
+ width: 200px;
+ height: 200px;
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/sass/_partial/_post/_toc.scss b/assets/sass/_partial/_post/_toc.scss
new file mode 100644
index 0000000..8327055
--- /dev/null
+++ b/assets/sass/_partial/_post/_toc.scss
@@ -0,0 +1,55 @@
+.post-toc {
+ position: absolute;
+ width: $post-toc-width;
+ margin-left: $post-toc-margin-left;
+ padding: 10px;
+ font-family: $global-serif-font-family;
+ border-radius: 5px;
+ background: $post-toc-backgroud;
+ box-shadow: 1px 1px 2px rgba(0,0,0,0.125);
+ word-wrap: break-word;
+ box-sizing: border-box;
+
+ .post-toc-title {
+ margin: 0 10px;
+ font-size: $post-toc-title-size;
+ font-weight: 400;
+ text-transform: uppercase;
+ }
+
+ .post-toc-content {
+ font-size: $post-toc-content;
+
+ &.always-active ul {
+ display: block;
+ }
+
+ >nav>ul {
+ margin: 10px 0;
+ }
+
+ ul {
+ padding-left: 20px;
+ list-style: $post-toc-list-style;
+
+ ul {
+ padding-left: 15px;
+ display: none;
+ }
+
+ .has-active > ul {
+ display: block;
+ }
+ }
+
+ .toc-link.active {
+ color: $theme-color;
+ }
+ }
+}
+
+@include max-screen($toc-max-sreen-width) {
+ .post-toc {
+ display: none;
+ }
+}
diff --git a/assets/sass/_partial/_slideout.scss b/assets/sass/_partial/_slideout.scss
new file mode 100644
index 0000000..58891fd
--- /dev/null
+++ b/assets/sass/_partial/_slideout.scss
@@ -0,0 +1,37 @@
+// ==============================
+// slideout (https://github.com/mango/slideout)
+// ==============================
+
+.slideout-menu {
+ position: fixed;
+ top: 0;
+ left: 0px;
+ bottom: 0;
+ width: 180px;
+ min-height: 100vh;
+ overflow-y: hidden;
+ -webkit-overflow-scrolling: touch;
+ z-index: 0;
+ display: none;
+
+ .language-selector {
+ padding-left: 30px;
+ }
+}
+
+.slideout-panel {
+ position: relative;
+ z-index: 1;
+ background-color: $white;
+ min-height: 100vh;
+}
+
+.slideout-open,
+.slideout-open body,
+.slideout-open .slideout-panel {
+ overflow: hidden;
+}
+
+.slideout-open .slideout-menu {
+ display: block;
+}
diff --git a/assets/sass/_partial/_terms.scss b/assets/sass/_partial/_terms.scss
new file mode 100644
index 0000000..f498ffe
--- /dev/null
+++ b/assets/sass/_partial/_terms.scss
@@ -0,0 +1,46 @@
+// ==============================
+// General Terms(tags, categories, etc.)
+// =============================
+
+.terms {
+ margin: 2em 0 3em;
+ text-align: center;
+ font-family: $global-serif-font-family;
+
+ .terms-title {
+ display: inline-block;
+ font-size: $terms-title-size;
+ color: $theme-color;
+ border-bottom: $terms-title-border-bottom;
+ }
+
+ .terms-tags {
+ margin: 10px 0;
+
+ .terms-link {
+ display: inline-block;
+ position: relative;
+ margin: $terms-link-margin;
+ word-wrap: break-word;
+ transition-duration: 0.2s;
+ transition-property: transform;
+ transition-timing-function: ease-out;
+
+ .terms-count {
+ display: inline-block;
+ position: relative;
+ top: -8px;
+ right: -2px;
+ color: $theme-color;
+ font-size: $terms-count-font-size;
+ }
+
+ &:active,
+ &:focus,
+ &:hover {
+ color: $theme-color;
+ transform: scale(1.1);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/sass/_variables.scss b/assets/sass/_variables.scss
new file mode 100644
index 0000000..ae97a8f
--- /dev/null
+++ b/assets/sass/_variables.scss
@@ -0,0 +1,329 @@
+// ==============================
+// Variables
+// ==============================
+
+// ========== Theme Color ========== //
+// Config here to change theme color
+// Default | Mint Green | Cobalt Blue | Hot Pink | Dark Violet
+$theme-color-config: 'Default';
+
+// Default theme color map
+$theme-color-map: (
+ 'Default': #c05b4d #f8f5ec,
+ 'Mint Green': #16982B #f5f5f5,
+ 'Cobalt Blue': #0047AB #f0f2f5,
+ 'Hot Pink': #FF69B4 #f8f5f5,
+ 'Dark Violet': #9932CC #f5f4fa
+);
+
+// Check theme color config.
+// if it does not exist, use default theme color.
+@if not(map-has-key($theme-color-map, $theme-color-config)) {
+ $theme-color-config: 'Default';
+}
+$theme-color-list: map-get($theme-color-map, $theme-color-config);
+
+// Default theme color of the site.
+$theme-color: nth($theme-color-list, 1) !default;
+
+// Deputy theme color of the site.
+$deputy-color: nth($theme-color-list, 2) !default;
+
+
+// ========== Color ========== //
+$black: #0a0a0a !default;
+$white: #fefefe !default;
+$light-gray: #e6e6e6 !default;
+$gray: #cacaca !default;
+$dark-gray: #8a8a8a !default;
+
+
+// ========== Global ========== //
+// Text color of the body.
+$global-font-color: #34495e !default;
+
+// Font size attribute applied to '' and ''.
+$global-font-size: 16px !default;
+
+// Global width of ''.
+$global-body-width: 800px !default;
+
+// Padding of container main
+$global-container-padding: 0 20px !default;
+
+// Default line height for all type. `$global-lineheight` is 24px while `$global-font-size` is 16px.
+$global-lineheight: 1.5 !default;
+
+// Font family of the site.
+$global-font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif !default;
+
+// Serif font family of the site.
+$global-serif-font-family: Athelas, STHeiti, Microsoft Yahei, serif !default;
+
+// Background color of the site.
+$global-background: $white !default;
+
+// Headings font size of the site.
+$global-headings: (
+ h1: 26px,
+ h2: 24px,
+ h3: 20px,
+ h4: 16px,
+ h5: 14px,
+ h6: 14px
+) !default;
+
+
+// ========== Header ========== //
+// Padding of the site header.
+$header-padding: 20px 20px !default;
+
+// Font family: Chancery
+@font-face {
+ font-family: 'Chancery';
+ src: url('../fonts/chancery/apple-chancery-webfont.eot');
+ src: local('Apple Chancery'), url('../fonts/chancery/apple-chancery-webfont.eot?#iefix') format('embedded-opentype'),
+ url('../fonts/chancery/apple-chancery-webfont.woff2') format('woff2'),
+ url('../fonts/chancery/apple-chancery-webfont.woff') format('woff'),
+ url('../fonts/chancery/apple-chancery-webfont.ttf') format('truetype'),
+ url('../fonts/chancery/apple-chancery-webfont.svg#apple-chancery') format('svg');
+ font-weight: lighter;
+ font-style: normal;
+ font-display: swap;
+}
+
+// Font size of the logo.
+$logo-font-size: 48px !default;
+
+// Font family of the logo.
+$logo-font-family: 'Chancery', cursive, LiSu, sans-serif !default;
+
+// Margin of menu item.
+$menu-item-margin-left: 10px !default;
+
+// Margin of menu item in mobile.
+$menu-item-mobile-margin: 5px !default;
+
+// Font size of menu item link.
+$menu-link-font-size: 18px !default;
+
+// Height of the mobile header.
+$mobile-navbar-height: 50px !default;
+
+// ========== Post ========== //
+// Margin bottom of post list.
+$post-list-margin-bottom: 20px !default;
+
+// Padding of the post.
+$post-padding: 1.5em 0 !default;
+
+// Border top of the post + post.
+$post-border: 1px solid $light-gray !default;
+
+// Font size of post title.
+$post-title-font-size: 27px !default;
+
+// Font weight of post title.
+$post-title-font-weight: 400 !default;
+
+// Margin top of the post meta (post time).
+$post-meta-margin-top: 5px !default;
+
+// Font color of the post meta.
+$post-meta-font-color: $dark-gray !default;
+
+// Border bottom of the read more link when hover it.
+$post-readMore-border-bottom: 1px solid $theme-color !default;
+
+// Margin top of the post footer.
+$post-footer-margin-top: 20px !default;
+
+// Border top of post footer.
+$post-footer-border-top: 1px solid $light-gray !default;
+
+// Padding of the post tags.
+$post-tags-padding: 15px 0 !default;
+
+// Font size of post pagination.
+$post-nav-font-size: 18px !default;
+
+
+// ========== TOC ========== //
+// Width of the post toc.
+$post-toc-width: 200px !default;
+
+// Backgroud color of the post toc.
+$post-toc-backgroud: rgba($deputy-color, 0.6) !default;
+
+// Margin left of the post toc.
+$post-toc-margin-left: $global-body-width - 15px !default;
+
+// Font size of the post toc title.
+$post-toc-title-size: 20px !default;
+
+// Font size of the post toc content.
+$post-toc-content: 15px !default;
+
+// List style of the post toc list.
+$post-toc-list-style: square !default;
+
+// Max screen media of the post toc.
+$toc-max-sreen-width: 2 * $post-toc-width + $post-toc-margin-left !default;
+
+// ========== Content ========== //
+// Headings anchor.
+$content-headings-anchor: "" !default;
+
+// Border bottom of the link when hover it.
+$content-link-border: 1px solid $theme-color !default;
+
+// Background color of the blockquote.
+$content-blockquote-backgroud: rgba($theme-color, 0.05) !default;
+
+// Border left of the blockquote.
+$content-blockquote-border-left: 3px solid rgba($theme-color, 0.3) !default;
+
+// Border color of the table.
+$content-table-border-color: darken($deputy-color, 3%) !default;
+
+// ========== Code ========== //
+// Color of the code.
+$code-color: #c7254e !default;
+
+// Font size of code.
+$code-font-size: 0.9em !default;
+
+// Font family of the code.
+$code-font-family: Consolas, Monaco, Menlo, "DejaVu Sans Mono",
+ "Bitstream Vera Sans Mono", "Courier New", monospace !default;
+
+// Color of code highlight, solarized.
+$code-highlight-color: (
+ comment: #93a1a1,
+ keyword: #859900,
+ number: #2aa198,
+ title: #268bd2,
+ attribute: #b58900,
+ symbol: #cb4b16,
+ built_in: #dc322f,
+ formula: #eee8d5
+) !default;
+
+// Code type list.
+$code-type-list: (
+ // Custom code type
+ language-bash: "Bash",
+ language-c: "C",
+ language-cs: "C#",
+ language-cpp: "C++",
+ language-css: "CSS",
+ language-coffeescript: "CoffeeScript",
+ language-html: "HTML",
+ language-xml: "XML",
+ language-http: "HTTP",
+ language-json: "JSON",
+ language-java: "Java",
+ language-js: "JavaScript",
+ language-javascript: "JavaScript",
+ language-makefile: "Makefile",
+ language-markdown: "Markdown",
+ language-objectivec: "Objective-C",
+ language-php: "PHP",
+ language-perl: "Perl",
+ language-python: "Python",
+ language-ruby: "Ruby",
+ language-sql: "SQL",
+ language-shell: "Shell",
+
+ language-erlang: "Erlang",
+ language-go: "Go",
+ language-go-html-template: "Go HTML Template",
+ language-groovy: "Groovy",
+ language-haskell: "Haskell",
+ language-kotlin: "Kotlin",
+ language-clojure: "Clojure",
+ language-less: "Less",
+ language-lisp: "Lisp",
+ language-lua: "Lua",
+ language-matlab: "Matlab",
+ language-rust: "Rust",
+ language-scss: "Scss",
+ language-scala: "Scala",
+ language-swift: "Swift",
+ language-typescript: "TypeScript",
+ language-yml: "YAML",
+ language-yaml: "YAML",
+ language-toml: "TOML",
+ language-diff: "Diff"
+) !default;
+
+// Color of the code background.
+$code-background: $deputy-color !default;
+
+
+// ========== Pagination ========== //
+// Margin of the pagination.
+$pagination-margin: 2em 0 !default;
+
+// Font size of the pagination (Without post, post pagination see line 140).
+$pagination-font-size: 20px !default;
+
+
+// ========== Footer ========== //
+// Margin top of the footer.
+$footer-margin-top: 2em !default;
+
+// Margin left of the social link.
+$social-link-margin-left: 10px !default;
+
+// Font size of the social icon.
+$social-icon-font-size: 30px !default;
+
+// Margin of the copyright.
+$copyright-margin: 10px 0 !default;
+
+
+// ========== Archive ========== //
+// Margin of the archive.
+$archive-margin: 2em 0px !default;
+
+// Max width of the archive.
+$archive-max-width: 550px !default;
+
+// Font size of the archive name.
+$archive-name-font-size: 30px !default;
+
+// Font size of the collection title.
+$collection-title-font-size: 28px !default;
+
+// Padding of the archive post.
+$archive-post-padding: 3px 20px !default;
+
+// Padding of the archive post in mobile.
+$archive-post-mobile-padding: 5px 10px !default;
+
+// Font size of the archive post time in mobile.
+$archive-post-mobile-time-font-size: 13px !default;
+
+// Border left of the archive post, use $archive-post-hover-border-left when hover it.
+$archive-post-border-left: 1px solid $gray !default;
+$archive-post-hover-border-left: 3px solid $theme-color !default;
+
+// Transition of the archive post when hover it.
+$archive-post-hover-transition: 0.2s ease-out !default;
+
+// Transform of the archive post when hover it.
+$archive-post-hover-transform: translateX(4px) !default;
+
+// ========== General Terms ========== //
+// Font size of the terms title.
+$terms-title-size: 18px !default;
+
+// Border bottom of the terms title.
+$terms-title-border-bottom: 2px solid $theme-color !default;
+
+// Margin of the terms link.
+$terms-link-margin: 5px 10px !default;
+
+// Font size of the terms count
+$terms-count-font-size: 12px !default;
diff --git a/assets/sass/main.scss b/assets/sass/main.scss
new file mode 100644
index 0000000..2b843f7
--- /dev/null
+++ b/assets/sass/main.scss
@@ -0,0 +1,19 @@
+@import "_custom/custom";
+@import "_variables";
+
+@import "_common/utils";
+@import "_common/animation";
+
+@import "_base";
+@import "_iconfont";
+@import "_partial/header";
+@import "_partial/post";
+@import "_partial/pagination";
+@import "_partial/footer";
+@import "_partial/archive";
+@import "_partial/terms";
+@import "_partial/slideout";
+@import "_partial/mobile";
+@import "_partial/back-to-top";
+@import "_partial/404";
+@import "_partial/language-selector";
diff --git a/config.toml b/config.toml
index 1d7c819..a23461c 100644
--- a/config.toml
+++ b/config.toml
@@ -1,3 +1,164 @@
-baseURL = 'http://example.org/'
-languageCode = 'en-us'
-title = 'My New Hugo Site'
+baseURL = "https://chronicles.divineduty.xyz/"
+languageCode = "en"
+defaultContentLanguage = "en" # en / zh-cn / ... (This field determines which i18n file to use)
+title = "The Divine Chronicles"
+preserveTaxonomyNames = true
+enableRobotsTXT = true
+enableEmoji = true
+theme = "even"
+enableGitInfo = true # use git commit log to generate lastmod record # 可根据 Git 中的提交生成最近更新记录。
+
+# Syntax highlighting by Chroma. NOTE: Don't enable `highlightInClient` and `chroma` at the same time!
+pygmentsOptions = "linenos=table"
+pygmentsCodefences = true
+pygmentsUseClasses = true
+pygmentsCodefencesGuessSyntax = true
+
+hasCJKLanguage = true # has chinese/japanese/korean ? # 自动检测是否包含 中文\日文\韩文
+paginate = 5 # 首页每页显示的文章数
+disqusShortname = "" # disqus_shortname
+googleAnalytics = "" # UA-XXXXXXXX-X
+copyright = "" # default: author.name ↓ # 默认为下面配置的author.name ↓
+
+[author] # essential # 必需
+ name = "GNUxeava"
+
+[sitemap] # essential # 必需
+ changefreq = "weekly"
+ priority = 0.5
+ filename = "sitemap.xml"
+
+[[menu.main]] # config your menu # 配置目录
+ name = "Home"
+ weight = 10
+ identifier = "home"
+ url = "/"
+[[menu.main]]
+ name = "Posts"
+ weight = 20
+ identifier = "archives"
+ url = "/post/"
+[[menu.main]]
+ name = "Tags"
+ weight = 30
+ identifier = "tags"
+ url = "/tags/"
+[[menu.main]]
+ name = "Categories"
+ weight = 40
+ identifier = "categories"
+ url = "/categories/"
+
+[params]
+ version = "4.x" # Used to give a friendly message when you have an incompatible update
+ debug = false # If true, load `eruda.min.js`. See https://github.com/liriliri/eruda
+
+ since = "2022" # Site creation time # 站点建立时间
+ # use public git repo url to link lastmod git commit, enableGitInfo should be true.
+ # 指定 git 仓库地址,可以生成指向最近更新的 git commit 的链接,需要将 enableGitInfo 设置成 true.
+ gitRepo = "https://banyan.divineduty.xyz/GNUxeava/divine-chronicles"
+
+ # site info (optional) # 站点信息(可选,不需要的可以直接注释掉)
+ logoTitle = "The Divine Chronicles" # default: the title value # 默认值: 上面设置的title值
+ keywords = ["blog", "hugo"]
+ description = "Home of my blog posts."
+
+ # paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目,建议修改为一个较大的值
+ archivePaginate = 50
+
+ # show 'xx Posts In Total' in archive page ? # 是否在归档页显示文章的总数
+ showArchiveCount = true
+
+ # The date format to use; for a list of valid formats, see https://gohugo.io/functions/format/
+ dateFormatToUse = "2006-01-02"
+
+ # show word count and read time ? # 是否显示字数统计与阅读时间
+ moreMeta = true
+
+ # Syntax highlighting by highlight.js
+ highlightInClient = false
+
+ # 一些全局开关,你也可以在每一篇内容的 front matter 中针对单篇内容关闭或开启某些功能,在 archetypes/default.md 查看更多信息。
+ # Some global options, you can also close or open something in front matter for a single post, see more information from `archetypes/default.md`.
+ toc = true # 是否开启目录
+ autoCollapseToc = false # Auto expand and collapse toc # 目录自动展开/折叠
+ fancybox = true # see https://github.com/fancyapps/fancybox # 是否启用fancybox(图片可点击)
+
+ # mathjax
+ mathjax = false # see https://www.mathjax.org/ # 是否使用mathjax(数学公式)
+ mathjaxEnableSingleDollar = false # 是否使用 $...$ 即可進行inline latex渲染
+ mathjaxEnableAutoNumber = false # 是否使用公式自动编号
+ mathjaxUseLocalFiles = false # You should install mathjax in `your-site/static/lib/mathjax`
+
+ postMetaInFooter = true # contain author, lastMod, markdown link, license # 包含作者,上次修改时间,markdown链接,许可信息
+ linkToMarkDown = false # Only effective when hugo will output .md files. # 链接到markdown原始文件(仅当允许hugo生成markdown文件时有效)
+ contentCopyright = ' This work is licensed under a Creative Commons Attribution 4.0 International License' # e.g. 'CC BY-NC-ND 4.0'
+
+ # Link custom CSS and JS assets
+ # (relative to /static/css and /static/js respectively)
+ customCSS = []
+ customJS = []
+
+ uglyURLs = false # please keep same with uglyurls setting
+
+ # Show language selector for multilingual site.
+ showLanguageSelector = false
+
+ [params.publicCDN] # load these files from public cdn # 启用公共CDN,需自行定义
+ enable = true
+ jquery = ''
+ slideout = ''
+ fancyboxJS = ''
+ fancyboxCSS = ''
+ timeagoJS = ''
+ timeagoLocalesJS = ''
+ flowchartDiagramsJS = ' '
+ sequenceDiagramsCSS = ''
+ sequenceDiagramsJS = ' '
+
+ # Display a message at the beginning of an article to warn the readers that it's content may be outdated.
+ # 在文章开头显示提示信息,提醒读者文章内容可能过时。
+ [params.outdatedInfoWarning]
+ enable = false
+ hint = 30 # Display hint if the last modified time is more than these days ago. # 如果文章最后更新于这天数之前,显示提醒
+ warn = 180 # Display warning if the last modified time is more than these days ago. # 如果文章最后更新于这天数之前,显示警告
+
+ [params.flowchartDiagrams]# see https://blog.olowolo.com/example-site/post/js-flowchart-diagrams/
+ enable = false
+ options = ""
+
+ [params.sequenceDiagrams] # see https://blog.olowolo.com/example-site/post/js-sequence-diagrams/
+ enable = false
+ options = "" # default: "{theme: 'simple'}"
+
+# See https://gohugo.io/about/hugo-and-gdpr/
+[privacy]
+ [privacy.googleAnalytics]
+ anonymizeIP = true # 12.214.31.144 -> 12.214.31.0
+ [privacy.youtube]
+ privacyEnhanced = true
+
+# see https://gohugo.io/getting-started/configuration-markup
+[markup]
+ [markup.tableOfContents]
+ startLevel = 1
+ [markup.goldmark.renderer]
+ unsafe = true
+
+# 将下面这段配置取消注释可以使 hugo 生成 .md 文件
+# Uncomment these options to make hugo output .md files.
+#[mediaTypes]
+# [mediaTypes."text/plain"]
+# suffixes = ["md"]
+#
+#[outputFormats.MarkDown]
+# mediaType = "text/plain"
+# isPlainText = true
+# isHTML = false
+#
+#[outputs]
+# home = ["HTML", "RSS"]
+# page = ["HTML", "MarkDown"]
+# section = ["HTML", "RSS"]
+# taxonomy = ["HTML", "RSS"]
+# taxonomyTerm = ["HTML"]
diff --git a/content/about.md b/content/about.md
new file mode 100644
index 0000000..e69de29
diff --git a/content/post/english-preview.md b/content/post/english-preview.md
new file mode 100644
index 0000000..02693ab
--- /dev/null
+++ b/content/post/english-preview.md
@@ -0,0 +1,1150 @@
+---
+title: "[English] Creating a New Theme"
+date: 2017-08-31T15:43:48+08:00
+lastmod: 2017-08-31T15:43:48+08:00
+draft: false
+tags: ["preview", "English", "tag-2"]
+categories: ["English"]
+author: "Michael Henderson"
+
+autoCollapseToc: true
+contentCopyright: 'See origin'
+
+---
+
+## Introduction
+
+This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I'll explain how Hugo uses templates and how you can organize your templates to create a theme. I won't cover using CSS to style your theme.
+
+We'll start with creating a new site with a very basic template. Then we'll add in a few pages and posts. With small variations on that, you will be able to create many different types of web sites.
+
+In this tutorial, commands that you enter will start with the "$" prompt. The output will follow. Lines that start with "#" are comments that I've added to explain a point. When I show updates to a file, the ":wq" on the last line means to save the file.
+
+Here's an example:
+
+```
+## this is a comment
+$ echo this is a command
+this is a command
+
+## edit the file
+$vi foo.md
++++
+date = "2014-09-28"
+title = "creating a new theme"
++++
+
+bah and humbug
+:wq
+
+## show it
+$ cat foo.md
++++
+date = "2014-09-28"
+title = "creating a new theme"
++++
+
+bah and humbug
+$
+```
+
+
+## Some Definitions
+
+There are a few concepts that you need to understand before creating a theme.
+
+### Skins
+
+Skins are the files responsible for the look and feel of your site. It’s the CSS that controls colors and fonts, it’s the Javascript that determines actions and reactions. It’s also the rules that Hugo uses to transform your content into the HTML that the site will serve to visitors.
+
+You have two ways to create a skin. The simplest way is to create it in the ```layouts/``` directory. If you do, then you don’t have to worry about configuring Hugo to recognize it. The first place that Hugo will look for rules and files is in the ```layouts/``` directory so it will always find the skin.
+
+Your second choice is to create it in a sub-directory of the ```themes/``` directory. If you do, then you must always tell Hugo where to search for the skin. It’s extra work, though, so why bother with it?
+
+The difference between creating a skin in ```layouts/``` and creating it in ```themes/``` is very subtle. A skin in ```layouts/``` can’t be customized without updating the templates and static files that it is built from. A skin created in ```themes/```, on the other hand, can be and that makes it easier for other people to use it.
+
+The rest of this tutorial will call a skin created in the ```themes/``` directory a theme.
+
+Note that you can use this tutorial to create a skin in the ```layouts/``` directory if you wish to. The main difference will be that you won’t need to update the site’s configuration file to use a theme.
+
+### The Home Page
+
+The home page, or landing page, is the first page that many visitors to a site see. It is the index.html file in the root directory of the web site. Since Hugo writes files to the public/ directory, our home page is public/index.html.
+
+### Site Configuration File
+
+When Hugo runs, it looks for a configuration file that contains settings that override default values for the entire site. The file can use TOML, YAML, or JSON. I prefer to use TOML for my configuration files. If you prefer to use JSON or YAML, you’ll need to translate my examples. You’ll also need to change the name of the file since Hugo uses the extension to determine how to process it.
+
+Hugo translates Markdown files into HTML. By default, Hugo expects to find Markdown files in your ```content/``` directory and template files in your ```themes/``` directory. It will create HTML files in your ```public/``` directory. You can change this by specifying alternate locations in the configuration file.
+
+### Content
+
+Content is stored in text files that contain two sections. The first section is the “front matter,” which is the meta-information on the content. The second section contains Markdown that will be converted to HTML.
+
+#### Front Matter
+
+The front matter is information about the content. Like the configuration file, it can be written in TOML, YAML, or JSON. Unlike the configuration file, Hugo doesn’t use the file’s extension to know the format. It looks for markers to signal the type. TOML is surrounded by “`+++`”, YAML by “`---`”, and JSON is enclosed in curly braces. I prefer to use TOML, so you’ll need to translate my examples if you prefer YAML or JSON.
+
+The information in the front matter is passed into the template before the content is rendered into HTML.
+
+#### Markdown
+
+Content is written in Markdown which makes it easier to create the content. Hugo runs the content through a Markdown engine to create the HTML which will be written to the output file.
+
+### Template Files
+
+Hugo uses template files to render content into HTML. Template files are a bridge between the content and presentation. Rules in the template define what content is published, where it's published to, and how it will rendered to the HTML file. The template guides the presentation by specifying the style to use.
+
+There are three types of templates: single, list, and partial. Each type takes a bit of content as input and transforms it based on the commands in the template.
+
+Hugo uses its knowledge of the content to find the template file used to render the content. If it can’t find a template that is an exact match for the content, it will shift up a level and search from there. It will continue to do so until it finds a matching template or runs out of templates to try. If it can’t find a template, it will use the default template for the site.
+
+Please note that you can use the front matter to influence Hugo’s choice of templates.
+
+#### Single Template
+
+A single template is used to render a single piece of content. For example, an article or post would be a single piece of content and use a single template.
+
+#### List Template
+
+A list template renders a group of related content. That could be a summary of recent postings or all articles in a category. List templates can contain multiple groups.
+
+The homepage template is a special type of list template. Hugo assumes that the home page of your site will act as the portal for the rest of the content in the site.
+
+#### Partial Template
+
+A partial template is a template that can be included in other templates. Partial templates must be called using the “partial” template command. They are very handy for rolling up common behavior. For example, your site may have a banner that all pages use. Instead of copying the text of the banner into every single and list template, you could create a partial with the banner in it. That way if you decide to change the banner, you only have to change the partial template.
+
+## Create a New Site
+
+Let's use Hugo to create a new web site. I'm a Mac user, so I'll create mine in my home directory, in the Sites folder. If you're using Linux, you might have to create the folder first.
+
+The "new site" command will create a skeleton of a site. It will give you the basic directory structure and a useable configuration file.
+
+```
+$ hugo new site ~/Sites/zafta
+$ cd ~/Sites/zafta
+$ ls -l
+total 8
+drwxr-xr-x 7 quoha staff 238 Sep 29 16:49 .
+drwxr-xr-x 3 quoha staff 102 Sep 29 16:49 ..
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
+-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
+$
+```
+
+Take a look in the content/ directory to confirm that it is empty.
+
+The other directories (archetypes/, layouts/, and static/) are used when customizing a theme. That's a topic for a different tutorial, so please ignore them for now.
+
+### Generate the HTML For the New Site
+
+Running the `hugo` command with no options will read all the available content and generate the HTML files. It will also copy all static files (that's everything that's not content). Since we have an empty site, it won't do much, but it will do it very quickly.
+
+```
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+WARN: 2014/09/29 Unable to locate layout: [404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+$
+```
+
+The "`--verbose`" flag gives extra information that will be helpful when we build the template. Every line of the output that starts with "INFO:" or "WARN:" is present because we used that flag. The lines that start with "WARN:" are warning messages. We'll go over them later.
+
+We can verify that the command worked by looking at the directory again.
+
+```
+$ ls -l
+total 8
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
+-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
+$
+```
+
+See that new public/ directory? Hugo placed all generated content there. When you're ready to publish your web site, that's the place to start. For now, though, let's just confirm that we have what we'd expect from a site with no content.
+
+```
+$ ls -l public
+total 16
+-rw-r--r-- 1 quoha staff 416 Sep 29 17:02 index.xml
+-rw-r--r-- 1 quoha staff 262 Sep 29 17:02 sitemap.xml
+$
+```
+
+Hugo created two XML files, which is standard, but there are no HTML files.
+
+
+
+### Test the New Site
+
+Verify that you can run the built-in web server. It will dramatically shorten your development cycle if you do. Start it by running the "server" command. If it is successful, you will see output similar to the following:
+
+```
+$ hugo server --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+WARN: 2014/09/29 Unable to locate layout: [404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+Serving pages from /Users/quoha/Sites/zafta/public
+Web Server is available at http://localhost:1313
+Press Ctrl+C to stop
+```
+
+Connect to the listed URL (it's on the line that starts with "Web Server"). If everything is working correctly, you should get a page that shows the following:
+
+```
+index.xml
+sitemap.xml
+```
+
+That's a listing of your public/ directory. Hugo didn't create a home page because our site has no content. When there's no index.html file in a directory, the server lists the files in the directory, which is what you should see in your browser.
+
+Let’s go back and look at those warnings again.
+
+```
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+WARN: 2014/09/29 Unable to locate layout: [404.html]
+```
+
+That second warning is easier to explain. We haven’t created a template to be used to generate “page not found errors.” The 404 message is a topic for a separate tutorial.
+
+Now for the first warning. It is for the home page. You can tell because the first layout that it looked for was “index.html.” That’s only used by the home page.
+
+I like that the verbose flag causes Hugo to list the files that it's searching for. For the home page, they are index.html, _default/list.html, and _default/single.html. There are some rules that we'll cover later that explain the names and paths. For now, just remember that Hugo couldn't find a template for the home page and it told you so.
+
+At this point, you've got a working installation and site that we can build upon. All that’s left is to add some content and a theme to display it.
+
+## Create a New Theme
+
+Hugo doesn't ship with a default theme. There are a few available (I counted a dozen when I first installed Hugo) and Hugo comes with a command to create new themes.
+
+We're going to create a new theme called "zafta." Since the goal of this tutorial is to show you how to fill out the files to pull in your content, the theme will not contain any CSS. In other words, ugly but functional.
+
+All themes have opinions on content and layout. For example, Zafta uses "post" over "blog". Strong opinions make for simpler templates but differing opinions make it tougher to use themes. When you build a theme, consider using the terms that other themes do.
+
+
+### Create a Skeleton
+
+Use the hugo "new" command to create the skeleton of a theme. This creates the directory structure and places empty files for you to fill out.
+
+```
+$ hugo new theme zafta
+
+$ ls -l
+total 8
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
+-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
+drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes
+
+$ find themes -type f | xargs ls -l
+-rw-r--r-- 1 quoha staff 1081 Sep 29 17:31 themes/zafta/LICENSE.md
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/archetypes/default.md
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
+-rw-r--r-- 1 quoha staff 93 Sep 29 17:31 themes/zafta/theme.toml
+$
+```
+
+The skeleton includes templates (the files ending in .html), license file, a description of your theme (the theme.toml file), and an empty archetype.
+
+Please take a minute to fill out the theme.toml and LICENSE.md files. They're optional, but if you're going to be distributing your theme, it tells the world who to praise (or blame). It's also nice to declare the license so that people will know how they can use the theme.
+
+```
+$ vi themes/zafta/theme.toml
+author = "michael d henderson"
+description = "a minimal working template"
+license = "MIT"
+name = "zafta"
+source_repo = ""
+tags = ["tags", "categories"]
+:wq
+
+## also edit themes/zafta/LICENSE.md and change
+## the bit that says "YOUR_NAME_HERE"
+```
+
+Note that the the skeleton's template files are empty. Don't worry, we'll be changing that shortly.
+
+```
+$ find themes/zafta -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
+$
+```
+
+
+
+### Update the Configuration File to Use the Theme
+
+Now that we've got a theme to work with, it's a good idea to add the theme name to the configuration file. This is optional, because you can always add "-t zafta" on all your commands. I like to put it the configuration file because I like shorter command lines. If you don't put it in the configuration file or specify it on the command line, you won't use the template that you're expecting to.
+
+Edit the file to add the theme, add a title for the site, and specify that all of our content will use the TOML format.
+
+```
+$ vi config.toml
+theme = "zafta"
+baseurl = ""
+languageCode = "en-us"
+title = "zafta - totally refreshing"
+MetaDataFormat = "toml"
+:wq
+
+$
+```
+
+### Generate the Site
+
+Now that we have an empty theme, let's generate the site again.
+
+```
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+$
+```
+
+Did you notice that the output is different? The warning message for the home page has disappeared and we have an additional information line saying that Hugo is syncing from the theme's directory.
+
+Let's check the public/ directory to see what Hugo's created.
+
+```
+$ ls -l public
+total 16
+drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 css
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:56 index.html
+-rw-r--r-- 1 quoha staff 407 Sep 29 17:56 index.xml
+drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 js
+-rw-r--r-- 1 quoha staff 243 Sep 29 17:56 sitemap.xml
+$
+```
+
+Notice four things:
+
+1. Hugo created a home page. This is the file public/index.html.
+2. Hugo created a css/ directory.
+3. Hugo created a js/ directory.
+4. Hugo claimed that it created 0 pages. It created a file and copied over static files, but didn't create any pages. That's because it considers a "page" to be a file created directly from a content file. It doesn't count things like the index.html files that it creates automatically.
+
+#### The Home Page
+
+Hugo supports many different types of templates. The home page is special because it gets its own type of template and its own template file. The file, layouts/index.html, is used to generate the HTML for the home page. The Hugo documentation says that this is the only required template, but that depends. Hugo's warning message shows that it looks for three different templates:
+
+```
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+```
+
+If it can't find any of these, it completely skips creating the home page. We noticed that when we built the site without having a theme installed.
+
+When Hugo created our theme, it created an empty home page template. Now, when we build the site, Hugo finds the template and uses it to generate the HTML for the home page. Since the template file is empty, the HTML file is empty, too. If the template had any rules in it, then Hugo would have used them to generate the home page.
+
+```
+$ find . -name index.html | xargs ls -l
+-rw-r--r-- 1 quoha staff 0 Sep 29 20:21 ./public/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 ./themes/zafta/layouts/index.html
+$
+```
+
+#### The Magic of Static
+
+Hugo does two things when generating the site. It uses templates to transform content into HTML and it copies static files into the site. Unlike content, static files are not transformed. They are copied exactly as they are.
+
+Hugo assumes that your site will use both CSS and JavaScript, so it creates directories in your theme to hold them. Remember opinions? Well, Hugo's opinion is that you'll store your CSS in a directory named css/ and your JavaScript in a directory named js/. If you don't like that, you can change the directory names in your theme directory or even delete them completely. Hugo's nice enough to offer its opinion, then behave nicely if you disagree.
+
+```
+$ find themes/zafta -type d | xargs ls -ld
+drwxr-xr-x 7 quoha staff 238 Sep 29 17:38 themes/zafta
+drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes/zafta/archetypes
+drwxr-xr-x 5 quoha staff 170 Sep 29 17:31 themes/zafta/layouts
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/_default
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/partials
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/static
+drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/css
+drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/js
+$
+```
+
+## The Theme Development Cycle
+
+When you're working on a theme, you will make changes in the theme's directory, rebuild the site, and check your changes in the browser. Hugo makes this very easy:
+
+1. Purge the public/ directory.
+2. Run the built in web server in watch mode.
+3. Open your site in a browser.
+4. Update the theme.
+5. Glance at your browser window to see changes.
+6. Return to step 4.
+
+I’ll throw in one more opinion: never work on a theme on a live site. Always work on a copy of your site. Make changes to your theme, test them, then copy them up to your site. For added safety, use a tool like Git to keep a revision history of your content and your theme. Believe me when I say that it is too easy to lose both your mind and your changes.
+
+Check the main Hugo site for information on using Git with Hugo.
+
+### Purge the public/ Directory
+
+When generating the site, Hugo will create new files and update existing ones in the ```public/``` directory. It will not delete files that are no longer used. For example, files that were created in the wrong directory or with the wrong title will remain. If you leave them, you might get confused by them later. I recommend cleaning out your site prior to generating it.
+
+Note: If you're building on an SSD, you should ignore this. Churning on a SSD can be costly.
+
+### Hugo's Watch Option
+
+Hugo's "`--watch`" option will monitor the content/ and your theme directories for changes and rebuild the site automatically.
+
+### Live Reload
+
+Hugo's built in web server supports live reload. As pages are saved on the server, the browser is told to refresh the page. Usually, this happens faster than you can say, "Wow, that's totally amazing."
+
+### Development Commands
+
+Use the following commands as the basis for your workflow.
+
+```
+## purge old files. hugo will recreate the public directory.
+##
+$ rm -rf public
+##
+## run hugo in watch mode
+##
+$ hugo server --watch --verbose
+```
+
+Here's sample output showing Hugo detecting a change to the template for the home page. Once generated, the web browser automatically reloaded the page. I've said this before, it's amazing.
+
+
+```
+$ rm -rf public
+$ hugo server --watch --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+Watching for changes in /Users/quoha/Sites/zafta/content
+Serving pages from /Users/quoha/Sites/zafta/public
+Web Server is available at http://localhost:1313
+Press Ctrl+C to stop
+INFO: 2014/09/29 File System Event: ["/Users/quoha/Sites/zafta/themes/zafta/layouts/index.html": MODIFY|ATTRIB]
+Change detected, rebuilding site
+
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 1 ms
+```
+
+## Update the Home Page Template
+
+The home page is one of a few special pages that Hugo creates automatically. As mentioned earlier, it looks for one of three files in the theme's layout/ directory:
+
+1. index.html
+2. _default/list.html
+3. _default/single.html
+
+We could update one of the default templates, but a good design decision is to update the most specific template available. That's not a hard and fast rule (in fact, we'll break it a few times in this tutorial), but it is a good generalization.
+
+### Make a Static Home Page
+
+Right now, that page is empty because we don't have any content and we don't have any logic in the template. Let's change that by adding some text to the template.
+
+```
+$ vi themes/zafta/layouts/index.html
+
+
+
+
hugo says hello!
+
+
+:wq
+
+$
+```
+
+Build the web site and then verify the results.
+
+```
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 78 Sep 29 21:26 public/index.html
+
+$ cat public/index.html
+
+
+
+
hugo says hello!
+
+```
+
+#### Live Reload
+
+Note: If you're running the server with the `--watch` option, you'll see different content in the file:
+
+```
+$ cat public/index.html
+
+
+
+
hugo says hello!
+
+
+```
+
+When you use `--watch`, the Live Reload script is added by Hugo. Look for live reload in the documentation to see what it does and how to disable it.
+
+### Build a "Dynamic" Home Page
+
+"Dynamic home page?" Hugo's a static web site generator, so this seems an odd thing to say. I mean let's have the home page automatically reflect the content in the site every time Hugo builds it. We'll use iteration in the template to do that.
+
+#### Create New Posts
+
+Now that we have the home page generating static content, let's add some content to the site. We'll display these posts as a list on the home page and on their own page, too.
+
+Hugo has a command to generate a skeleton post, just like it does for sites and themes.
+
+```
+$ hugo --verbose new post/first.md
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 attempting to create post/first.md of post
+INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/default.md
+ERROR: 2014/09/29 Unable to Cast to map[string]interface{}
+
+$
+```
+
+That wasn't very nice, was it?
+
+The "new" command uses an archetype to create the post file. Hugo created an empty default archetype file, but that causes an error when there's a theme. For me, the workaround was to create an archetypes file specifically for the post type.
+
+```
+$ vi themes/zafta/archetypes/post.md
++++
+Description = ""
+Tags = []
+Categories = []
++++
+:wq
+
+$ find themes/zafta/archetypes -type f | xargs ls -l
+-rw-r--r-- 1 quoha staff 0 Sep 29 21:53 themes/zafta/archetypes/default.md
+-rw-r--r-- 1 quoha staff 51 Sep 29 21:54 themes/zafta/archetypes/post.md
+
+$ hugo --verbose new post/first.md
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 attempting to create post/first.md of post
+INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
+INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/first.md
+/Users/quoha/Sites/zafta/content/post/first.md created
+
+$ hugo --verbose new post/second.md
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 attempting to create post/second.md of post
+INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
+INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/second.md
+/Users/quoha/Sites/zafta/content/post/second.md created
+
+$ ls -l content/post
+total 16
+-rw-r--r-- 1 quoha staff 104 Sep 29 21:54 first.md
+-rw-r--r-- 1 quoha staff 105 Sep 29 21:57 second.md
+
+$ cat content/post/first.md
++++
+Categories = []
+Description = ""
+Tags = []
+date = "2014-09-29T21:54:53-05:00"
+title = "first"
+
++++
+my first post
+
+$ cat content/post/second.md
++++
+Categories = []
+Description = ""
+Tags = []
+date = "2014-09-29T21:57:09-05:00"
+title = "second"
+
++++
+my second post
+
+$
+```
+
+Build the web site and then verify the results.
+
+```
+$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"category":"categories", "tag":"tags"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+2 pages created
+0 tags created
+0 categories created
+in 4 ms
+$
+```
+
+The output says that it created 2 pages. Those are our new posts:
+
+```
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 78 Sep 29 22:13 public/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/first/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/second/index.html
+$
+```
+
+The new files are empty because because the templates used to generate the content are empty. The homepage doesn't show the new content, either. We have to update the templates to add the posts.
+
+### List and Single Templates
+
+In Hugo, we have three major kinds of templates. There's the home page template that we updated previously. It is used only by the home page. We also have "single" templates which are used to generate output for a single content file. We also have "list" templates that are used to group multiple pieces of content before generating output.
+
+Generally speaking, list templates are named "list.html" and single templates are named "single.html."
+
+There are three other types of templates: partials, content views, and terms. We will not go into much detail on these.
+
+### Add Content to the Homepage
+
+The home page will contain a list of posts. Let's update its template to add the posts that we just created. The logic in the template will run every time we build the site.
+
+```
+$ vi themes/zafta/layouts/index.html
+
+
+
+ {{ range first 10 .Data.Pages }}
+
{{ .Title }}
+ {{ end }}
+
+
+:wq
+
+$
+```
+
+Hugo uses the Go template engine. That engine scans the template files for commands which are enclosed between "{{" and "}}". In our template, the commands are:
+
+1. range
+2. .Title
+3. end
+
+The "range" command is an iterator. We're going to use it to go through the first ten pages. Every HTML file that Hugo creates is treated as a page, so looping through the list of pages will look at every file that will be created.
+
+The ".Title" command prints the value of the "title" variable. Hugo pulls it from the front matter in the Markdown file.
+
+The "end" command signals the end of the range iterator. The engine loops back to the top of the iteration when it finds "end." Everything between the "range" and "end" is evaluated every time the engine goes through the iteration. In this file, that would cause the title from the first ten pages to be output as heading level one.
+
+It's helpful to remember that some variables, like .Data, are created before any output files. Hugo loads every content file into the variable and then gives the template a chance to process before creating the HTML files.
+
+Build the web site and then verify the results.
+
+```
+$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+2 pages created
+0 tags created
+0 categories created
+in 4 ms
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 94 Sep 29 22:23 public/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/first/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/second/index.html
+$ cat public/index.html
+
+
+
+
+
second
+
+
first
+
+
+
+$
+```
+
+Congratulations, the home page shows the title of the two posts. The posts themselves are still empty, but let's take a moment to appreciate what we've done. Your template now generates output dynamically. Believe it or not, by inserting the range command inside of those curly braces, you've learned everything you need to know to build a theme. All that's really left is understanding which template will be used to generate each content file and becoming familiar with the commands for the template engine.
+
+And, if that were entirely true, this tutorial would be much shorter. There are a few things to know that will make creating a new template much easier. Don't worry, though, that's all to come.
+
+### Add Content to the Posts
+
+We're working with posts, which are in the content/post/ directory. That means that their section is "post" (and if we don't do something weird, their type is also "post").
+
+Hugo uses the section and type to find the template file for every piece of content. Hugo will first look for a template file that matches the section or type name. If it can't find one, then it will look in the _default/ directory. There are some twists that we'll cover when we get to categories and tags, but for now we can assume that Hugo will try post/single.html, then _default/single.html.
+
+Now that we know the search rule, let's see what we actually have available:
+
+```
+$ find themes/zafta -name single.html | xargs ls -l
+-rw-r--r-- 1 quoha staff 132 Sep 29 17:31 themes/zafta/layouts/_default/single.html
+```
+
+We could create a new template, post/single.html, or change the default. Since we don't know of any other content types, let's start with updating the default.
+
+Remember, any content that we haven't created a template for will end up using this template. That can be good or bad. Bad because I know that we're going to be adding different types of content and we're going to end up undoing some of the changes we've made. It's good because we'll be able to see immediate results. It's also good to start here because we can start to build the basic layout for the site. As we add more content types, we'll refactor this file and move logic around. Hugo makes that fairly painless, so we'll accept the cost and proceed.
+
+Please see the Hugo documentation on template rendering for all the details on determining which template to use. And, as the docs mention, if you're building a single page application (SPA) web site, you can delete all of the other templates and work with just the default single page. That's a refreshing amount of joy right there.
+
+#### Update the Template File
+
+```
+$ vi themes/zafta/layouts/_default/single.html
+
+
+
+ {{ .Title }}
+
+
+
{{ .Title }}
+ {{ .Content }}
+
+
+:wq
+
+$
+```
+
+Build the web site and verify the results.
+
+```
+$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+2 pages created
+0 tags created
+0 categories created
+in 4 ms
+
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 94 Sep 29 22:40 public/index.html
+-rw-r--r-- 1 quoha staff 125 Sep 29 22:40 public/post/first/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:40 public/post/index.html
+-rw-r--r-- 1 quoha staff 128 Sep 29 22:40 public/post/second/index.html
+
+$ cat public/post/first/index.html
+
+
+
+ first
+
+
+
+
+
+
+$
+```
+
+Notice that the posts now have content. You can go to localhost:1313/post/first to verify.
+
+### Linking to Content
+
+The posts are on the home page. Let's add a link from there to the post. Since this is the home page, we'll update its template.
+
+```
+$ vi themes/zafta/layouts/index.html
+
+
+
+ {{ range first 10 .Data.Pages }}
+
+
+
+
+
+$
+```
+
+### Create a Post Listing
+
+We have the posts displaying on the home page and on their own page. We also have a file public/post/index.html that is empty. Let's make it show a list of all posts (not just the first ten).
+
+We need to decide which template to update. This will be a listing, so it should be a list template. Let's take a quick look and see which list templates are available.
+
+```
+$ find themes/zafta -name list.html | xargs ls -l
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
+```
+
+As with the single post, we have to decide to update _default/list.html or create post/list.html. We still don't have multiple content types, so let's stay consistent and update the default list template.
+
+## Creating Top Level Pages
+
+Let's add an "about" page and display it at the top level (as opposed to a sub-level like we did with posts).
+
+The default in Hugo is to use the directory structure of the content/ directory to guide the location of the generated html in the public/ directory. Let's verify that by creating an "about" page at the top level:
+
+```
+$ vi content/about.md
++++
+title = "about"
+description = "about this site"
+date = "2014-09-27"
+slug = "about time"
++++
+
+## about us
+
+i'm speechless
+:wq
+```
+
+Generate the web site and verify the results.
+
+```
+$ find public -name '*.html' | xargs ls -l
+-rw-rw-r-- 1 mdhender staff 334 Sep 27 15:08 public/about-time/index.html
+-rw-rw-r-- 1 mdhender staff 527 Sep 27 15:08 public/index.html
+-rw-rw-r-- 1 mdhender staff 358 Sep 27 15:08 public/post/first-post/index.html
+-rw-rw-r-- 1 mdhender staff 0 Sep 27 15:08 public/post/index.html
+-rw-rw-r-- 1 mdhender staff 342 Sep 27 15:08 public/post/second-post/index.html
+```
+
+Notice that the page wasn't created at the top level. It was created in a sub-directory named 'about-time/'. That name came from our slug. Hugo will use the slug to name the generated content. It's a reasonable default, by the way, but we can learn a few things by fighting it for this file.
+
+One other thing. Take a look at the home page.
+
+```
+$ cat public/index.html
+
+
+
+
+
+
+```
+
+Notice that the "about" link is listed with the posts? That's not desirable, so let's change that first.
+
+```
+$ vi themes/zafta/layouts/index.html
+
+
+
+
posts
+ {{ range first 10 .Data.Pages }}
+ {{ if eq .Type "post"}}
+
+ {{ end }}
+ {{ end }}
+
+
+:wq
+```
+
+Generate the web site and verify the results. The home page has two sections, posts and pages, and each section has the right set of headings and links in it.
+
+But, that about page still renders to about-time/index.html.
+
+```
+$ find public -name '*.html' | xargs ls -l
+-rw-rw-r-- 1 mdhender staff 334 Sep 27 15:33 public/about-time/index.html
+-rw-rw-r-- 1 mdhender staff 645 Sep 27 15:33 public/index.html
+-rw-rw-r-- 1 mdhender staff 358 Sep 27 15:33 public/post/first-post/index.html
+-rw-rw-r-- 1 mdhender staff 0 Sep 27 15:33 public/post/index.html
+-rw-rw-r-- 1 mdhender staff 342 Sep 27 15:33 public/post/second-post/index.html
+```
+
+Knowing that hugo is using the slug to generate the file name, the simplest solution is to change the slug. Let's do it the hard way and change the permalink in the configuration file.
+
+```
+$ vi config.toml
+[permalinks]
+ page = "/:title/"
+ about = "/:filename/"
+```
+
+Generate the web site and verify that this didn't work. Hugo lets "slug" or "URL" override the permalinks setting in the configuration file. Go ahead and comment out the slug in content/about.md, then generate the web site to get it to be created in the right place.
+
+## Sharing Templates
+
+If you've been following along, you probably noticed that posts have titles in the browser and the home page doesn't. That's because we didn't put the title in the home page's template (layouts/index.html). That's an easy thing to do, but let's look at a different option.
+
+We can put the common bits into a shared template that's stored in the themes/zafta/layouts/partials/ directory.
+
+### Create the Header and Footer Partials
+
+In Hugo, a partial is a sugar-coated template. Normally a template reference has a path specified. Partials are different. Hugo searches for them along a TODO defined search path. This makes it easier for end-users to override the theme's presentation.
+
+```
+$ vi themes/zafta/layouts/partials/header.html
+
+
+
+ {{ .Title }}
+
+
+:wq
+
+$ vi themes/zafta/layouts/partials/footer.html
+
+
+:wq
+```
+
+### Update the Home Page Template to Use the Partials
+
+The most noticeable difference between a template call and a partials call is the lack of path:
+
+```
+{{ template "theme/partials/header.html" . }}
+```
+versus
+```
+{{ partial "header.html" . }}
+```
+Both pass in the context.
+
+Let's change the home page template to use these new partials.
+
+```
+$ vi themes/zafta/layouts/index.html
+{{ partial "header.html" . }}
+
+
posts
+ {{ range first 10 .Data.Pages }}
+ {{ if eq .Type "post"}}
+
+ {{ end }}
+ {{ end }}
+
+{{ partial "footer.html" . }}
+:wq
+```
+
+Generate the web site and verify the results. The title on the home page is now "your title here", which comes from the "title" variable in the config.toml file.
+
+### Update the Default Single Template to Use the Partials
+
+```
+$ vi themes/zafta/layouts/_default/single.html
+{{ partial "header.html" . }}
+
+
{{ .Title }}
+ {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+```
+
+Generate the web site and verify the results. The title on the posts and the about page should both reflect the value in the markdown file.
+
+## Add “Date Published” to Posts
+
+It's common to have posts display the date that they were written or published, so let's add that. The front matter of our posts has a variable named "date." It's usually the date the content was created, but let's pretend that's the value we want to display.
+
+### Add “Date Published” to the Template
+
+We'll start by updating the template used to render the posts. The template code will look like:
+
+```
+{{ .Date.Format "Mon, Jan 2, 2006" }}
+```
+
+Posts use the default single template, so we'll change that file.
+
+```
+$ vi themes/zafta/layouts/_default/single.html
+{{ partial "header.html" . }}
+
+
{{ .Title }}
+
{{ .Date.Format "Mon, Jan 2, 2006" }}
+ {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+```
+
+Generate the web site and verify the results. The posts now have the date displayed in them. There's a problem, though. The "about" page also has the date displayed.
+
+As usual, there are a couple of ways to make the date display only on posts. We could do an "if" statement like we did on the home page. Another way would be to create a separate template for posts.
+
+The "if" solution works for sites that have just a couple of content types. It aligns with the principle of "code for today," too.
+
+Let's assume, though, that we've made our site so complex that we feel we have to create a new template type. In Hugo-speak, we're going to create a section template.
+
+Let's restore the default single template before we forget.
+
+```
+$ mkdir themes/zafta/layouts/post
+$ vi themes/zafta/layouts/_default/single.html
+{{ partial "header.html" . }}
+
+
{{ .Title }}
+ {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+```
+
+Now we'll update the post's version of the single template. If you remember Hugo's rules, the template engine will use this version over the default.
+
+```
+$ vi themes/zafta/layouts/post/single.html
+{{ partial "header.html" . }}
+
+
{{ .Title }}
+
{{ .Date.Format "Mon, Jan 2, 2006" }}
+ {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+
+```
+
+Note that we removed the date logic from the default template and put it in the post template. Generate the web site and verify the results. Posts have dates and the about page doesn't.
+
+### Don't Repeat Yourself
+
+DRY is a good design goal and Hugo does a great job supporting it. Part of the art of a good template is knowing when to add a new template and when to update an existing one. While you're figuring that out, accept that you'll be doing some refactoring. Hugo makes that easy and fast, so it's okay to delay splitting up a template.
diff --git a/content/post/wow.md b/content/post/wow.md
new file mode 100644
index 0000000..630820b
--- /dev/null
+++ b/content/post/wow.md
@@ -0,0 +1,43 @@
+---
+title: "Wow"
+date: 2022-03-11T07:22:33+05:30
+lastmod: 2022-03-11T07:22:33+05:30
+draft: false
+keywords: []
+description: ""
+tags: []
+categories: []
+author: ""
+
+# You can also close(false) or open(true) something for this content.
+# P.S. comment can only be closed
+comment: false
+toc: false
+autoCollapseToc: false
+postMetaInFooter: false
+hiddenFromHomePage: false
+# You can also define another contentCopyright. e.g. contentCopyright: "This is another copyright."
+contentCopyright: false
+reward: false
+mathjax: false
+mathjaxEnableSingleDollar: false
+mathjaxEnableAutoNumber: false
+
+# You unlisted posts you might want not want the header or footer to show
+hideHeaderAndFooter: false
+
+# You can enable or disable out-of-date content warning for individual post.
+# Comment this out to use the global config.
+#enableOutdatedInfoWarning: false
+
+flowchartDiagrams:
+ enable: false
+ options: ""
+
+sequenceDiagrams:
+ enable: false
+ options: ""
+
+---
+Some stuff ( ^-^)/
+
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
new file mode 100644
index 0000000..05a3998
--- /dev/null
+++ b/exampleSite/config.toml
@@ -0,0 +1,231 @@
+baseURL = "http://localhost:1313/"
+languageCode = "en"
+defaultContentLanguage = "en" # en / zh-cn / ... (This field determines which i18n file to use)
+title = "Even - A super concise theme for Hugo"
+preserveTaxonomyNames = true
+enableRobotsTXT = true
+enableEmoji = true
+theme = "even"
+enableGitInfo = false # use git commit log to generate lastmod record # 可根据 Git 中的提交生成最近更新记录。
+
+# Syntax highlighting by Chroma. NOTE: Don't enable `highlightInClient` and `chroma` at the same time!
+pygmentsOptions = "linenos=table"
+pygmentsCodefences = true
+pygmentsUseClasses = true
+pygmentsCodefencesGuessSyntax = true
+
+hasCJKLanguage = true # has chinese/japanese/korean ? # 自动检测是否包含 中文\日文\韩文
+paginate = 5 # 首页每页显示的文章数
+disqusShortname = "" # disqus_shortname
+googleAnalytics = "" # UA-XXXXXXXX-X
+copyright = "" # default: author.name ↓ # 默认为下面配置的author.name ↓
+
+[author] # essential # 必需
+ name = "olOwOlo"
+
+[sitemap] # essential # 必需
+ changefreq = "weekly"
+ priority = 0.5
+ filename = "sitemap.xml"
+
+[[menu.main]] # config your menu # 配置目录
+ name = "Home"
+ weight = 10
+ identifier = "home"
+ url = "/"
+[[menu.main]]
+ name = "Archives"
+ weight = 20
+ identifier = "archives"
+ url = "/post/"
+[[menu.main]]
+ name = "Tags"
+ weight = 30
+ identifier = "tags"
+ url = "/tags/"
+[[menu.main]]
+ name = "Categories"
+ weight = 40
+ identifier = "categories"
+ url = "/categories/"
+
+[params]
+ version = "4.x" # Used to give a friendly message when you have an incompatible update
+ debug = false # If true, load `eruda.min.js`. See https://github.com/liriliri/eruda
+
+ since = "2017" # Site creation time # 站点建立时间
+ # use public git repo url to link lastmod git commit, enableGitInfo should be true.
+ # 指定 git 仓库地址,可以生成指向最近更新的 git commit 的链接,需要将 enableGitInfo 设置成 true.
+ gitRepo = ""
+
+ # site info (optional) # 站点信息(可选,不需要的可以直接注释掉)
+ logoTitle = "Even" # default: the title value # 默认值: 上面设置的title值
+ keywords = ["Hugo", "theme","even"]
+ description = "Hugo theme even example site."
+
+ # paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目,建议修改为一个较大的值
+ archivePaginate = 50
+
+ # show 'xx Posts In Total' in archive page ? # 是否在归档页显示文章的总数
+ showArchiveCount = false
+
+ # The date format to use; for a list of valid formats, see https://gohugo.io/functions/format/
+ dateFormatToUse = "2006-01-02"
+
+ # show word count and read time ? # 是否显示字数统计与阅读时间
+ moreMeta = false
+
+ # Syntax highlighting by highlight.js
+ highlightInClient = false
+
+ # 一些全局开关,你也可以在每一篇内容的 front matter 中针对单篇内容关闭或开启某些功能,在 archetypes/default.md 查看更多信息。
+ # Some global options, you can also close or open something in front matter for a single post, see more information from `archetypes/default.md`.
+ toc = true # 是否开启目录
+ autoCollapseToc = false # Auto expand and collapse toc # 目录自动展开/折叠
+ fancybox = true # see https://github.com/fancyapps/fancybox # 是否启用fancybox(图片可点击)
+
+ # mathjax
+ mathjax = false # see https://www.mathjax.org/ # 是否使用mathjax(数学公式)
+ mathjaxEnableSingleDollar = false # 是否使用 $...$ 即可進行inline latex渲染
+ mathjaxEnableAutoNumber = false # 是否使用公式自动编号
+ mathjaxUseLocalFiles = false # You should install mathjax in `your-site/static/lib/mathjax`
+
+ postMetaInFooter = true # contain author, lastMod, markdown link, license # 包含作者,上次修改时间,markdown链接,许可信息
+ linkToMarkDown = false # Only effective when hugo will output .md files. # 链接到markdown原始文件(仅当允许hugo生成markdown文件时有效)
+ contentCopyright = '' # e.g. 'CC BY-NC-ND 4.0'
+
+ changyanAppid = "" # Changyan app id # 畅言
+ changyanAppkey = "" # Changyan app key
+
+ livereUID = "" # LiveRe UID # 来必力
+
+ baiduPush = false # baidu push # 百度
+ baiduAnalytics = "" # Baidu Analytics
+ baiduVerification = "" # Baidu Verification
+ googleVerification = "" # Google Verification # 谷歌
+
+ # Link custom CSS and JS assets
+ # (relative to /static/css and /static/js respectively)
+ customCSS = []
+ customJS = []
+
+ uglyURLs = false # please keep same with uglyurls setting
+
+ # Show language selector for multilingual site.
+ showLanguageSelector = false
+
+ [params.publicCDN] # load these files from public cdn # 启用公共CDN,需自行定义
+ enable = true
+ jquery = ''
+ slideout = ''
+ fancyboxJS = ''
+ fancyboxCSS = ''
+ timeagoJS = ''
+ timeagoLocalesJS = ''
+ flowchartDiagramsJS = ' '
+ sequenceDiagramsCSS = ''
+ sequenceDiagramsJS = ' '
+
+ # Display a message at the beginning of an article to warn the readers that it's content may be outdated.
+ # 在文章开头显示提示信息,提醒读者文章内容可能过时。
+ [params.outdatedInfoWarning]
+ enable = false
+ hint = 30 # Display hint if the last modified time is more than these days ago. # 如果文章最后更新于这天数之前,显示提醒
+ warn = 180 # Display warning if the last modified time is more than these days ago. # 如果文章最后更新于这天数之前,显示警告
+
+ [params.gitment] # Gitment is a comment system based on GitHub issues. see https://github.com/imsun/gitment
+ owner = "" # Your GitHub ID
+ repo = "" # The repo to store comments
+ clientId = "" # Your client ID
+ clientSecret = "" # Your client secret
+
+ [params.utterances] # https://utteranc.es/
+ owner = "" # Your GitHub ID
+ repo = "" # The repo to store comments
+
+ [params.gitalk] # Gitalk is a comment system based on GitHub issues. see https://github.com/gitalk/gitalk
+ owner = "" # Your GitHub ID
+ repo = "" # The repo to store comments
+ clientId = "" # Your client ID
+ clientSecret = "" # Your client secret
+
+ # Valine.
+ # You can get your appid and appkey from https://leancloud.cn
+ # more info please open https://valine.js.org
+ [params.valine]
+ enable = false
+ appId = '你的appId'
+ appKey = '你的appKey'
+ notify = false # mail notifier , https://github.com/xCss/Valine/wiki
+ verify = false # Verification code
+ avatar = 'mm'
+ placeholder = '说点什么吧...'
+ visitor = false
+
+ [params.flowchartDiagrams]# see https://blog.olowolo.com/example-site/post/js-flowchart-diagrams/
+ enable = false
+ options = ""
+
+ [params.sequenceDiagrams] # see https://blog.olowolo.com/example-site/post/js-sequence-diagrams/
+ enable = false
+ options = "" # default: "{theme: 'simple'}"
+
+ [params.busuanzi] # count web traffic by busuanzi # 是否使用不蒜子统计站点访问量
+ enable = false
+ siteUV = true
+ sitePV = true
+ pagePV = true
+
+ [params.reward] # 文章打赏
+ enable = false
+ wechat = "/path/to/your/wechat-qr-code.png" # 微信二维码
+ alipay = "/path/to/your/alipay-qr-code.png" # 支付宝二维码
+
+ [params.social] # 社交链接
+ a-email = "mailto:your@email.com"
+ b-stack-overflow = "http://localhost:1313"
+ c-twitter = "http://localhost:1313"
+ d-facebook = "http://localhost:1313"
+ e-linkedin = "http://localhost:1313"
+ f-google = "http://localhost:1313"
+ g-github = "http://localhost:1313"
+ h-weibo = "http://localhost:1313"
+ i-zhihu = "http://localhost:1313"
+ j-douban = "http://localhost:1313"
+ k-pocket = "http://localhost:1313"
+ l-tumblr = "http://localhost:1313"
+ m-instagram = "http://localhost:1313"
+ n-gitlab = "http://localhost:1313"
+ o-bilibili = "http://localhost:1313"
+
+# See https://gohugo.io/about/hugo-and-gdpr/
+[privacy]
+ [privacy.googleAnalytics]
+ anonymizeIP = true # 12.214.31.144 -> 12.214.31.0
+ [privacy.youtube]
+ privacyEnhanced = true
+
+# see https://gohugo.io/getting-started/configuration-markup
+[markup]
+ [markup.tableOfContents]
+ startLevel = 1
+ [markup.goldmark.renderer]
+ unsafe = true
+
+# 将下面这段配置取消注释可以使 hugo 生成 .md 文件
+# Uncomment these options to make hugo output .md files.
+#[mediaTypes]
+# [mediaTypes."text/plain"]
+# suffixes = ["md"]
+#
+#[outputFormats.MarkDown]
+# mediaType = "text/plain"
+# isPlainText = true
+# isHTML = false
+#
+#[outputs]
+# home = ["HTML", "RSS"]
+# page = ["HTML", "MarkDown"]
+# section = ["HTML", "RSS"]
+# taxonomy = ["HTML", "RSS"]
+# taxonomyTerm = ["HTML"]
diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md
new file mode 100644
index 0000000..0913c18
--- /dev/null
+++ b/exampleSite/content/about.md
@@ -0,0 +1,21 @@
+---
+title: "About"
+date: 2017-08-20T21:38:52+08:00
+lastmod: 2017-08-28T21:41:52+08:00
+menu: "main"
+weight: 50
+
+---
+
+Hugo is a static site engine written in Go.
+
+
+It makes use of a variety of open source projects including:
+
+* [Cobra](https://github.com/spf13/cobra)
+* [Viper](https://github.com/spf13/viper)
+* [J Walter Weatherman](https://github.com/spf13/jWalterWeatherman)
+* [Cast](https://github.com/spf13/cast)
+
+Learn more and contribute on [GitHub](https://github.com/gohugoio).
+
diff --git a/exampleSite/content/post/chinese-preview.md b/exampleSite/content/post/chinese-preview.md
new file mode 100644
index 0000000..08b3096
--- /dev/null
+++ b/exampleSite/content/post/chinese-preview.md
@@ -0,0 +1,84 @@
+---
+title: "[中文] 《长恨歌》"
+date: 2017-08-30T01:37:56+08:00
+lastmod: 2017-08-30T01:37:56+08:00
+draft: false
+tags: ["preview", "中文", "tag-1"]
+categories: ["中文"]
+author: "Wikipedia"
+
+contentCopyright: 'Creative Commons Attribution-ShareAlike License'
+
+---
+
+>《长恨歌》是中国唐朝诗人白居易的一首长篇叙事诗。
+
+# 第一段:贵妃受宠爱
+
+汉皇重色思倾国,御宇多年求不得。杨家有女初长成,养在深闺人未识。
+
+天生丽质难自弃,一朝选在君王侧。回眸一笑百媚生,六宫粉黛无颜色。
+
+春寒赐浴华清池,温泉水滑洗凝脂。侍儿扶起娇无力,始是新承恩泽时。
+
+云鬓花颜金步摇,芙蓉帐暖度春宵。春宵苦短日高起,从此君王不早朝。
+
+承欢侍宴无闲暇,春从春游夜专夜。后宫佳丽三千人,三千宠爱在一身。
+
+金屋妆成娇侍夜,玉楼宴罢醉和春。姊妹弟兄皆列士,可怜光彩生门户。
+
+遂令天下父母心,不重生男重生女。骊宫高处入青云,仙乐风飘处处闻。
+
+缓歌慢舞凝丝竹,尽日君王看不足。渔阳鼙鼓动地来,惊破霓裳羽衣曲。
+
+# 第二段:马嵬惊变
+
+九重城阙烟尘生,千乘万骑西南行。翠华摇摇行复止,西出都门百余里。
+
+六军不发无奈何,宛转蛾眉马前死。花钿委地无人收,翠翘金雀玉搔头。
+
+君王掩面救不得,回看血泪相和流。黄埃散漫风萧索,云栈萦纡登剑阁。
+
+峨嵋山下少人行,旌旗无光日色薄。蜀江水碧蜀山青,圣主朝朝暮暮情。
+
+行宫见月伤心色,夜雨闻铃肠断声。
+
+# 第三段:玄宗皇帝思念
+
+天旋地转回龙驭,到此踌躇不能去。马嵬坡下泥土中,不见玉颜空死处。
+
+君臣相顾尽霑衣,东望都门信马归。归来池苑皆依旧,太液芙蓉未央柳。
+
+芙蓉如面柳如眉,对此如何不泪垂。春风桃李花开日,秋雨梧桐叶落时。
+
+西宫南内多秋草,落叶满阶红不扫。梨园弟子白发新,椒房阿监青娥老。
+
+夕殿萤飞思悄然,孤灯挑尽未成眠。迟迟钟鼓初长夜,耿耿星河欲曙天。
+
+鸳鸯瓦冷霜华重,翡翠衾寒谁与共。悠悠生死别经年,魂魄不曾来入梦。
+
+# 第四段:仙界寻妃
+
+临邛道士鸿都客,能以精诚致魂魄。为感君王辗转思,遂教方士殷勤觅。
+
+排空驭气奔如电,升天入地求之遍。上穷碧落下黄泉,两处茫茫皆不见。
+
+忽闻海上有仙山,山在虚无缥缈间。楼阁玲珑五云起,其中绰约多仙子。
+
+中有一人字太真,雪肤花貌参差是。金阙西厢叩玉扃,转教小玉报双成。
+
+闻道汉家天子使,九华帐里梦魂惊。揽衣推枕起徘徊,珠箔银屏迤逦开。
+
+云髻(鬓?)半偏新睡觉,花冠不整下堂来。风吹仙袂飘飘(飖)举,犹似霓裳羽衣舞。
+
+玉容寂寞泪阑干,梨花一枝春带雨。含情凝睇谢君王,一别音容两渺茫。
+
+昭阳殿里恩爱绝,蓬莱宫中日月长。回头下望人寰处,不见长安见尘雾。
+
+唯将旧物表深情,钿合金钗寄将去。钗留一股合一扇,钗擘黄金合分钿。
+
+但教心似金钿坚,天上人间会相见。临别殷勤重寄词,词中有誓两心知。
+
+七月七日长生殿,夜半无人私语时。在天愿作比翼鸟,在地愿为连理枝。
+
+天长地久有时尽,此恨绵绵无绝期。
diff --git a/exampleSite/content/post/english-preview.md b/exampleSite/content/post/english-preview.md
new file mode 100644
index 0000000..02693ab
--- /dev/null
+++ b/exampleSite/content/post/english-preview.md
@@ -0,0 +1,1150 @@
+---
+title: "[English] Creating a New Theme"
+date: 2017-08-31T15:43:48+08:00
+lastmod: 2017-08-31T15:43:48+08:00
+draft: false
+tags: ["preview", "English", "tag-2"]
+categories: ["English"]
+author: "Michael Henderson"
+
+autoCollapseToc: true
+contentCopyright: 'See origin'
+
+---
+
+## Introduction
+
+This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I'll explain how Hugo uses templates and how you can organize your templates to create a theme. I won't cover using CSS to style your theme.
+
+We'll start with creating a new site with a very basic template. Then we'll add in a few pages and posts. With small variations on that, you will be able to create many different types of web sites.
+
+In this tutorial, commands that you enter will start with the "$" prompt. The output will follow. Lines that start with "#" are comments that I've added to explain a point. When I show updates to a file, the ":wq" on the last line means to save the file.
+
+Here's an example:
+
+```
+## this is a comment
+$ echo this is a command
+this is a command
+
+## edit the file
+$vi foo.md
++++
+date = "2014-09-28"
+title = "creating a new theme"
++++
+
+bah and humbug
+:wq
+
+## show it
+$ cat foo.md
++++
+date = "2014-09-28"
+title = "creating a new theme"
++++
+
+bah and humbug
+$
+```
+
+
+## Some Definitions
+
+There are a few concepts that you need to understand before creating a theme.
+
+### Skins
+
+Skins are the files responsible for the look and feel of your site. It’s the CSS that controls colors and fonts, it’s the Javascript that determines actions and reactions. It’s also the rules that Hugo uses to transform your content into the HTML that the site will serve to visitors.
+
+You have two ways to create a skin. The simplest way is to create it in the ```layouts/``` directory. If you do, then you don’t have to worry about configuring Hugo to recognize it. The first place that Hugo will look for rules and files is in the ```layouts/``` directory so it will always find the skin.
+
+Your second choice is to create it in a sub-directory of the ```themes/``` directory. If you do, then you must always tell Hugo where to search for the skin. It’s extra work, though, so why bother with it?
+
+The difference between creating a skin in ```layouts/``` and creating it in ```themes/``` is very subtle. A skin in ```layouts/``` can’t be customized without updating the templates and static files that it is built from. A skin created in ```themes/```, on the other hand, can be and that makes it easier for other people to use it.
+
+The rest of this tutorial will call a skin created in the ```themes/``` directory a theme.
+
+Note that you can use this tutorial to create a skin in the ```layouts/``` directory if you wish to. The main difference will be that you won’t need to update the site’s configuration file to use a theme.
+
+### The Home Page
+
+The home page, or landing page, is the first page that many visitors to a site see. It is the index.html file in the root directory of the web site. Since Hugo writes files to the public/ directory, our home page is public/index.html.
+
+### Site Configuration File
+
+When Hugo runs, it looks for a configuration file that contains settings that override default values for the entire site. The file can use TOML, YAML, or JSON. I prefer to use TOML for my configuration files. If you prefer to use JSON or YAML, you’ll need to translate my examples. You’ll also need to change the name of the file since Hugo uses the extension to determine how to process it.
+
+Hugo translates Markdown files into HTML. By default, Hugo expects to find Markdown files in your ```content/``` directory and template files in your ```themes/``` directory. It will create HTML files in your ```public/``` directory. You can change this by specifying alternate locations in the configuration file.
+
+### Content
+
+Content is stored in text files that contain two sections. The first section is the “front matter,” which is the meta-information on the content. The second section contains Markdown that will be converted to HTML.
+
+#### Front Matter
+
+The front matter is information about the content. Like the configuration file, it can be written in TOML, YAML, or JSON. Unlike the configuration file, Hugo doesn’t use the file’s extension to know the format. It looks for markers to signal the type. TOML is surrounded by “`+++`”, YAML by “`---`”, and JSON is enclosed in curly braces. I prefer to use TOML, so you’ll need to translate my examples if you prefer YAML or JSON.
+
+The information in the front matter is passed into the template before the content is rendered into HTML.
+
+#### Markdown
+
+Content is written in Markdown which makes it easier to create the content. Hugo runs the content through a Markdown engine to create the HTML which will be written to the output file.
+
+### Template Files
+
+Hugo uses template files to render content into HTML. Template files are a bridge between the content and presentation. Rules in the template define what content is published, where it's published to, and how it will rendered to the HTML file. The template guides the presentation by specifying the style to use.
+
+There are three types of templates: single, list, and partial. Each type takes a bit of content as input and transforms it based on the commands in the template.
+
+Hugo uses its knowledge of the content to find the template file used to render the content. If it can’t find a template that is an exact match for the content, it will shift up a level and search from there. It will continue to do so until it finds a matching template or runs out of templates to try. If it can’t find a template, it will use the default template for the site.
+
+Please note that you can use the front matter to influence Hugo’s choice of templates.
+
+#### Single Template
+
+A single template is used to render a single piece of content. For example, an article or post would be a single piece of content and use a single template.
+
+#### List Template
+
+A list template renders a group of related content. That could be a summary of recent postings or all articles in a category. List templates can contain multiple groups.
+
+The homepage template is a special type of list template. Hugo assumes that the home page of your site will act as the portal for the rest of the content in the site.
+
+#### Partial Template
+
+A partial template is a template that can be included in other templates. Partial templates must be called using the “partial” template command. They are very handy for rolling up common behavior. For example, your site may have a banner that all pages use. Instead of copying the text of the banner into every single and list template, you could create a partial with the banner in it. That way if you decide to change the banner, you only have to change the partial template.
+
+## Create a New Site
+
+Let's use Hugo to create a new web site. I'm a Mac user, so I'll create mine in my home directory, in the Sites folder. If you're using Linux, you might have to create the folder first.
+
+The "new site" command will create a skeleton of a site. It will give you the basic directory structure and a useable configuration file.
+
+```
+$ hugo new site ~/Sites/zafta
+$ cd ~/Sites/zafta
+$ ls -l
+total 8
+drwxr-xr-x 7 quoha staff 238 Sep 29 16:49 .
+drwxr-xr-x 3 quoha staff 102 Sep 29 16:49 ..
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
+-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
+$
+```
+
+Take a look in the content/ directory to confirm that it is empty.
+
+The other directories (archetypes/, layouts/, and static/) are used when customizing a theme. That's a topic for a different tutorial, so please ignore them for now.
+
+### Generate the HTML For the New Site
+
+Running the `hugo` command with no options will read all the available content and generate the HTML files. It will also copy all static files (that's everything that's not content). Since we have an empty site, it won't do much, but it will do it very quickly.
+
+```
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+WARN: 2014/09/29 Unable to locate layout: [404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+$
+```
+
+The "`--verbose`" flag gives extra information that will be helpful when we build the template. Every line of the output that starts with "INFO:" or "WARN:" is present because we used that flag. The lines that start with "WARN:" are warning messages. We'll go over them later.
+
+We can verify that the command worked by looking at the directory again.
+
+```
+$ ls -l
+total 8
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
+-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
+$
+```
+
+See that new public/ directory? Hugo placed all generated content there. When you're ready to publish your web site, that's the place to start. For now, though, let's just confirm that we have what we'd expect from a site with no content.
+
+```
+$ ls -l public
+total 16
+-rw-r--r-- 1 quoha staff 416 Sep 29 17:02 index.xml
+-rw-r--r-- 1 quoha staff 262 Sep 29 17:02 sitemap.xml
+$
+```
+
+Hugo created two XML files, which is standard, but there are no HTML files.
+
+
+
+### Test the New Site
+
+Verify that you can run the built-in web server. It will dramatically shorten your development cycle if you do. Start it by running the "server" command. If it is successful, you will see output similar to the following:
+
+```
+$ hugo server --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+WARN: 2014/09/29 Unable to locate layout: [404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+Serving pages from /Users/quoha/Sites/zafta/public
+Web Server is available at http://localhost:1313
+Press Ctrl+C to stop
+```
+
+Connect to the listed URL (it's on the line that starts with "Web Server"). If everything is working correctly, you should get a page that shows the following:
+
+```
+index.xml
+sitemap.xml
+```
+
+That's a listing of your public/ directory. Hugo didn't create a home page because our site has no content. When there's no index.html file in a directory, the server lists the files in the directory, which is what you should see in your browser.
+
+Let’s go back and look at those warnings again.
+
+```
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+WARN: 2014/09/29 Unable to locate layout: [404.html]
+```
+
+That second warning is easier to explain. We haven’t created a template to be used to generate “page not found errors.” The 404 message is a topic for a separate tutorial.
+
+Now for the first warning. It is for the home page. You can tell because the first layout that it looked for was “index.html.” That’s only used by the home page.
+
+I like that the verbose flag causes Hugo to list the files that it's searching for. For the home page, they are index.html, _default/list.html, and _default/single.html. There are some rules that we'll cover later that explain the names and paths. For now, just remember that Hugo couldn't find a template for the home page and it told you so.
+
+At this point, you've got a working installation and site that we can build upon. All that’s left is to add some content and a theme to display it.
+
+## Create a New Theme
+
+Hugo doesn't ship with a default theme. There are a few available (I counted a dozen when I first installed Hugo) and Hugo comes with a command to create new themes.
+
+We're going to create a new theme called "zafta." Since the goal of this tutorial is to show you how to fill out the files to pull in your content, the theme will not contain any CSS. In other words, ugly but functional.
+
+All themes have opinions on content and layout. For example, Zafta uses "post" over "blog". Strong opinions make for simpler templates but differing opinions make it tougher to use themes. When you build a theme, consider using the terms that other themes do.
+
+
+### Create a Skeleton
+
+Use the hugo "new" command to create the skeleton of a theme. This creates the directory structure and places empty files for you to fill out.
+
+```
+$ hugo new theme zafta
+
+$ ls -l
+total 8
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
+-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
+drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
+drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes
+
+$ find themes -type f | xargs ls -l
+-rw-r--r-- 1 quoha staff 1081 Sep 29 17:31 themes/zafta/LICENSE.md
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/archetypes/default.md
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
+-rw-r--r-- 1 quoha staff 93 Sep 29 17:31 themes/zafta/theme.toml
+$
+```
+
+The skeleton includes templates (the files ending in .html), license file, a description of your theme (the theme.toml file), and an empty archetype.
+
+Please take a minute to fill out the theme.toml and LICENSE.md files. They're optional, but if you're going to be distributing your theme, it tells the world who to praise (or blame). It's also nice to declare the license so that people will know how they can use the theme.
+
+```
+$ vi themes/zafta/theme.toml
+author = "michael d henderson"
+description = "a minimal working template"
+license = "MIT"
+name = "zafta"
+source_repo = ""
+tags = ["tags", "categories"]
+:wq
+
+## also edit themes/zafta/LICENSE.md and change
+## the bit that says "YOUR_NAME_HERE"
+```
+
+Note that the the skeleton's template files are empty. Don't worry, we'll be changing that shortly.
+
+```
+$ find themes/zafta -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
+$
+```
+
+
+
+### Update the Configuration File to Use the Theme
+
+Now that we've got a theme to work with, it's a good idea to add the theme name to the configuration file. This is optional, because you can always add "-t zafta" on all your commands. I like to put it the configuration file because I like shorter command lines. If you don't put it in the configuration file or specify it on the command line, you won't use the template that you're expecting to.
+
+Edit the file to add the theme, add a title for the site, and specify that all of our content will use the TOML format.
+
+```
+$ vi config.toml
+theme = "zafta"
+baseurl = ""
+languageCode = "en-us"
+title = "zafta - totally refreshing"
+MetaDataFormat = "toml"
+:wq
+
+$
+```
+
+### Generate the Site
+
+Now that we have an empty theme, let's generate the site again.
+
+```
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+$
+```
+
+Did you notice that the output is different? The warning message for the home page has disappeared and we have an additional information line saying that Hugo is syncing from the theme's directory.
+
+Let's check the public/ directory to see what Hugo's created.
+
+```
+$ ls -l public
+total 16
+drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 css
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:56 index.html
+-rw-r--r-- 1 quoha staff 407 Sep 29 17:56 index.xml
+drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 js
+-rw-r--r-- 1 quoha staff 243 Sep 29 17:56 sitemap.xml
+$
+```
+
+Notice four things:
+
+1. Hugo created a home page. This is the file public/index.html.
+2. Hugo created a css/ directory.
+3. Hugo created a js/ directory.
+4. Hugo claimed that it created 0 pages. It created a file and copied over static files, but didn't create any pages. That's because it considers a "page" to be a file created directly from a content file. It doesn't count things like the index.html files that it creates automatically.
+
+#### The Home Page
+
+Hugo supports many different types of templates. The home page is special because it gets its own type of template and its own template file. The file, layouts/index.html, is used to generate the HTML for the home page. The Hugo documentation says that this is the only required template, but that depends. Hugo's warning message shows that it looks for three different templates:
+
+```
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+```
+
+If it can't find any of these, it completely skips creating the home page. We noticed that when we built the site without having a theme installed.
+
+When Hugo created our theme, it created an empty home page template. Now, when we build the site, Hugo finds the template and uses it to generate the HTML for the home page. Since the template file is empty, the HTML file is empty, too. If the template had any rules in it, then Hugo would have used them to generate the home page.
+
+```
+$ find . -name index.html | xargs ls -l
+-rw-r--r-- 1 quoha staff 0 Sep 29 20:21 ./public/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 ./themes/zafta/layouts/index.html
+$
+```
+
+#### The Magic of Static
+
+Hugo does two things when generating the site. It uses templates to transform content into HTML and it copies static files into the site. Unlike content, static files are not transformed. They are copied exactly as they are.
+
+Hugo assumes that your site will use both CSS and JavaScript, so it creates directories in your theme to hold them. Remember opinions? Well, Hugo's opinion is that you'll store your CSS in a directory named css/ and your JavaScript in a directory named js/. If you don't like that, you can change the directory names in your theme directory or even delete them completely. Hugo's nice enough to offer its opinion, then behave nicely if you disagree.
+
+```
+$ find themes/zafta -type d | xargs ls -ld
+drwxr-xr-x 7 quoha staff 238 Sep 29 17:38 themes/zafta
+drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes/zafta/archetypes
+drwxr-xr-x 5 quoha staff 170 Sep 29 17:31 themes/zafta/layouts
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/_default
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/partials
+drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/static
+drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/css
+drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/js
+$
+```
+
+## The Theme Development Cycle
+
+When you're working on a theme, you will make changes in the theme's directory, rebuild the site, and check your changes in the browser. Hugo makes this very easy:
+
+1. Purge the public/ directory.
+2. Run the built in web server in watch mode.
+3. Open your site in a browser.
+4. Update the theme.
+5. Glance at your browser window to see changes.
+6. Return to step 4.
+
+I’ll throw in one more opinion: never work on a theme on a live site. Always work on a copy of your site. Make changes to your theme, test them, then copy them up to your site. For added safety, use a tool like Git to keep a revision history of your content and your theme. Believe me when I say that it is too easy to lose both your mind and your changes.
+
+Check the main Hugo site for information on using Git with Hugo.
+
+### Purge the public/ Directory
+
+When generating the site, Hugo will create new files and update existing ones in the ```public/``` directory. It will not delete files that are no longer used. For example, files that were created in the wrong directory or with the wrong title will remain. If you leave them, you might get confused by them later. I recommend cleaning out your site prior to generating it.
+
+Note: If you're building on an SSD, you should ignore this. Churning on a SSD can be costly.
+
+### Hugo's Watch Option
+
+Hugo's "`--watch`" option will monitor the content/ and your theme directories for changes and rebuild the site automatically.
+
+### Live Reload
+
+Hugo's built in web server supports live reload. As pages are saved on the server, the browser is told to refresh the page. Usually, this happens faster than you can say, "Wow, that's totally amazing."
+
+### Development Commands
+
+Use the following commands as the basis for your workflow.
+
+```
+## purge old files. hugo will recreate the public directory.
+##
+$ rm -rf public
+##
+## run hugo in watch mode
+##
+$ hugo server --watch --verbose
+```
+
+Here's sample output showing Hugo detecting a change to the template for the home page. Once generated, the web browser automatically reloaded the page. I've said this before, it's amazing.
+
+
+```
+$ rm -rf public
+$ hugo server --watch --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+Watching for changes in /Users/quoha/Sites/zafta/content
+Serving pages from /Users/quoha/Sites/zafta/public
+Web Server is available at http://localhost:1313
+Press Ctrl+C to stop
+INFO: 2014/09/29 File System Event: ["/Users/quoha/Sites/zafta/themes/zafta/layouts/index.html": MODIFY|ATTRIB]
+Change detected, rebuilding site
+
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 1 ms
+```
+
+## Update the Home Page Template
+
+The home page is one of a few special pages that Hugo creates automatically. As mentioned earlier, it looks for one of three files in the theme's layout/ directory:
+
+1. index.html
+2. _default/list.html
+3. _default/single.html
+
+We could update one of the default templates, but a good design decision is to update the most specific template available. That's not a hard and fast rule (in fact, we'll break it a few times in this tutorial), but it is a good generalization.
+
+### Make a Static Home Page
+
+Right now, that page is empty because we don't have any content and we don't have any logic in the template. Let's change that by adding some text to the template.
+
+```
+$ vi themes/zafta/layouts/index.html
+
+
+
+
hugo says hello!
+
+
+:wq
+
+$
+```
+
+Build the web site and then verify the results.
+
+```
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+0 pages created
+0 tags created
+0 categories created
+in 2 ms
+
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 78 Sep 29 21:26 public/index.html
+
+$ cat public/index.html
+
+
+
+
hugo says hello!
+
+```
+
+#### Live Reload
+
+Note: If you're running the server with the `--watch` option, you'll see different content in the file:
+
+```
+$ cat public/index.html
+
+
+
+
hugo says hello!
+
+
+```
+
+When you use `--watch`, the Live Reload script is added by Hugo. Look for live reload in the documentation to see what it does and how to disable it.
+
+### Build a "Dynamic" Home Page
+
+"Dynamic home page?" Hugo's a static web site generator, so this seems an odd thing to say. I mean let's have the home page automatically reflect the content in the site every time Hugo builds it. We'll use iteration in the template to do that.
+
+#### Create New Posts
+
+Now that we have the home page generating static content, let's add some content to the site. We'll display these posts as a list on the home page and on their own page, too.
+
+Hugo has a command to generate a skeleton post, just like it does for sites and themes.
+
+```
+$ hugo --verbose new post/first.md
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 attempting to create post/first.md of post
+INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/default.md
+ERROR: 2014/09/29 Unable to Cast to map[string]interface{}
+
+$
+```
+
+That wasn't very nice, was it?
+
+The "new" command uses an archetype to create the post file. Hugo created an empty default archetype file, but that causes an error when there's a theme. For me, the workaround was to create an archetypes file specifically for the post type.
+
+```
+$ vi themes/zafta/archetypes/post.md
++++
+Description = ""
+Tags = []
+Categories = []
++++
+:wq
+
+$ find themes/zafta/archetypes -type f | xargs ls -l
+-rw-r--r-- 1 quoha staff 0 Sep 29 21:53 themes/zafta/archetypes/default.md
+-rw-r--r-- 1 quoha staff 51 Sep 29 21:54 themes/zafta/archetypes/post.md
+
+$ hugo --verbose new post/first.md
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 attempting to create post/first.md of post
+INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
+INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/first.md
+/Users/quoha/Sites/zafta/content/post/first.md created
+
+$ hugo --verbose new post/second.md
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 attempting to create post/second.md of post
+INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
+INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/second.md
+/Users/quoha/Sites/zafta/content/post/second.md created
+
+$ ls -l content/post
+total 16
+-rw-r--r-- 1 quoha staff 104 Sep 29 21:54 first.md
+-rw-r--r-- 1 quoha staff 105 Sep 29 21:57 second.md
+
+$ cat content/post/first.md
++++
+Categories = []
+Description = ""
+Tags = []
+date = "2014-09-29T21:54:53-05:00"
+title = "first"
+
++++
+my first post
+
+$ cat content/post/second.md
++++
+Categories = []
+Description = ""
+Tags = []
+date = "2014-09-29T21:57:09-05:00"
+title = "second"
+
++++
+my second post
+
+$
+```
+
+Build the web site and then verify the results.
+
+```
+$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"category":"categories", "tag":"tags"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+2 pages created
+0 tags created
+0 categories created
+in 4 ms
+$
+```
+
+The output says that it created 2 pages. Those are our new posts:
+
+```
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 78 Sep 29 22:13 public/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/first/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/second/index.html
+$
+```
+
+The new files are empty because because the templates used to generate the content are empty. The homepage doesn't show the new content, either. We have to update the templates to add the posts.
+
+### List and Single Templates
+
+In Hugo, we have three major kinds of templates. There's the home page template that we updated previously. It is used only by the home page. We also have "single" templates which are used to generate output for a single content file. We also have "list" templates that are used to group multiple pieces of content before generating output.
+
+Generally speaking, list templates are named "list.html" and single templates are named "single.html."
+
+There are three other types of templates: partials, content views, and terms. We will not go into much detail on these.
+
+### Add Content to the Homepage
+
+The home page will contain a list of posts. Let's update its template to add the posts that we just created. The logic in the template will run every time we build the site.
+
+```
+$ vi themes/zafta/layouts/index.html
+
+
+
+ {{ range first 10 .Data.Pages }}
+
{{ .Title }}
+ {{ end }}
+
+
+:wq
+
+$
+```
+
+Hugo uses the Go template engine. That engine scans the template files for commands which are enclosed between "{{" and "}}". In our template, the commands are:
+
+1. range
+2. .Title
+3. end
+
+The "range" command is an iterator. We're going to use it to go through the first ten pages. Every HTML file that Hugo creates is treated as a page, so looping through the list of pages will look at every file that will be created.
+
+The ".Title" command prints the value of the "title" variable. Hugo pulls it from the front matter in the Markdown file.
+
+The "end" command signals the end of the range iterator. The engine loops back to the top of the iteration when it finds "end." Everything between the "range" and "end" is evaluated every time the engine goes through the iteration. In this file, that would cause the title from the first ten pages to be output as heading level one.
+
+It's helpful to remember that some variables, like .Data, are created before any output files. Hugo loads every content file into the variable and then gives the template a chance to process before creating the HTML files.
+
+Build the web site and then verify the results.
+
+```
+$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+2 pages created
+0 tags created
+0 categories created
+in 4 ms
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 94 Sep 29 22:23 public/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/first/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/second/index.html
+$ cat public/index.html
+
+
+
+
+
second
+
+
first
+
+
+
+$
+```
+
+Congratulations, the home page shows the title of the two posts. The posts themselves are still empty, but let's take a moment to appreciate what we've done. Your template now generates output dynamically. Believe it or not, by inserting the range command inside of those curly braces, you've learned everything you need to know to build a theme. All that's really left is understanding which template will be used to generate each content file and becoming familiar with the commands for the template engine.
+
+And, if that were entirely true, this tutorial would be much shorter. There are a few things to know that will make creating a new template much easier. Don't worry, though, that's all to come.
+
+### Add Content to the Posts
+
+We're working with posts, which are in the content/post/ directory. That means that their section is "post" (and if we don't do something weird, their type is also "post").
+
+Hugo uses the section and type to find the template file for every piece of content. Hugo will first look for a template file that matches the section or type name. If it can't find one, then it will look in the _default/ directory. There are some twists that we'll cover when we get to categories and tags, but for now we can assume that Hugo will try post/single.html, then _default/single.html.
+
+Now that we know the search rule, let's see what we actually have available:
+
+```
+$ find themes/zafta -name single.html | xargs ls -l
+-rw-r--r-- 1 quoha staff 132 Sep 29 17:31 themes/zafta/layouts/_default/single.html
+```
+
+We could create a new template, post/single.html, or change the default. Since we don't know of any other content types, let's start with updating the default.
+
+Remember, any content that we haven't created a template for will end up using this template. That can be good or bad. Bad because I know that we're going to be adding different types of content and we're going to end up undoing some of the changes we've made. It's good because we'll be able to see immediate results. It's also good to start here because we can start to build the basic layout for the site. As we add more content types, we'll refactor this file and move logic around. Hugo makes that fairly painless, so we'll accept the cost and proceed.
+
+Please see the Hugo documentation on template rendering for all the details on determining which template to use. And, as the docs mention, if you're building a single page application (SPA) web site, you can delete all of the other templates and work with just the default single page. That's a refreshing amount of joy right there.
+
+#### Update the Template File
+
+```
+$ vi themes/zafta/layouts/_default/single.html
+
+
+
+ {{ .Title }}
+
+
+
{{ .Title }}
+ {{ .Content }}
+
+
+:wq
+
+$
+```
+
+Build the web site and verify the results.
+
+```
+$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content
+0 future content
+2 pages created
+0 tags created
+0 categories created
+in 4 ms
+
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r-- 1 quoha staff 94 Sep 29 22:40 public/index.html
+-rw-r--r-- 1 quoha staff 125 Sep 29 22:40 public/post/first/index.html
+-rw-r--r-- 1 quoha staff 0 Sep 29 22:40 public/post/index.html
+-rw-r--r-- 1 quoha staff 128 Sep 29 22:40 public/post/second/index.html
+
+$ cat public/post/first/index.html
+
+
+
+ first
+
+
+
+
+
+
+$
+```
+
+Notice that the posts now have content. You can go to localhost:1313/post/first to verify.
+
+### Linking to Content
+
+The posts are on the home page. Let's add a link from there to the post. Since this is the home page, we'll update its template.
+
+```
+$ vi themes/zafta/layouts/index.html
+
+
+
+ {{ range first 10 .Data.Pages }}
+
+
+
+
+
+$
+```
+
+### Create a Post Listing
+
+We have the posts displaying on the home page and on their own page. We also have a file public/post/index.html that is empty. Let's make it show a list of all posts (not just the first ten).
+
+We need to decide which template to update. This will be a listing, so it should be a list template. Let's take a quick look and see which list templates are available.
+
+```
+$ find themes/zafta -name list.html | xargs ls -l
+-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
+```
+
+As with the single post, we have to decide to update _default/list.html or create post/list.html. We still don't have multiple content types, so let's stay consistent and update the default list template.
+
+## Creating Top Level Pages
+
+Let's add an "about" page and display it at the top level (as opposed to a sub-level like we did with posts).
+
+The default in Hugo is to use the directory structure of the content/ directory to guide the location of the generated html in the public/ directory. Let's verify that by creating an "about" page at the top level:
+
+```
+$ vi content/about.md
++++
+title = "about"
+description = "about this site"
+date = "2014-09-27"
+slug = "about time"
++++
+
+## about us
+
+i'm speechless
+:wq
+```
+
+Generate the web site and verify the results.
+
+```
+$ find public -name '*.html' | xargs ls -l
+-rw-rw-r-- 1 mdhender staff 334 Sep 27 15:08 public/about-time/index.html
+-rw-rw-r-- 1 mdhender staff 527 Sep 27 15:08 public/index.html
+-rw-rw-r-- 1 mdhender staff 358 Sep 27 15:08 public/post/first-post/index.html
+-rw-rw-r-- 1 mdhender staff 0 Sep 27 15:08 public/post/index.html
+-rw-rw-r-- 1 mdhender staff 342 Sep 27 15:08 public/post/second-post/index.html
+```
+
+Notice that the page wasn't created at the top level. It was created in a sub-directory named 'about-time/'. That name came from our slug. Hugo will use the slug to name the generated content. It's a reasonable default, by the way, but we can learn a few things by fighting it for this file.
+
+One other thing. Take a look at the home page.
+
+```
+$ cat public/index.html
+
+
+
+
+
+
+```
+
+Notice that the "about" link is listed with the posts? That's not desirable, so let's change that first.
+
+```
+$ vi themes/zafta/layouts/index.html
+
+
+
+
posts
+ {{ range first 10 .Data.Pages }}
+ {{ if eq .Type "post"}}
+
+ {{ end }}
+ {{ end }}
+
+
+:wq
+```
+
+Generate the web site and verify the results. The home page has two sections, posts and pages, and each section has the right set of headings and links in it.
+
+But, that about page still renders to about-time/index.html.
+
+```
+$ find public -name '*.html' | xargs ls -l
+-rw-rw-r-- 1 mdhender staff 334 Sep 27 15:33 public/about-time/index.html
+-rw-rw-r-- 1 mdhender staff 645 Sep 27 15:33 public/index.html
+-rw-rw-r-- 1 mdhender staff 358 Sep 27 15:33 public/post/first-post/index.html
+-rw-rw-r-- 1 mdhender staff 0 Sep 27 15:33 public/post/index.html
+-rw-rw-r-- 1 mdhender staff 342 Sep 27 15:33 public/post/second-post/index.html
+```
+
+Knowing that hugo is using the slug to generate the file name, the simplest solution is to change the slug. Let's do it the hard way and change the permalink in the configuration file.
+
+```
+$ vi config.toml
+[permalinks]
+ page = "/:title/"
+ about = "/:filename/"
+```
+
+Generate the web site and verify that this didn't work. Hugo lets "slug" or "URL" override the permalinks setting in the configuration file. Go ahead and comment out the slug in content/about.md, then generate the web site to get it to be created in the right place.
+
+## Sharing Templates
+
+If you've been following along, you probably noticed that posts have titles in the browser and the home page doesn't. That's because we didn't put the title in the home page's template (layouts/index.html). That's an easy thing to do, but let's look at a different option.
+
+We can put the common bits into a shared template that's stored in the themes/zafta/layouts/partials/ directory.
+
+### Create the Header and Footer Partials
+
+In Hugo, a partial is a sugar-coated template. Normally a template reference has a path specified. Partials are different. Hugo searches for them along a TODO defined search path. This makes it easier for end-users to override the theme's presentation.
+
+```
+$ vi themes/zafta/layouts/partials/header.html
+
+
+
+ {{ .Title }}
+
+
+:wq
+
+$ vi themes/zafta/layouts/partials/footer.html
+
+
+:wq
+```
+
+### Update the Home Page Template to Use the Partials
+
+The most noticeable difference between a template call and a partials call is the lack of path:
+
+```
+{{ template "theme/partials/header.html" . }}
+```
+versus
+```
+{{ partial "header.html" . }}
+```
+Both pass in the context.
+
+Let's change the home page template to use these new partials.
+
+```
+$ vi themes/zafta/layouts/index.html
+{{ partial "header.html" . }}
+
+
posts
+ {{ range first 10 .Data.Pages }}
+ {{ if eq .Type "post"}}
+
+ {{ end }}
+ {{ end }}
+
+{{ partial "footer.html" . }}
+:wq
+```
+
+Generate the web site and verify the results. The title on the home page is now "your title here", which comes from the "title" variable in the config.toml file.
+
+### Update the Default Single Template to Use the Partials
+
+```
+$ vi themes/zafta/layouts/_default/single.html
+{{ partial "header.html" . }}
+
+
{{ .Title }}
+ {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+```
+
+Generate the web site and verify the results. The title on the posts and the about page should both reflect the value in the markdown file.
+
+## Add “Date Published” to Posts
+
+It's common to have posts display the date that they were written or published, so let's add that. The front matter of our posts has a variable named "date." It's usually the date the content was created, but let's pretend that's the value we want to display.
+
+### Add “Date Published” to the Template
+
+We'll start by updating the template used to render the posts. The template code will look like:
+
+```
+{{ .Date.Format "Mon, Jan 2, 2006" }}
+```
+
+Posts use the default single template, so we'll change that file.
+
+```
+$ vi themes/zafta/layouts/_default/single.html
+{{ partial "header.html" . }}
+
+
{{ .Title }}
+
{{ .Date.Format "Mon, Jan 2, 2006" }}
+ {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+```
+
+Generate the web site and verify the results. The posts now have the date displayed in them. There's a problem, though. The "about" page also has the date displayed.
+
+As usual, there are a couple of ways to make the date display only on posts. We could do an "if" statement like we did on the home page. Another way would be to create a separate template for posts.
+
+The "if" solution works for sites that have just a couple of content types. It aligns with the principle of "code for today," too.
+
+Let's assume, though, that we've made our site so complex that we feel we have to create a new template type. In Hugo-speak, we're going to create a section template.
+
+Let's restore the default single template before we forget.
+
+```
+$ mkdir themes/zafta/layouts/post
+$ vi themes/zafta/layouts/_default/single.html
+{{ partial "header.html" . }}
+
+
{{ .Title }}
+ {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+```
+
+Now we'll update the post's version of the single template. If you remember Hugo's rules, the template engine will use this version over the default.
+
+```
+$ vi themes/zafta/layouts/post/single.html
+{{ partial "header.html" . }}
+
+
{{ .Title }}
+
{{ .Date.Format "Mon, Jan 2, 2006" }}
+ {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+
+```
+
+Note that we removed the date logic from the default template and put it in the post template. Generate the web site and verify the results. Posts have dates and the about page doesn't.
+
+### Don't Repeat Yourself
+
+DRY is a good design goal and Hugo does a great job supporting it. Part of the art of a good template is knowing when to add a new template and when to update an existing one. While you're figuring that out, accept that you'll be doing some refactoring. Hugo makes that easy and fast, so it's okay to delay splitting up a template.
diff --git a/exampleSite/content/post/even-preview.md b/exampleSite/content/post/even-preview.md
new file mode 100644
index 0000000..6576641
--- /dev/null
+++ b/exampleSite/content/post/even-preview.md
@@ -0,0 +1,725 @@
+---
+title: "Theme preview"
+date: 2018-07-10T00:00:00+08:00
+lastmod: 2018-07-10T00:00:00+08:00
+draft: false
+tags: ["preview", "Theme preview", "tag-3"]
+categories: ["Theme preview", "category-2", "category-3"]
+
+weight: 10
+contentCopyright: MIT
+mathjax: true
+autoCollapseToc: true
+
+---
+
+> Based on [MarkdownPreview test.md](https://github.com/facelessuser/MarkdownPreview/blob/master/examples/test.md).
+
+# Markdown
+
+```
+# H1
+## H2
+### H3
+#### H4
+##### H5
+###### H6
+### Duplicate Header
+### Duplicate Header
+```
+
+# H1
+## H2
+### H3
+#### H4
+##### H5
+###### H6
+### Duplicate Header
+### Duplicate Header
+
+## Paragraphs
+
+```
+This is a paragraph.
+I am still part of the paragraph.
+
+New paragraph.
+```
+
+This is a paragraph.
+I am still part of the paragraph.
+
+New paragraph.
+
+## Anchor
+
+*Define anchor by `{#section-id}`*
+
+[Something](#section-7)
+
+## Footnote
+
+This is a footnote[^1]
+
+A footnote on "label"[^label]
+
+The footnote for definition[^!DEF]
+
+A footnote with link[^pa]
+
+[^1]: This is a footnote
+[^label]: A footnote on "label"
+[^pa]: [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
+[^!DEF]: The footnote for definition
+
+
+## Inline
+
+```
+`inline block`
+
+ctrl+alt+del
+
+**bold 1** and __bold 2__
+
+*italic 1* and _italic 2_
+
+~~strike~~
+
+
+***bold 1 and italic 1***
+
+___bold 2 and italic 2___
+
+__*bold 2 and italic 1*__
+
+**_bold 1 and italic 2_**
+
+
+~~*strike italic 1*~~ and *~~strike italic 2~~*
+
+~~_strike italic 2_~~ and _~~strike italic 2~~_
+
+
+~~**strike bold 1**~~ and **~~strike bold 1~~**
+
+~~__strike bold 2__~~ and __~~strike bold 2~~__
+
+
+~~***strike italic 1 bold 1***~~ and ***~~strike italic 1 bold 1~~***
+
+~~___strike italic 2 bold 2___~~ and ___~~strike italic 2 bold 2~~___
+
+**~~*strike italic 1 bold 1*~~** and *~~**strike italic 1 bold 1**~~*
+
+__~~_strike italic 2 bold 2_~~__ and _~~__strike italic 2 bold 2__~~_
+
+**~~_strike italic 2 bold 1_~~** and _~~**strike italic 2 bold 1**~~_
+
+__~~*strike italic 1 bold 2*~~__ and *~~__strike italic 1 bold 2__~~*
+
+```
+
+`inline block`
+
+ctrl+alt+del
+
+**bold 1** and __bold 2__
+
+*italic 1* and _italic 2_
+
+~~strike~~
+
+
+***bold 1 and italic 1***
+
+___bold 2 and italic 2___
+
+__*bold 2 and italic 1*__
+
+**_bold 1 and italic 2_**
+
+
+~~*strike italic 1*~~ and *~~strike italic 2~~*
+
+~~_strike italic 2_~~ and _~~strike italic 2~~_
+
+
+~~**strike bold 1**~~ and **~~strike bold 1~~**
+
+~~__strike bold 2__~~ and __~~strike bold 2~~__
+
+
+~~***strike italic 1 bold 1***~~ and ***~~strike italic 1 bold 1~~***
+
+~~___strike italic 2 bold 2___~~ and ___~~strike italic 2 bold 2~~___
+
+**~~*strike italic 1 bold 1*~~** and *~~**strike italic 1 bold 1**~~*
+
+__~~_strike italic 2 bold 2_~~__ and _~~__strike italic 2 bold 2__~~_
+
+**~~_strike italic 2 bold 1_~~** and _~~**strike italic 2 bold 1**~~_
+
+__~~*strike italic 1 bold 2*~~__ and *~~__strike italic 1 bold 2__~~*
+
+
+## Links
+
+```
+Web image
+
+
+Local image
+
+
+contact@revolunet.com
+
+@revolunet
+
+Issue #1
+
+https://github.com/revolunet/sublimetext-markdown-preview/
+
+This is a link https://github.com/revolunet/sublimetext-markdown-preview/.
+
+This is a link "https://github.com/revolunet/sublimetext-markdown-preview/".
+
+With this link (https://github.com/revolunet/sublimetext-markdown-preview/), it still works.
+```
+
+Web image
+
+
+Local image
+
+
+www.google.com
+
+contact@revolunet.com
+
+@revolunet
+
+Issue #1
+
+https://github.com/revolunet/sublimetext-markdown-preview/
+
+This is a link https://github.com/revolunet/sublimetext-markdown-preview/.
+
+This is a link "https://github.com/revolunet/sublimetext-markdown-preview/".
+
+With this link (https://github.com/revolunet/sublimetext-markdown-preview/), it still works.
+
+## Abbreviation
+
+Abbreviations source are found in a separate markdown file specified in frontmatter.
+```
+The HTML specification
+is maintained by the W3C.
+
+*[HTML]: Hyper Text Markup Language
+*[W3C]: World Wide Web Consortium
+```
+
+The HTML specification
+is maintained by the W3C.
+
+## Unordered List
+
+```
+Unordered List
+
+- item 1
+ * item A
+ * item B
+ more text
+ + item a
+ + item b
+ + item c
+ * item C
+- item 2
+- item 3
+```
+
+Unordered List
+
+- item 1
+ * item A
+ * item B
+ more text
+ + item a
+ + item b
+ + item c
+ * item C
+- item 2
+- item 3
+
+
+## Ordered List
+
+```
+Ordered List
+
+1. item 1
+ 1. item A
+ 2. item B
+ more text
+ 1. item a
+ 2. item b
+ 3. item c
+ 3. item C
+2. item 2
+3. item 3
+```
+
+Ordered List
+
+1. item 1
+ 1. item A
+ 2. item B
+ more text
+ 1. item a
+ 2. item b
+ 3. item c
+ 3. item C
+2. item 2
+3. item 3
+
+## Task List
+
+```
+Task List
+
+- [X] item 1
+ * [X] item A
+ * [ ] item B
+ more text
+ + [x] item a
+ + [ ] item b
+ + [x] item c
+ * [X] item C
+- [ ] item 2
+- [ ] item 3
+```
+
+Task List
+
+- [X] item 1
+ * [X] item A
+ * [ ] item B
+ more text
+ + [x] item a
+ + [ ] item b
+ + [x] item c
+ * [X] item C
+- [ ] item 2
+- [ ] item 3
+
+## Mixed Lists
+
+`Really Mixed Lists` should break with `sane_lists` on.
+
+```
+Mixed Lists
+
+- item 1
+ * [X] item A
+ * [ ] item B
+ more text
+ 1. item a
+ 2. itemb
+ 3. item c
+ * [X] item C
+- item 2
+- item 3
+
+
+Really Mixed Lists
+
+- item 1
+ * [X] item A
+ - item B
+ more text
+ 1. item a
+ + itemb
+ + [ ] item c
+ 3. item C
+2. item 2
+- [X] item 3
+```
+
+Mixed Lists
+
+- item 1
+ * [X] item A
+ * [ ] item B
+ more text
+ 1. item a
+ 2. itemb
+ 3. item c
+ * [X] item C
+- item 2
+- item 3
+
+
+Really Mixed Lists
+
+- item 1
+ * [X] item A
+ - item B
+ more text
+ 1. item a
+ + itemb
+ + [ ] item c
+ 3. item C
+2. item 2
+- [X] item 3
+
+
+## Dictionary
+
+```
+Dictionary
+: item 1
+
+ item 2
+
+ item 3
+```
+
+Dictionary
+: item 1
+
+ item 2
+
+ item 3
+
+## Blocks
+
+```
+ This is a block.
+
+ This is more of a block.
+
+```
+
+ This is a block.
+
+ This is more of a block.
+
+
+## Block Quotes
+
+```
+> This is a block quote
+>> How does it look?
+```
+
+> This is a block quote.
+>> How does it look?
+> I think it looks good.
+
+## Fenced Block
+
+Assuming guessing is not enabled.
+
+`````
+```
+// Fenced **without** highlighting
+function doIt() {
+ for (var i = 1; i <= slen ; i^^) {
+ setTimeout("document.z.textdisplay.value = newMake()", i*300);
+ setTimeout("window.status = newMake()", i*300);
+ }
+}
+```
+
+```javascript
+// Fenced **with** highlighting
+function doIt() {
+ for (var i = 1; i <= slen ; i^^) {
+ setTimeout("document.z.textdisplay.value = newMake()", i*300);
+ setTimeout("window.status = newMake()", i*300);
+ }
+}
+```
+`````
+
+```
+// Fenced **without** highlighting
+function doIt() {
+ for (var i = 1; i <= slen ; i^^) {
+ setTimeout("document.z.textdisplay.value = newMake()", i*300);
+ setTimeout("window.status = newMake()", i*300);
+ }
+}
+```
+
+```javascript
+// Fenced **with** highlighting
+function doIt() {
+ for (var i = 1; i <= slen ; i^^) {
+ setTimeout("document.z.textdisplay.value = newMake()", i*300);
+ setTimeout("window.status = newMake()", i*300);
+ }
+}
+```
+
+## Tables
+
+```
+| _Colors_ | Fruits | Vegetable |
+| ------------- |:---------------:| -----------------:|
+| Red | *Apple* | [Pepper](#Tables) |
+| ~~Orange~~ | Oranges | **Carrot** |
+| Green | ~~***Pears***~~ | Spinach |
+```
+
+| _Colors_ | Fruits | Vegetable |
+| ------------- |:---------------:| ------------:|
+| Red | *Apple* | Pepper |
+| ~~Orange~~ | Oranges | **Carrot** |
+| Green | ~~***Pears***~~ | Spinach |
+
+Class or Enum | Year | Month | Day | Hours | Minutes | Seconds* | Zone Offset | Zone ID | toString Output | Where Discussed
+----------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |:-------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------:| ------------------------------------------------------------------------------------- |:-------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------:| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------
+`Instant` | | | | | |
+{{- end }}
diff --git a/layouts/partials/post/outdated-info-warning.html b/layouts/partials/post/outdated-info-warning.html
new file mode 100644
index 0000000..3736c13
--- /dev/null
+++ b/layouts/partials/post/outdated-info-warning.html
@@ -0,0 +1,28 @@
+{{- if or .Params.enableOutdatedInfoWarning (and .Site.Params.outdatedInfoWarning.enable (ne .Params.enableOutdatedInfoWarning false)) }}
+ {{- $daysAgo := div (sub now.Unix .Lastmod.Unix) 86400 }}
+ {{- $hintThreshold := .Site.Params.outdatedInfoWarning.hint | default 30 }}
+ {{- $warnThreshold := .Site.Params.outdatedInfoWarning.warn | default 180 }}
+
+ {{- $updateTime := .Lastmod }}
+ {{- if .GitInfo }}
+ {{- if lt .GitInfo.AuthorDate.Unix .Lastmod.Unix }}
+ {{- $updateTime := .GitInfo.AuthorDate }}
+ {{- end }}
+ {{- end -}}
+
+ {{- if gt $daysAgo $hintThreshold }}
+
+ {{- if gt $daysAgo $warnThreshold }}
+
+ {{- else }}
+
+ {{- end }}
+
{{ T "outdatedInfoWarningBefore" -}}
+
+ {{- dateFormat "January 2, 2006" $updateTime -}}
+ {{ T "outdatedInfoWarningAfter" -}}
+
+
+
+ {{- end -}}
+{{- end -}}
diff --git a/layouts/partials/post/reward.html b/layouts/partials/post/reward.html
new file mode 100644
index 0000000..baceac7
--- /dev/null
+++ b/layouts/partials/post/reward.html
@@ -0,0 +1,21 @@
+{{ if or .Params.reward (and .Site.Params.reward.enable (ne .Params.reward false)) -}}
+
+
+
+
+ {{ $qrCode := .Site.Params.reward }}
+ {{ with $qrCode.wechat -}}
+
+ {{- end }}
+ {{ with $qrCode.alipay -}}
+
+ {{- end }}
+
+
+{{- end }}
\ No newline at end of file
diff --git a/layouts/partials/post/toc.html b/layouts/partials/post/toc.html
new file mode 100644
index 0000000..759ad43
--- /dev/null
+++ b/layouts/partials/post/toc.html
@@ -0,0 +1,9 @@
+{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
+