summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroninro <liumy.f@foxmail.com>2022-08-10 12:14:54 +0800
committerroninro <liumy.f@foxmail.com>2022-08-10 12:14:54 +0800
commitc6472f7098c7a8f85cee395934ba4e706d40b672 (patch)
tree1ad3acc8ad15a3d0b1963d93726a67dd7c925dbb
parentdfb6b815514a14c311ee5a1027c8d2669f2430f8 (diff)
*
-rw-r--r--LICENSE236
-rw-r--r--README.md33
-rw-r--r--archetypes/default.md4
-rw-r--r--assets/sass/_highlight.scss5
-rw-r--r--assets/sass/_mixins.scss2
-rw-r--r--assets/sass/main.scss8
-rw-r--r--exampleSite/config.toml38
-rw-r--r--exampleSite/content/posts/configuration.md232
-rw-r--r--exampleSite/content/posts/getting-started.md95
-rw-r--r--exampleSite/content/posts/markdown-syntax.md1
-rw-r--r--exampleSite/content/series/themes-guide/_index.md6
-rw-r--r--exampleSite/static/android-chrome-192x192.pngbin0 -> 6553 bytes
-rw-r--r--exampleSite/static/android-chrome-512x512.pngbin0 -> 19298 bytes
-rw-r--r--exampleSite/static/apple-touch-icon.pngbin0 -> 5945 bytes
-rw-r--r--exampleSite/static/favicon-16x16.pngbin0 -> 444 bytes
-rw-r--r--exampleSite/static/favicon-32x32.pngbin0 -> 895 bytes
-rw-r--r--exampleSite/static/favicon.icobin0 -> 15406 bytes
-rw-r--r--exampleSite/static/site.webmanifest1
-rw-r--r--layouts/_default/baseof.html8
-rw-r--r--layouts/_default/series.html14
-rw-r--r--layouts/_default/summary.html5
-rw-r--r--layouts/partials/friends.html2
-rw-r--r--layouts/partials/intro-header.html20
23 files changed, 641 insertions, 69 deletions
diff --git a/LICENSE b/LICENSE
index 147d594..ff6ecfa 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,20 +1,216 @@
-The MIT License (MIT)
-
-Copyright (c) 2022 YOUR_NAME_HERE
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2015-2016 Huxpro
+
+ https://github.com/Huxpro/
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+=======================================================================
+Hux Blog Subcomponents:
+
+The Hux Blog project contains subcomponents with separate copyright
+notices and license terms. Your use of the source code for the these
+subcomponents is subject to the terms and conditions of the following
+licenses.
+
+(MIT License) Clean Blog Jekyll Theme: https://github.com/BlackrockDigital/startbootstrap-clean-blog-jekyll/
+https://github.com/BlackrockDigital/startbootstrap-clean-blog-jekyll/blob/master/LICENSE
+Copyright (c) 2013-2016 Blackrock Digital LLC.
diff --git a/README.md b/README.md
index f77cd07..df10742 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,20 @@
[Demo](https://hugo-theme-puppet.netlify.app/)
+## Features
+
+- [x] Responsive
+- [x] SEO
+- [x] Table of Contents
+- [x] Image Zoom
+- [x] Syntax Highlighting
+- [x] Search
+- [x] Comments
+- [x] Google Analytics
+- [x] Custom CSS and JS
+- [x] Custom 404 Page
+- [x] Custom Favicon
+
## Installation
```bash
@@ -28,23 +42,6 @@ add `archive/_index.md` to your `content` folder. This file will be used as the
like the archive page, add `about/_index.md` to your `content` folder.
-## Front Matter example
-
-see [default.md](archetypes/default.md)
-
-```markdown
-+++
-title: "{{ replace .Name "-" " " | title }}"
-date: {{ .Date }}
-draft: true
-header_img: ""
-short: false
-toc = true
-tags = []
-categories = []
-+++
-```
-
## License
-[MIT](LICENSE) \ No newline at end of file
+[Apache](LICENSE) \ No newline at end of file
diff --git a/archetypes/default.md b/archetypes/default.md
index 826319f..4208d5c 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -2,9 +2,13 @@
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
draft = true
+description = ""
+subtitle = ""
header_img = ""
short = false
toc = true
tags = []
categories = []
+series = []
+comment = true
+++
diff --git a/assets/sass/_highlight.scss b/assets/sass/_highlight.scss
new file mode 100644
index 0000000..13ee106
--- /dev/null
+++ b/assets/sass/_highlight.scss
@@ -0,0 +1,5 @@
+.highlight {
+ pre {
+ font-size: 14px;
+ }
+}
diff --git a/assets/sass/_mixins.scss b/assets/sass/_mixins.scss
index 982d471..cd38bb0 100644
--- a/assets/sass/_mixins.scss
+++ b/assets/sass/_mixins.scss
@@ -14,7 +14,7 @@
}
@mixin monospace() {
- font-family: "Fira Code", Menlo, Monaco, Consolas, "Courier New", monospace;
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}
@mixin serif() {
diff --git a/assets/sass/main.scss b/assets/sass/main.scss
index 3f986db..8bd0d42 100644
--- a/assets/sass/main.scss
+++ b/assets/sass/main.scss
@@ -3,6 +3,7 @@
@import "_sidebar.scss";
@import "_side-catalog.scss";
@import "_search.scss";
+@import "_highlight.scss";
// Global Components
@@ -748,7 +749,12 @@ samp {
.post-content-preview {
font-size: 13px;
font-style: italic;
- color: $brand-gray;
+ color: $brand-gray !important;
+
+ p {
+ margin: 0;
+ }
+
&:hover {
color: $brand-primary;
}
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index dda1b63..57a0510 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,27 +1,28 @@
baseURL = "http://localhost:1313/"
-title = "Puppet Theme"
+title = "Puppet"
+
+theme = "puppet"
+themesDir = "../.."
copyright = ""
paginate = 3
languageCode = "en"
defaultContentLanguage = "en"
-hasCJKLanguage = false
+hasCJKLanguage = true
enableInlineShortcodes = true
enableEmoji = true
# prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API.
# See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456
ignoreErrors = ["error-remote-getjson"]
-theme = "puppet"
-themesDir = "../.."
-
disqusShortname = ""
googleAnalytics = ""
[outputs]
home = ["HTML", "JSON", "RSS"]
+# prevent build failures when using Hugo's template _internal/opengraph.html
[taxonomies]
category = "categories"
tag = "tags"
@@ -29,6 +30,7 @@ series = "series"
[markup]
[markup.highlight]
+noClasses = true
codeFences = true
guessSyntax = true
lineNos = true
@@ -45,20 +47,26 @@ name = "Home"
url = "/"
weight = -100
[[menu.main]]
-identifier = "about"
-name = "About"
-url = "/about/"
-weight = 100
-[[menu.main]]
identifier = "archive"
name = "Archive"
url = "/archive/"
weight = 10
[[menu.main]]
-identifier = "tags"
-name = "Tags"
-url = "/tags/"
+identifier = "guide"
+name = "Guide"
+url = "/series/themes-guide/"
weight = 20
+[[menu.main]]
+identifier = "about"
+name = "About"
+url = "/about/"
+weight = 50
+[[menu.main]]
+identifier = "github"
+name = "Github"
+url = "https://github.com/roninro/hugo-theme-puppet/"
+weight = 100
+
[params]
author = "Puppet"
@@ -67,10 +75,11 @@ keywords = "blog,developer,personal"
img_home = "/img/home-bg.jpg"
img_404 = "/img/404-bg.jpg"
+useFaviconGenerator = true
+
custom_js = []
custom_css = [] # ["css/custom.css"] Add your file to assets folder [assets/css/custom.css]
-
[params.sidebar]
enable = true
avatar = "/img/home-bg.jpg"
@@ -103,4 +112,3 @@ category_id = "DIC_kwDOHuvyh84CQjDo"
input_position = "top"
theme = "light_tritanopia"
lang = "en"
-
diff --git a/exampleSite/content/posts/configuration.md b/exampleSite/content/posts/configuration.md
new file mode 100644
index 0000000..3d394a1
--- /dev/null
+++ b/exampleSite/content/posts/configuration.md
@@ -0,0 +1,232 @@
++++
+title = "Puppet - User Guide"
+date = 2022-08-09T19:04:45+08:00
+draft = true
+header_img = "/img/home-bg.jpg"
+subtitle = "say hello to the world"
+short = true
+toc = true
+tags = ["documentation"]
+categories = []
+series = ["Themes Guide"]
++++
+
+Customize the theme by editing the `config.toml` file.
+
+<!--more-->
+
+## Site Configuration
+
+the complete configuration file is as follows:
+
+```toml
+baseURL = "http://localhost:1313/"
+title = "Puppet Theme"
+theme = "puppet"
+
+paginate = 3 # Number of items per page in paginated lists
+languageCode = "en"
+defaultContentLanguage = "en"
+# whether to include Chinese/Japanese/Korean
+hasCJKLanguage = true
+enableInlineShortcodes = true
+enableEmoji = true
+# prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API.
+# See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456
+ignoreErrors = ["error-remote-getjson"]
+
+disqusShortname = ""
+googleAnalytics = ""
+
+[outputs]
+home = ["HTML", "JSON", "RSS"]
+
+# prevent build failures when using Hugo's template _internal/opengraph.html
+[taxonomies]
+category = "categories"
+tag = "tags"
+series = "series"
+
+[markup]
+[markup.highlight]
+codeFences = true
+guessSyntax = true
+lineNos = true
+lineNumbersInTable = false
+style = "dracula"
+
+[markup.goldmark.renderer]
+unsafe = true
+
+[menu]
+[[menu.main]]
+identifier = "home" # the identifier of the menu item
+name = "Home"
+url = "/"
+weight = -100 # the weight of the menu item. Less weight items will be displayed first.
+
+
+[params]
+author = "Puppet" # default author
+description = "A simple and clean theme for Hugo" # site description
+keywords = "blog,developer,personal"
+img_home = "/img/home-bg.jpg" # home page header image
+img_404 = "/img/404-bg.jpg" # 404 page background image
+
+useFaviconGenerator = true # use favicon generator
+
+custom_js = []
+custom_css = [] # ["css/custom.css"] Add your file to assets folder [assets/css/custom.css]
+
+[params.sidebar]
+enable = true
+avatar = "/img/home-bg.jpg"
+bio = "a personal website"
+
+[params.social]
+rss_enable = true
+twitter = "johndoe"
+facebook = "johndoe"
+zhihu = "johndoe"
+weibo = "johndoe"
+github = "johndoe"
+linkedin = "johndoe"
+
+[[params.friends]]
+name = "John Doe"
+url = "https://gohugo.io"
+
+# See https://giscus.app/
+[params.giscus]
+enable = true
+repo = "roninro/hugo-theme-puppet"
+repo_id = "R_kgDOHuvyhw"
+category = "General"
+category_id = "DIC_kwDOHuvyh84CQjDo"
+input_position = "top"
+theme = "light_tritanopia"
+lang = "en"
+```
+
+## Favicons
+
+### Not using favicon generator
+
+Just put your `favicon.ico` files in the `static` folder of your site.
+
+### Using favicon generator
+
+1. Set the `useFaviconGenerator` parameter to `true` in the `config.toml` file.
+
+ ```toml
+ [params]
+ useFaviconGenerator = true
+ ```
+
+2. Generate your favicon at [favicon.io](https://favicon.io/favicon-converter/).
+3. Place the files in the `static` of your website root directory.
+
+ - android-chrome-192x192.png
+ - android-chrome-512x512.png
+ - apple-touch-icon.png
+ - favicon-16x16.png
+ - favicon-32x32.png
+ - favicon.ico
+ - site.webmanifest
+
+## Customization of CSS and JS
+
+Add your file to assets folder. Filename must match with config params you set above
+
+```
+assets/scss/custom.scss
+assets/css/custom.css
+assets/js/custom.js
+```
+Add custom css and js files to `config.toml`
+
+```toml
+[params]
+custom_css = ["css/custom.css"]
+custom_js = ["js/custom.js", ...]
+```
+
+## Syntax Highlighting
+
+This the default `highlight` configuration.
+
+```toml
+[markup]
+[markup.highlight]
+codeFences = true
+guessSyntax = true
+lineNos = true
+lineNumbersInTable = false
+style = "dracula"
+```
+
+### Customizing the Highlight Style
+
+with `markup.highlight.noClasses=false` in your site config, you need a style sheet.
+
+You can generate one with Hugo:
+
+```bash
+hugo gen chromastyles --style=dracula > syntax.css
+```
+
+You can also use the [Chroma Style Gallery](https://xyproto.github.io/splash/docs/all.html) to generate a style sheet.
+
+
+## Search
+
+In order to generate `index.json` for searching, add JSON output file type to the home of the outputs part in your site configuration.
+
+```toml
+[outputs]
+ home = ["HTML", "RSS", "JSON"]
+```
+
+## Comments
+
+Puppet Theme supports [Disqus](https://disqus.com/) and [Giscus](https://giscus.app/).
+
+
+## Pages
+
+### Regular Pages
+
+a regular page can contain other pages, images etc. as resources Basically all files in the same folder and below will be part of a bundle.<br />
+such as `content/posts/my-first-hugo-post.md` or `content/posts/my-first-hugo-post/index.md`
+
+### Archive Page
+
+The archive page is a list of all posts in your site. It is generated by the `layouts/section/archive.html` template.
+
+Add `archive/_index.md` file to your `content` folder.
+
+```markdown
++++
+title = "Archive"
+description = "Archive"
+header_img = "/img/archive-bg.jpg"
+short = true
++++
+```
+
+### About Page
+
+like archive page, add `about/_index.md` file to your `content` folder.
+
+```markdown
++++
+title = "About"
+description = "Hugo, the world's fastest framework for building websites"
+header_img = "/img/about-bg.jpg"
+short = false
++++
+
+# About
+
+content here
+```
diff --git a/exampleSite/content/posts/getting-started.md b/exampleSite/content/posts/getting-started.md
new file mode 100644
index 0000000..59a94b9
--- /dev/null
+++ b/exampleSite/content/posts/getting-started.md
@@ -0,0 +1,95 @@
++++
+title = "Puppet - Getting Started"
+date = 2022-08-09T15:38:30+08:00
+draft = true
+header_img = ""
+short = false
+toc = true
+tags = ["documentation", "guide"]
+categories = []
+series = ["Themes Guide"]
++++
+
+Puppet is a responsive, simple and clean [Hugo](https://gohugo.io/) theme based on the [Huxblog Jekyll theme](https://github.com/Huxpro/huxpro.github.io).
+
+<!--more-->
+
+## Install Hugo
+
+Make sure you have installed the lastest version of [Hugo-extented](https://gohugo.io/getting-started/installing/).
+
+## Create a New Site
+
+```
+hugo new site mysite
+```
+
+## Add the Theme
+
+You can download and unpack the theme manually from Github or use git to clone the theme into your site's `themes` directory.
+
+```bash
+cd mysite
+git init
+git clone https://github.com/roninro/hugo-theme-puppet.git themes/puppet
+```
+
+Or you can add the theme as a submodule.
+
+```bash
+cd mysite
+git init
+git submodule add https://github.com/roninro/hugo-theme-puppet.git themes/puppet
+git submodule update --init --recursive
+```
+
+That’s all, Puppet is ready to be used.
+
+
+## Add Config Files
+
+For getting started, you can copy the `config.toml` file from the theme's exampleSite directory to the root directory of your site.
+
+```bash
+cp themes/puppet/exampleSite/config.toml .
+```
+
+> Note: You may need to delete the `themesDir` line in the config file.
+
+## Add Some Content
+
+Create a new post with the following command.
+
+```bash
+hugo new posts/my-first-post.md
+```
+
+Edit the content of the post.
+
+```markdown
++++
+title = "{{ replace .Name "-" " " | title }}"
+date = {{ .Date }}
+description = ""
+draft = true
+subtitle = ""
+header_img = ""
+toc = true
+tags = []
+categories = []
+series = []
+comment = true
++++
+
+Your content here...
+```
+
+Some front-matter used for SEO, others used for displaying contents, configuration, etc.
+
+## Run example site
+
+From the root of themes/puppet/exampleSite:
+
+```bash
+hugo server --themesDir ../..
+```
diff --git a/exampleSite/content/posts/markdown-syntax.md b/exampleSite/content/posts/markdown-syntax.md
index 2bce1f9..54168ba 100644
--- a/exampleSite/content/posts/markdown-syntax.md
+++ b/exampleSite/content/posts/markdown-syntax.md
@@ -7,7 +7,6 @@ tags = [
"markdown",
"css",
"html",
- "咔",
]
categories = [
"themes",
diff --git a/exampleSite/content/series/themes-guide/_index.md b/exampleSite/content/series/themes-guide/_index.md
new file mode 100644
index 0000000..3e1ece6
--- /dev/null
+++ b/exampleSite/content/series/themes-guide/_index.md
@@ -0,0 +1,6 @@
++++
+title = "Themes Guide"
+description = "a series of posts about configuring and using Hugo themes"
+header_img = "/img/home-bg.jpg"
+short = true
++++ \ No newline at end of file
diff --git a/exampleSite/static/android-chrome-192x192.png b/exampleSite/static/android-chrome-192x192.png
new file mode 100644
index 0000000..658956d
--- /dev/null
+++ b/exampleSite/static/android-chrome-192x192.png
Binary files differ
diff --git a/exampleSite/static/android-chrome-512x512.png b/exampleSite/static/android-chrome-512x512.png
new file mode 100644
index 0000000..55b3f3e
--- /dev/null
+++ b/exampleSite/static/android-chrome-512x512.png
Binary files differ
diff --git a/exampleSite/static/apple-touch-icon.png b/exampleSite/static/apple-touch-icon.png
new file mode 100644
index 0000000..16f5e17
--- /dev/null
+++ b/exampleSite/static/apple-touch-icon.png
Binary files differ
diff --git a/exampleSite/static/favicon-16x16.png b/exampleSite/static/favicon-16x16.png
new file mode 100644
index 0000000..1dcdc77
--- /dev/null
+++ b/exampleSite/static/favicon-16x16.png
Binary files differ
diff --git a/exampleSite/static/favicon-32x32.png b/exampleSite/static/favicon-32x32.png
new file mode 100644
index 0000000..69346c5
--- /dev/null
+++ b/exampleSite/static/favicon-32x32.png
Binary files differ
diff --git a/exampleSite/static/favicon.ico b/exampleSite/static/favicon.ico
new file mode 100644
index 0000000..86f3da7
--- /dev/null
+++ b/exampleSite/static/favicon.ico
Binary files differ
diff --git a/exampleSite/static/site.webmanifest b/exampleSite/static/site.webmanifest
new file mode 100644
index 0000000..45dc8a2
--- /dev/null
+++ b/exampleSite/static/site.webmanifest
@@ -0,0 +1 @@
+{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 7b60826..e576d62 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -58,6 +58,12 @@
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{ end -}}
+ {{ if .Site.Params.useFaviconGenerator }}
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+ <link rel="manifest" href="/site.webmanifest">
+ {{ end }}
</head>
<!-- hack iOS CSS :active style -->
@@ -100,7 +106,7 @@
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1
sidebar-container">
<!-- Featured Tags -->
- {{ partial "featured-tags.html" }}
+ {{ partial "featured-tags.html" . }}
<!-- Friends Blog -->
{{ partial "friends.html" . }}
</div>
diff --git a/layouts/_default/series.html b/layouts/_default/series.html
new file mode 100644
index 0000000..1fa27b0
--- /dev/null
+++ b/layouts/_default/series.html
@@ -0,0 +1,14 @@
+{{ define "main" }}
+<!-- Main Content -->
+<div class="container">
+ <div class="row">
+ <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1
+ postlist-container">
+ {{ range .Pages }}
+ {{ .Render "summary" }}
+ {{ end }}
+ </div>
+ </div>
+</div>
+
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
index decc2c3..538c22d 100644
--- a/layouts/_default/summary.html
+++ b/layouts/_default/summary.html
@@ -5,7 +5,10 @@
<h3 class="post-subtitle">{{ . }}</h3>
{{ end }}
<div class="post-content-preview">
- {{ .Summary | plainify }}
+ {{ if isset .Params "description" }} {{ index .Params "description" }}
+ {{ else }}
+ {{ .Summary | plainify | truncate 180 }}
+ {{ end }}
</div>
</a>
<p class="post-meta">
diff --git a/layouts/partials/friends.html b/layouts/partials/friends.html
index f97e727..e23b67a 100644
--- a/layouts/partials/friends.html
+++ b/layouts/partials/friends.html
@@ -4,7 +4,7 @@
<h5>FRIENDS</h5>
<ul class="list-inline">
{{ range $friends }}
- <li><a href="{{ .url }}">{{ .name }}</a></li>
+ <li><a href="{{ .url }}" target="_blank">{{ .name }}</a></li>
{{ end }}
</ul>
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/intro-header.html b/layouts/partials/intro-header.html
index 37c5604..360c90c 100644
--- a/layouts/partials/intro-header.html
+++ b/layouts/partials/intro-header.html
@@ -44,18 +44,18 @@
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ if eq (.Param "short") true }}
<div class="site-heading" id="tag-heading">
- {{ else }}
- <div class="site-heading">
- {{ end }}
- <h1>{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}</h1>
- {{ $description := .Description }}
- {{ if .IsHome }}
- {{ $description = .Site.Params.description }}
- {{ end }}
- <span class="subheading">{{ $description }}</span>
- </div>
+ {{ else }}
+ <div class="site-heading">
+ {{ end }}
+ <h1>{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}</h1>
+ {{ $description := .Description }}
+ {{ if .IsHome }}
+ {{ $description = .Site.Params.description }}
+ {{ end }}
+ <span class="subheading">{{ $description }}</span>
</div>
</div>
</div>
+ </div>
</header>
{{ end }} \ No newline at end of file