From 344f0a9f411a9b28d6e5732e591f26953d9c1263 Mon Sep 17 00:00:00 2001
From: Dillon
Date: Fri, 31 Jan 2020 18:46:28 +0800
Subject: [PATCH] fix(css): fix some css bugs
---
archetypes/default.md | 6 +-
assets/css/_core/_base.scss | 4 +-
assets/css/_core/_media.scss | 10 +-
assets/css/_core/_normalize.scss | 208 +++++++++---------
assets/css/_page/_index.scss | 4 +-
assets/css/_page/_post.scss | 69 ++----
assets/css/_page/_posts.scss | 4 +-
assets/css/_partial/_post/_code.scss | 7 +-
assets/css/_variables.scss | 10 +-
assets/js/blog.js | 14 +-
.../static/images => assets/svg}/loading.svg | 12 +-
exampleSite/config.toml | 176 ++++++++++-----
exampleSite/content/posts/LoveIt-Preview.md | 10 +-
exampleSite/content/posts/markdown-syntax.md | 169 ++++++++++++++
exampleSite/static/images/markdown.png | Bin 0 -> 171484 bytes
i18n/en.toml | 5 +-
i18n/zh.toml | 3 +
layouts/404.html | 16 +-
layouts/_default/_markup/render-image.html | 20 ++
layouts/_default/_markup/render-link.html | 10 +
layouts/_default/baseof.html | 20 +-
layouts/_default/section.html | 16 +-
layouts/_default/single.html | 55 ++---
layouts/_default/single.md | 2 +-
layouts/_default/summary.html | 5 +-
layouts/index.atom.xml | 60 +++--
layouts/index.html | 34 +--
layouts/partials/comments.html | 6 +-
layouts/partials/head.html | 8 +-
layouts/posts/single.html | 22 +-
layouts/rss.xml | 82 ++++---
layouts/shortcodes/typeit.html | 2 +-
layouts/sitemap.xml | 59 +++--
layouts/taxonomy/list.html | 2 +-
layouts/taxonomy/terms.html | 2 +-
...s_b95b077eb505d5c0aff8055eaced30ad.content | 2 +-
36 files changed, 705 insertions(+), 429 deletions(-)
rename {exampleSite/static/images => assets/svg}/loading.svg (72%)
create mode 100644 exampleSite/content/posts/markdown-syntax.md
create mode 100644 exampleSite/static/images/markdown.png
create mode 100644 layouts/_default/_markup/render-image.html
create mode 100644 layouts/_default/_markup/render-link.html
diff --git a/archetypes/default.md b/archetypes/default.md
index 4ee62f42..97e6386d 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -6,13 +6,13 @@ draft: true
description: ""
show_in_homepage: true
show_description: false
-license: ''
+license: ""
tags: []
categories: []
-featured_image: ''
-featured_image_preview: ''
+featured_image: ""
+featured_image_preview: ""
comment: true
toc: false
diff --git a/assets/css/_core/_base.scss b/assets/css/_core/_base.scss
index 80cf7df0..6d1a264a 100644
--- a/assets/css/_core/_base.scss
+++ b/assets/css/_core/_base.scss
@@ -1,7 +1,5 @@
-@import url(https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900);
-
html {
- font-family: "Lato", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", STHeiti, "Microsoft Yahei", "WenQuanYi Micro Hei", Arial, Verdana, sans-serif;
+ font-family: $global-font-family;
/* scrollbar, only support webkit */
&::-webkit-scrollbar {
diff --git a/assets/css/_core/_media.scss b/assets/css/_core/_media.scss
index 0f5d524c..e8a0f61b 100644
--- a/assets/css/_core/_media.scss
+++ b/assets/css/_core/_media.scss
@@ -1,5 +1,5 @@
@media only screen and (max-width: 1800px) {
- .post-warp {
+ .warpper {
max-width: 780px;
.post-toc {
@@ -9,7 +9,7 @@
}
@media only screen and (max-width: 1300px) {
- .post-warp {
+ .warpper {
max-width: 560px;
.post-toc {
@@ -25,7 +25,7 @@
}
}
- .post-warp {
+ .warpper {
max-width: 80%;
.post-toc {
@@ -38,7 +38,7 @@
}
}
-@media only screen and (max-width: 480px) {
+@media only screen and (max-width: 560px) {
.navbar {
display: none;
}
@@ -47,7 +47,7 @@
display: block;
}
- .post-warp {
+ .warpper {
max-width: 100%;
.categories-card {
diff --git a/assets/css/_core/_normalize.scss b/assets/css/_core/_normalize.scss
index 20dbded8..192eb9ce 100644
--- a/assets/css/_core/_normalize.scss
+++ b/assets/css/_core/_normalize.scss
@@ -1,4 +1,4 @@
-/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
@@ -7,41 +7,35 @@
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
- @charset "UTF-8";
- html {
- line-height: 1.15; /* 1 */
- -webkit-text-size-adjust: 100%; /* 2 */
- }
+
+html {
+ line-height: 1.15; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
/* Sections
- ========================================================================== */
+ ========================================================================== */
/**
-* Remove the margin in all browsers.
-*/
+ * Remove the margin in all browsers.
+ */
-html,
-body,
-main,
-div,
-span,
-a,
-li,
-ul,
-hr,
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- padding: 0;
+body {
margin: 0;
}
+
/**
-* Correct the font size and margin on `h1` elements within `section` and
-* `article` contexts in Chrome, Firefox, and Safari.
-*/
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+ display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
h1 {
font-size: 2em;
@@ -49,12 +43,12 @@ h1 {
}
/* Grouping content
- ========================================================================== */
+ ========================================================================== */
/**
-* 1. Add the correct box sizing in Firefox.
-* 2. Show the overflow in Edge and IE.
-*/
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
hr {
box-sizing: content-box; /* 1 */
@@ -63,9 +57,9 @@ hr {
}
/**
-* 1. Correct the inheritance and scaling of font size in all browsers.
-* 2. Correct the odd `em` font sizing in all browsers.
-*/
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
pre {
font-family: monospace, monospace; /* 1 */
@@ -73,20 +67,20 @@ pre {
}
/* Text-level semantics
- ========================================================================== */
+ ========================================================================== */
/**
-* Remove the gray background on active links in IE 10.
-*/
+ * Remove the gray background on active links in IE 10.
+ */
a {
background-color: transparent;
}
/**
-* 1. Remove the bottom border in Chrome 57-
-* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
-*/
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
abbr[title] {
border-bottom: none; /* 1 */
@@ -95,8 +89,8 @@ abbr[title] {
}
/**
-* Add the correct font weight in Chrome, Edge, and Safari.
-*/
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
b,
strong {
@@ -104,9 +98,9 @@ strong {
}
/**
-* 1. Correct the inheritance and scaling of font size in all browsers.
-* 2. Correct the odd `em` font sizing in all browsers.
-*/
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
code,
kbd,
@@ -116,17 +110,17 @@ samp {
}
/**
-* Add the correct font size in all browsers.
-*/
+ * Add the correct font size in all browsers.
+ */
small {
font-size: 80%;
}
/**
-* Prevent `sub` and `sup` elements from affecting the line height in
-* all browsers.
-*/
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
sub,
sup {
@@ -145,23 +139,23 @@ sup {
}
/* Embedded content
- ========================================================================== */
+ ========================================================================== */
/**
-* Remove the border on images inside links in IE 10.
-*/
+ * Remove the border on images inside links in IE 10.
+ */
img {
border-style: none;
}
/* Forms
- ========================================================================== */
+ ========================================================================== */
/**
-* 1. Change the font styles in all browsers.
-* 2. Remove the margin in Firefox and Safari.
-*/
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
button,
input,
@@ -175,30 +169,28 @@ textarea {
}
/**
-* Show the overflow in IE.
-* 1. Show the overflow in Edge.
-*/
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
button,
-input {
- /* 1 */
+input { /* 1 */
overflow: visible;
}
/**
-* Remove the inheritance of text transform in Edge, Firefox, and IE.
-* 1. Remove the inheritance of text transform in Firefox.
-*/
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
button,
-select {
- /* 1 */
+select { /* 1 */
text-transform: none;
}
/**
-* Correct the inability to style clickable types in iOS and Safari.
-*/
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
button,
[type="button"],
@@ -208,8 +200,8 @@ button,
}
/**
-* Remove the inner border and padding in Firefox.
-*/
+ * Remove the inner border and padding in Firefox.
+ */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
@@ -220,8 +212,8 @@ button::-moz-focus-inner,
}
/**
-* Restore the focus styles unset by the previous rule.
-*/
+ * Restore the focus styles unset by the previous rule.
+ */
button:-moz-focusring,
[type="button"]:-moz-focusring,
@@ -231,19 +223,19 @@ button:-moz-focusring,
}
/**
-* Correct the padding in Firefox.
-*/
+ * Correct the padding in Firefox.
+ */
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
-* 1. Correct the text wrapping in Edge and IE.
-* 2. Correct the color inheritance from `fieldset` elements in IE.
-* 3. Remove the padding so developers are not caught out when they zero out
-* `fieldset` elements in all browsers.
-*/
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
legend {
box-sizing: border-box; /* 1 */
@@ -255,25 +247,25 @@ legend {
}
/**
-* Add the correct vertical alignment in Chrome, Firefox, and Opera.
-*/
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
progress {
vertical-align: baseline;
}
/**
-* Remove the default vertical scrollbar in IE 10+.
-*/
+ * Remove the default vertical scrollbar in IE 10+.
+ */
textarea {
overflow: auto;
}
/**
-* 1. Add the correct box sizing in IE 10.
-* 2. Remove the padding in IE 10.
-*/
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
[type="checkbox"],
[type="radio"] {
@@ -282,8 +274,8 @@ textarea {
}
/**
-* Correct the cursor style of increment and decrement buttons in Chrome.
-*/
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
@@ -291,9 +283,9 @@ textarea {
}
/**
-* 1. Correct the odd appearance in Chrome and Safari.
-* 2. Correct the outline style in Safari.
-*/
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
[type="search"] {
-webkit-appearance: textfield; /* 1 */
@@ -301,17 +293,17 @@ textarea {
}
/**
-* Remove the inner padding in Chrome and Safari on macOS.
-*/
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
-* 1. Correct the inability to style clickable types in iOS and Safari.
-* 2. Change font properties to `inherit` in Safari.
-*/
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
@@ -319,38 +311,38 @@ textarea {
}
/* Interactive
- ========================================================================== */
+ ========================================================================== */
/*
-* Add the correct display in Edge, IE 10+, and Firefox.
-*/
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
details {
display: block;
}
/*
-* Add the correct display in all browsers.
-*/
+ * Add the correct display in all browsers.
+ */
summary {
display: list-item;
}
/* Misc
- ========================================================================== */
+ ========================================================================== */
/**
-* Add the correct display in IE 10+.
-*/
+ * Add the correct display in IE 10+.
+ */
template {
display: none;
}
/**
-* Add the correct display in IE 10.
-*/
+ * Add the correct display in IE 10.
+ */
[hidden] {
display: none;
diff --git a/assets/css/_page/_index.scss b/assets/css/_page/_index.scss
index e0f88941..8a0b5df4 100644
--- a/assets/css/_page/_index.scss
+++ b/assets/css/_page/_index.scss
@@ -1,6 +1,6 @@
@import "_home";
-.post-warp {
+.warpper {
position: relative;
width: 100%;
max-width: 960px;
@@ -26,4 +26,4 @@
text-align: right;
padding-bottom: 2rem;
}
-}
\ No newline at end of file
+}
diff --git a/assets/css/_page/_post.scss b/assets/css/_page/_post.scss
index 8bac91a6..513eb44e 100644
--- a/assets/css/_page/_post.scss
+++ b/assets/css/_page/_post.scss
@@ -7,14 +7,14 @@
.post-meta {
font-size: .88rem;
- color: rgba(85, 85, 85, 0.52941) !important;
+ color: $global-font-secondary-color;
span {
display: inline-block;
}
.dark-theme & {
- color: $global-font-secondary-color-dark !important;
+ color: $global-font-secondary-color-dark;
}
a {
@@ -246,7 +246,6 @@
max-width: 100%;
margin: .625rem 0;
border-spacing: 0;
- box-shadow: 2px 2px 3px rgba(0,0,0,.125);
background: $table-background-color;
.dark-theme & {
@@ -306,7 +305,7 @@
margin: 0 0 2em 0;
position: relative;
- &:before {
+ &::before {
content: '\201C';
position: absolute;
top: 0em;
@@ -323,8 +322,8 @@
}
}
- &:after {
- content: "#blockquote" attr(cite);
+ &::after {
+ content: '#blockquote' attr(cite);
display: block;
text-align: right;
font-size: 0.875em;
@@ -340,6 +339,14 @@
}
}
+ .footnotes {
+ color: $global-font-secondary-color;
+
+ .dark-theme & {
+ color: $global-font-secondary-color-dark;
+ }
+ }
+
@import "../_partial/_post/code";
@import "../_partial/_post/admonition";
@@ -420,45 +427,9 @@
.code {
padding: .375rem;
font-size: .875rem;
- font-family: Consolas, Monaco, Menlo, Consolas, monospace;
+ font-family: $code-font-family;
font-weight: bold;
word-break: break-all;
-
- .k {
- color: #D371E3;
- }
-
- .kt {
- color: #D371E3;
- }
-
- .kc {
- color: #D371E3;
- }
-
- .o {
- color: #D371E3;
- }
-
- .nf {
- color: #F16473;
- }
-
- .na {
- color: #41B1F5;
- }
-
- .s {
- color: #8BC56F;
- }
-
- .n {
- color: #DB975C;
- }
-
- .c1 {
- color: #7E848F;
- }
}
}
@@ -544,20 +515,20 @@
}
.post-nav {
- &:before,
- &:after {
- content: " ";
+ &::before,
+ &::after {
+ content: ' ';
display: table;
}
& a.prev,
& a.next {
- font-weight: 600;
font-size: 1rem;
+ font-weight: 600;
+ transition-duration: .3s;
transition-property: transform;
transition-timing-function: ease-out;
- transition-duration: 0.3s;
}
& a.prev {
@@ -580,4 +551,4 @@
.post-comment {
padding: 4rem 0;
-}
\ No newline at end of file
+}
diff --git a/assets/css/_page/_posts.scss b/assets/css/_page/_posts.scss
index 9daa4cf8..43e4a18b 100644
--- a/assets/css/_page/_posts.scss
+++ b/assets/css/_page/_posts.scss
@@ -24,7 +24,7 @@
width: 100%;
padding: 30% 0 0;
position: relative;
- margin-bottom: 1rem;
+ margin: 0.6rem auto;
img {
position: absolute;
@@ -32,7 +32,7 @@
height: 100%;
left: 0;
top: 0;
- object-fit: scale-down;
+ object-fit: cover;
}
}
diff --git a/assets/css/_partial/_post/_code.scss b/assets/css/_partial/_post/_code.scss
index d43d256f..8d2d0ffe 100644
--- a/assets/css/_partial/_post/_code.scss
+++ b/assets/css/_partial/_post/_code.scss
@@ -34,9 +34,8 @@ p > code {
// chroma
.highlight > .chroma {
margin: 1em 0;
- border-radius: 5px;
+ border-radius: 6px;
overflow-x: auto;
- box-shadow: 1px 1px 2px rgba(0,0,0,0.125);
position: relative;
background: $code-background-color;
@@ -66,7 +65,7 @@ p > code {
}
@each $sign, $text in $code-type-list {
- &.#{$sign} table::after {
+ & .#{$sign} table::after {
content: $text;
}
}
@@ -119,7 +118,7 @@ p > code {
}
}
-.code {
+.highlight {
/* Parentheses */ .p { color: #A9A9B3 }
/* Keyword */ .k { color: #859900 }
/* KeywordConstant */ .kc { color: #859900; font-weight: bold }
diff --git a/assets/css/_variables.scss b/assets/css/_variables.scss
index 26412a78..4301ae86 100644
--- a/assets/css/_variables.scss
+++ b/assets/css/_variables.scss
@@ -3,6 +3,10 @@
// ==============================
// ========== Global ========== //
+@import url(https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900);
+
+$global-font-family: Lato, -apple-system, BlinkMacSystemFont, PingFang-SC-Regular, Hiragino Sans GB, Microsoft Yahei, Arial, sans-serif !default;
+
// Background color of the body
$global-background-color: #fff !default;
$global-background-color-dark: #292a2d !default;
@@ -31,7 +35,7 @@ $navbar-active-color-dark: #fff !default;
$post-link-color: #2d96bd !default;
$post-link-color-dark: #eee !default;
$post-link-hover-color: #ef3982 !default;
-$post-link-hover-color-dark: #fff !default;
+$post-link-hover-color-dark: #2d96bd !default;
$pagination-link-color: #2d96bd !default;
$pagination-link-color-dark: #a9a9b3 !default;
@@ -52,7 +56,7 @@ $code-color: #E74C3C !default;
$code-color-dark: #E5BF78 !default;
// Color of the code background.
-$code-background-color: whitesmoke !default;
+$code-background-color: #f5f5f5 !default;
$code-background-color-dark: #272C34 !default;
$code-info-color: #cacaca !default;
@@ -61,7 +65,7 @@ $code-info-color: #cacaca !default;
$code-font-size: 13px !default;
// Font family of the code.
-$code-font-family: Consolas, Monaco, Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace !default;
+$code-font-family: Source Code Pro, Consolas, Liberation Mono, Menlo, Courier, monospace !default;
// Code type list.
$code-type-list: (
diff --git a/assets/js/blog.js b/assets/js/blog.js
index be869656..6abaeaad 100644
--- a/assets/js/blog.js
+++ b/assets/js/blog.js
@@ -157,27 +157,23 @@ jQuery(function($) {
};
changeTocState();
- const HEADERFIX = 100;
+ const HEADERFIX = 150;
const $toclink = $('.toc-link');
const $headerlink = $('.headerlink');
const $tocLinkLis = $('.post-toc-content li');
- const activeIndex = function() {
+ const activeIndex = function () {
const scrollTop = $(window).scrollTop();
const headerlinkTop = $.map($headerlink, function(link) {
return $(link).offset().top;
});
- const headerLinksOffsetForSearch = $.map(headerlinkTop, function(offset) {
- return offset - HEADERFIX;
- });
const searchActiveTocIndex = function(array, target) {
for (let i = 0; i < array.length - 1; i++) {
- if (target > array[i] && target <= array[i + 1]) return i;
+ if ( target < array[i + 1]) return i;
}
- if (target > array[array.length - 1]) return array.length - 1;
- return 0;
+ return array.length - 1;
};
- const activeTocIndex = searchActiveTocIndex(headerLinksOffsetForSearch, scrollTop);
+ const activeTocIndex = searchActiveTocIndex(headerlinkTop, scrollTop + HEADERFIX);
$($toclink).removeClass('active');
$($tocLinkLis).removeClass('has-active');
diff --git a/exampleSite/static/images/loading.svg b/assets/svg/loading.svg
similarity index 72%
rename from exampleSite/static/images/loading.svg
rename to assets/svg/loading.svg
index 075a3990..b852575c 100644
--- a/exampleSite/static/images/loading.svg
+++ b/assets/svg/loading.svg
@@ -1,10 +1,10 @@
-
\ No newline at end of file
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 532195c9..218d8b60 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,41 +1,64 @@
baseURL = "https://example.com/"
-languageCode = "en" # website language
-defaultContentLanguage = "en" # [en, zh, ...] determines which i18n file to use
-title = "LoveIt Theme" # website title
-theme = "LoveIt" # theme
-enableGitInfo = false # whether to use git commit log to generate lastmod record
-hasCJKLanguage = false # whether to include chinese/japanese/korean
-paginate = 12 # default amount of posts in each pages
-enableEmoji = true # whether to use emoji code
-enableRobotsTXT = true # whether to use robots.txt
-googleAnalytics = "" # [UA-XXXXXXXX-X] google analytics code
-disqusShortname = "dillonzq" # Disqus shortname to use Disqus in posts
+# website language
+languageCode = "en"
+# [en, zh, ...] determines which i18n file to use
+defaultContentLanguage = "en"
+# website title
+title = "LoveIt Theme"
+# theme
+theme = "LoveIt"
+# whether to use git commit log to generate lastmod record
+enableGitInfo = false
+# whether to include chinese/japanese/korean
+hasCJKLanguage = false
+# default amount of posts in each pages
+paginate = 12
+# whether to use emoji code
+enableEmoji = true
+# whether to use robots.txt
+enableRobotsTXT = true
+# [UA-XXXXXXXX-X] google analytics code
+googleAnalytics = ""
+# copyright description used only for seo schema
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
- # copyright description used only for seo schema
-
- #### Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)
-pygmentsOptions = "linenos=table"
-pygmentsCodefences = true
-pygmentsUseClasses = true
-pygmentsCodefencesGuessSyntax = true
+# Markup related configuration in Hugo
[markup]
-[markup.goldmark]
-[markup.goldmark.renderer]
-unsafe = true
+ # Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)
+ [markup.highlight]
+ codeFences = true
+ guessSyntax = true
+ lineNoStart = 1
+ lineNos = true
+ lineNumbersInTable = true
+ noClasses = false
+ style = "monokai"
+ tabWidth = 4
+ # Goldmark is from Hugo 0.60 the default library used for Markdown
+ [markup.goldmark]
+ [markup.goldmark.renderer]
+ unsafe = true
+ # Table Of Contents settings
+ [markup.tableOfContents]
+ startLevel = 2
+ endLevel = 6
-[author] #### Author Info
- name = "XXXX"
+# Author Info
+[author]
+ name = "xxxx"
-[sitemap] #### Sitemap Info
+# Sitemap Info
+[sitemap]
changefreq = "weekly"
filename = "sitemap.xml"
priority = 0.5
-[Permalinks] #### Permalinks Info (https://gohugo.io/content-management/urls/#permalinks)
+# Permalinks Info (https://gohugo.io/content-management/urls/#permalinks)
+[Permalinks]
posts = ":year/:month/:filename"
-[menu] #### Menu Info
+# Menu Info
+[menu]
[[menu.main]]
identifier = "posts"
name = "Posts"
@@ -62,41 +85,56 @@ unsafe = true
[[menu.main]]
identifier = "zh"
- name = ''
+ name = ''
url = "https://hugo-loveit-zh.netlify.com"
weight = 5
[params]
- version = "5.x" # LoveIt theme version
- description = "LoveIt Theme Demo" # site description
- keywords = ["XXXX", "Theme", "Hugo"] # site keywords
+ # LoveIt theme version
+ version = "0.1.X"
+ # site description
+ description = "LoveIt Theme Demo"
+ # site keywords
+ keywords = ["Theme", "Hugo"]
- #### Home Page Info
- home_mode = "post" # [post, other] home mode
- home_paginate = 6 # special amount of posts in each home post page
- avatar = "images/avatar.png" # URL of avatar shown in home page
- subtitle = "A Clean, Elegant but Advanced Hugo Theme" # subtitle shown in home page
+ # Home Page Info
+ ## [post, other] home mode
+ home_mode = "post"
+ ## special amount of posts in each home post page
+ home_paginate = 6
+ ## URL of avatar shown in home page
+ avatar = "images/avatar.png"
+ ## subtitle shown in home page
+ subtitle = "A Clean, Elegant but Advanced Hugo Theme"
- socialShare = true # whether to show social share links in post page
+ # whether to show social share links in post page
+ socialShare = true
- #### Footer CopyRight Info
- since = 2018 # Site creation time
- icp = '' # ICP info only in China (HTML format is allowed)
+ # Footer CopyRight Info
+ ## Site creation time
+ since = 2018
+ ## ICP info only in China (HTML format is allowed)
+ icp = ""
+ ## license info (HTML format is allowed)
license= 'CC BY-NC 4.0'
- # license info (HTML format is allowed)
- gitRepo = "" # public git repo url to link lastmod git commit only then enableGitInfo is true
- linkToMarkdown = true # whether to show link to Raw Markdown content of the post
+ # public git repo url to link lastmod git commit only then enableGitInfo is true
+ gitRepo = ""
- #### site verification code for Google/Bing/Yandex/Pinterest/Baidu
+ # whether to show link to Raw Markdown content of the post
+ linkToMarkdown = true
+
+ # site verification code for Google/Bing/Yandex/Pinterest/Baidu
google_verification = ""
bing_verification = ""
yandex_verification = ""
pinterest_verification = ""
baidu_verification = ""
- [params.cdn] #### CSS and JS Files CDN
- fontawesome_free_css = '' # for example ''
+ # CSS and JS Files CDN
+ [params.cdn]
+ ## for example ''
+ fontawesome_free_css = ''
animate_css = ''
gitalk_css = ''
gitalk_js = ''
@@ -116,15 +154,17 @@ unsafe = true
aplayer_js = ''
meting_js = ''
- [params.gravatar] # Gravatar Info for preferred avatar in home page
+ # Gravatar Info for preferred avatar in home page
+ [params.gravatar]
email = ""
- [params.social] # Social Info in home page
+ # Social Info in home page
+ [params.social]
GitHub = "xxxx"
Linkedin = "xxxx"
Twitter = "xxxx"
#Instagram = "xxxx"
- #Email = "xxxx"
+ Email = "xxxx@outlook.com"
Facebook = "xxxx"
Telegram = "xxxx"
#Medium = "xxxx"
@@ -180,7 +220,8 @@ unsafe = true
#Thingiverse = "xxxx"
#Devto = "xxxx"
- [params.share] # Social Share Links in post page
+ # Social Share Links in post page
+ [params.share]
enable = true
Twitter = true
Facebook = true
@@ -193,30 +234,40 @@ unsafe = true
#VKontakte = true
#Weibo = true
- [params.publisher] # Publisher Info just for SEO
- name = "XXXX"
+ # Publisher Info just for SEO
+ [params.publisher]
+ name = "xxxx"
[params.publisher.logo]
url = "logo.png"
width = 127
height = 40
- [params.logo] # Website Log Info just for SEO
+ # Website Log Info just for SEO
+ [params.logo]
url = "logo.png"
width = 127
height = 40
- [params.image] # Website Image Info just for SEO
+ # Website Image Info just for SEO
+ [params.image]
url = "cover.png"
width = 800
height = 600
- [params.gitalk] # Gittalk Comment Config (https://github.com/gitalk/gitalk)
+ # Disqus Comment Config (https://disqus.com/)
+ [params.disqus]
+ # Disqus shortname to use Disqus in posts
+ shortname = ""
+
+ # Gittalk Comment Config (https://github.com/gitalk/gitalk)
+ [params.gitalk]
owner = ""
repo = ""
clientId = ""
clientSecret = ""
- [params.valine] # Valine Comment Config (https://github.com/xCss/Valine)
+ # Valine Comment Config (https://github.com/xCss/Valine)
+ [params.valine]
enable = false
appId = ""
appKey = ""
@@ -227,30 +278,35 @@ unsafe = true
visitor = true
recordIP = true
- [params.facebook] # Facebook Comment Config (https://developers.facebook.com/docs/plugins/comments)
+ # Facebook Comment Config (https://developers.facebook.com/docs/plugins/comments)
+ [params.facebook]
enable = false
width = "100%"
numPosts = 10
appId = ""
languageCode = "en_US"
-[privacy] #### Privacy Info (https://gohugo.io/about/hugo-and-gdpr/)
+# Privacy Info (https://gohugo.io/about/hugo-and-gdpr/)
+[privacy]
[privacy.googleAnalytics]
anonymizeIP = true
[privacy.youtube]
privacyEnhanced = true
-[mediaTypes] #### Options to make hugo output .md files.
+# Options to make hugo output .md files.
+[mediaTypes]
[mediaTypes."text/plain"]
suffixes = ["md"]
-[outputFormats.MarkDown] #### Options to make hugo output .md files.
+# Options to make hugo output .md files.
+[outputFormats.MarkDown]
mediaType = "text/plain"
isPlainText = true
isHTML = false
-[outputs] #### Options to make hugo output .md files.
+# Options to make hugo output files.
+[outputs]
home = ["HTML", "RSS"]
page = ["HTML", "MarkDown"]
section = ["HTML", "RSS"]
diff --git a/exampleSite/content/posts/LoveIt-Preview.md b/exampleSite/content/posts/LoveIt-Preview.md
index b9f215d1..f9938d61 100644
--- a/exampleSite/content/posts/LoveIt-Preview.md
+++ b/exampleSite/content/posts/LoveIt-Preview.md
@@ -6,13 +6,13 @@ draft: false
description: "This is a LoveIt theme preview and documentation page."
show_in_homepage: true
show_description: false
-license: ''
+license: ""
-tags: ['Hugo', 'Theme']
-categories: ['Documentation']
+tags: ["Hugo", "Theme"]
+categories: ["Documentation"]
-featured_image: ''
-featured_image_preview: ''
+featured_image: ""
+featured_image_preview: ""
comment: true
toc: true
diff --git a/exampleSite/content/posts/markdown-syntax.md b/exampleSite/content/posts/markdown-syntax.md
new file mode 100644
index 00000000..ffb943a7
--- /dev/null
+++ b/exampleSite/content/posts/markdown-syntax.md
@@ -0,0 +1,169 @@
+---
+author: "Hugo Authors"
+title: "Markdown Syntax Guide"
+date: 2020-01-30T21:57:40+08:00
+lastmod: 2020-01-30T21:57:40+08:00
+draft: false
+description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
+show_in_homepage: true
+show_description: false
+license: ""
+
+tags: [
+ "markdown",
+ "css",
+ "html",
+ "themes",
+]
+categories: [
+ "themes",
+ "syntax",
+]
+
+featured_image: /images/markdown.png
+featured_image_preview: ""
+
+comment: true
+toc: true
+autoCollapseToc: true
+math: false
+---
+
+This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
+
+
+## Headings
+
+The following HTML `
`—`
` elements represent six levels of section headings. `
` is the highest section level while `
` is the lowest.
+
+## H2
+### H3
+#### H4
+##### H5
+###### H6
+
+## Paragraph
+
+Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum,
+voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit
+peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur,
+offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur,
+cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea
+corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum
+fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate
+dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer
+sperchicium faceata tiustia prat.
+
+Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is
+sinveli squiatum, core et que aut hariosam ex eat.
+
+## Blockquotes
+
+The blockquote element represents content that is quoted from another source, optionally
+with a citation which must be within a `footer` or `cite` element, and optionally with
+in-line changes such as annotations and abbreviations.
+
+### Blockquote without attribution
+
+> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
+> **Note** that you can use *Markdown syntax* within a blockquote.
+
+### Blockquote with attribution
+
+> Don't communicate by sharing memory, share memory by communicating.
+> — Rob Pike[^1]
+
+## Tables
+
+Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
+
+ Name | Age
+--------|------
+ Bob | 27
+ Alice | 23
+
+### Inline Markdown within tables
+
+| Inline | Markdown | In | Table |
+| ---------- | --------- | ----------------- | ---------- |
+| *italics* | **bold** | ~~strikethrough~~ | `code` |
+
+## Code Blocks
+
+### Code block with backticks
+
+```html
+
+
+
+
+ Example HTML5 Document
+
+
+
Test
+
+
+```
+
+### Code block indented with four spaces
+
+
+
+
+
+ Example HTML5 Document
+
+
+
Test
+
+
+
+### Code block with Hugo's internal highlight shortcode
+
+{{< highlight html >}}
+
+
+
+
+ Example HTML5 Document
+
+
+
Test
+
+
+{{< /highlight >}}
+
+## List Types
+
+### Ordered List
+
+1. First item
+2. Second item
+3. Third item
+
+### Unordered List
+
+* List item
+* Another item
+* And another item
+
+### Nested list
+
+* Item
+ 1. First Sub-item
+ 2. Second Sub-item
+
+## Other Elements — abbr, sub, sup, kbd, mark
+
+GIF is a bitmap image format.
+
+H2O
+
+Xn + Yn = Zn
+
+Press CTRL+ALT+Delete to end the session.
+
+Most salamanders are nocturnal, and hunt for insects, worms,
+and other small creatures.
+
+[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
diff --git a/exampleSite/static/images/markdown.png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