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

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <github@jimmycai.com>2022-10-29 18:02:24 +0300
committerGitHub <noreply@github.com>2022-10-29 18:02:24 +0300
commit8a597a5c9c861d2bce22a5e06c7667cd9c8e263a (patch)
treeaa4d68efec6db197b9bb22479177aafe6fc4f91c /exampleSite
parentd60083e055dad5c5c4c0b07568b3df24df8daad7 (diff)
Merge branch 'canary' into master (#711)
* refactor(i18n): simplify the structure of the translation file * chore: prepare repository for v4.0.0-alpha * chore: modify go.mod to v4 * refactor: migrate theme configuration to TOML * fix: exampleSite not using correct theme * feat: add favicon from assets folder * refactor: drop linear grandient background feature remove node-vibrant from dependencies * feat: use Hugo's code block render hook to implement code copy button Now it can have i18n support * refactor: delete color.ts * refactor: delete Emoji support post from example site * refactor: drop support for `hidden` field in front matter * feat: upgrade to PhotoSwipe v5 * chore: bump the required hugo version to 0.100.0 * refactor: remove PhotoSwipe from external.yaml * fix: extra margin in search result * fix: incorrect markdown heading level in example site * refactor: remove some usages of `default` in template No longer needed thanks to Hugo's configuration merge * fix: one line codeblock style in firefox closes https://github.com/CaiJimmy/hugo-theme-stack/issues/564 * feat: add style to new codeblock * feat: i18n support for codeblock copy text * fix(menu): jitter when closing menu It's caused by flexbox gap property, which can't animate * fix(search): long text overflows under the Search icon closes https://github.com/CaiJimmy/hugo-theme-stack/issues/515
Diffstat (limited to 'exampleSite')
-rw-r--r--exampleSite/README.md1
-rw-r--r--exampleSite/assets/img/favicon.pngbin0 -> 1031 bytes
-rw-r--r--exampleSite/assets/img/logo.jpgbin0 -> 21951 bytes
-rw-r--r--exampleSite/config.yaml239
-rw-r--r--exampleSite/config/_default/config.toml20
-rw-r--r--exampleSite/config/_default/languages.toml16
-rw-r--r--exampleSite/config/_default/markup.toml18
-rw-r--r--exampleSite/config/_default/menu.toml20
-rw-r--r--exampleSite/config/_default/params.toml106
-rw-r--r--exampleSite/config/_default/permalinks.toml3
-rw-r--r--exampleSite/config/_default/related.toml12
-rw-r--r--exampleSite/content/post/emoji-support/index.md50
-rw-r--r--exampleSite/content/post/emoji-support/the-creative-exchange-d2zvqp3fpro-unsplash.jpgbin35369 -> 0 bytes
-rw-r--r--exampleSite/content/post/markdown-syntax/index.md39
14 files changed, 210 insertions, 314 deletions
diff --git a/exampleSite/README.md b/exampleSite/README.md
deleted file mode 100644
index 1b6d403..0000000
--- a/exampleSite/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Example site modified from https://github.com/gohugoio/hugoBasicExample \ No newline at end of file
diff --git a/exampleSite/assets/img/favicon.png b/exampleSite/assets/img/favicon.png
new file mode 100644
index 0000000..74e8efa
--- /dev/null
+++ b/exampleSite/assets/img/favicon.png
Binary files differ
diff --git a/exampleSite/assets/img/logo.jpg b/exampleSite/assets/img/logo.jpg
new file mode 100644
index 0000000..145804e
--- /dev/null
+++ b/exampleSite/assets/img/logo.jpg
Binary files differ
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
deleted file mode 100644
index c1b48dd..0000000
--- a/exampleSite/config.yaml
+++ /dev/null
@@ -1,239 +0,0 @@
-baseurl: https://example.com
-languageCode: en-us
-theme: hugo-theme-stack
-paginate: 5
-title: Example Site
-
-languages:
- en:
- languageName: English
- title: Example Site
- description: Example description
- weight: 1
- zh-cn:
- languageName: 中文
- title: 演示站点
- description: 演示说明
- weight: 2
- ar:
- languageName: عربي
- languagedirection: rtl
- title: موقع تجريبي
- description: وصف تجريبي
- weight: 3
-
-# Change it to your Disqus shortname before using
-disqusShortname: hugo-theme-stack
-
-# GA Tracking ID
-googleAnalytics:
-
-# Theme i18n support
-# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
-DefaultContentLanguage: en
-
-# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
-# This will make .Summary and .WordCount behave correctly for CJK languages.
-hasCJKLanguage: false
-
-permalinks:
- post: /p/:slug/
- page: /:slug/
-
-params:
- mainSections:
- - post
- featuredImageField: image
- rssFullContent: true
- favicon: # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary)
-
- footer:
- since: 2020
- customText:
-
- dateFormat:
- published: Jan 02, 2006
- lastUpdated: Jan 02, 2006 15:04 MST
-
- sidebar:
- emoji: 🍥
- subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- avatar:
- enabled: true
- local: true
- src: img/avatar.png
-
- article:
- math: false
- toc: true
- readingTime: true
- license:
- enabled: true
- default: Licensed under CC BY-NC-SA 4.0
-
- comments:
- enabled: true
- provider: disqus
-
- disqusjs:
- shortname:
- apiUrl:
- apiKey:
- admin:
- adminLabel:
-
- utterances:
- repo:
- issueTerm: pathname
- label:
-
- remark42:
- host:
- site:
- locale:
-
- vssue:
- platform:
- owner:
- repo:
- clientId:
- clientSecret:
- autoCreateIssue: false
-
- # Waline client configuration see: https://waline.js.org/en/reference/component.html
- waline:
- serverURL:
- lang:
- pageview:
- emoji:
- - https://unpkg.com/@waline/emojis@1.0.1/weibo
- requiredMeta:
- - name
- - email
- - url
- locale:
- admin: Admin
- placeholder:
-
- twikoo:
- envId:
- region:
- path:
- lang:
-
- # See https://cactus.chat/docs/reference/web-client/#configuration for description of the various options
- cactus:
- defaultHomeserverUrl: "https://matrix.cactus.chat:8448"
- serverName: "cactus.chat"
- siteName: "" # You must insert a unique identifier here matching the one you registered (See https://cactus.chat/docs/getting-started/quick-start/#register-your-site)
-
- giscus:
- repo:
- repoID:
- category:
- categoryID:
- mapping:
- lightTheme:
- darkTheme:
- reactionsEnabled: 1
- emitMetadata: 0
-
- gitalk:
- owner:
- admin:
- repo:
- clientID:
- clientSecret:
-
- cusdis:
- host:
- id:
- widgets:
- homepage:
- - type: search
- - type: archives
- params:
- limit: 5
- - type: categories
- params:
- limit: 10
- - type: tag-cloud
- params:
- limit: 10
- page:
- - type: toc
-
- opengraph:
- twitter:
- # Your Twitter username
- site:
-
- # Available values: summary, summary_large_image
- card: summary_large_image
-
- defaultImage:
- opengraph:
- enabled: false
- local: false
- src:
-
- colorScheme:
- # Display toggle
- toggle: true
-
- # Available values: auto, light, dark
- default: auto
-
- imageProcessing:
- cover:
- enabled: true
- content:
- enabled: true
-
-### Custom menu
-### See https://docs.stack.jimmycai.com/configuration/custom-menu.html
-### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
-menu:
- main: []
-
- social:
- - identifier: github
- name: GitHub
- url: https://github.com/CaiJimmy/hugo-theme-stack
- params:
- icon: brand-github
-
- - identifier: twitter
- name: Twitter
- url: https://twitter.com
- params:
- icon: brand-twitter
-
-related:
- includeNewer: true
- threshold: 60
- toLower: false
- indices:
- - name: tags
- weight: 100
-
- - name: categories
- weight: 200
-
-markup:
- goldmark:
- renderer:
- ## Set to true if you have HTML content inside Markdown
- unsafe: false
- tableOfContents:
- endLevel: 4
- ordered: true
- startLevel: 2
- highlight:
- noClasses: false
- codeFences: true
- guessSyntax: true
- lineNoStart: 1
- lineNos: true
- lineNumbersInTable: true
- tabWidth: 4
diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml
new file mode 100644
index 0000000..548975a
--- /dev/null
+++ b/exampleSite/config/_default/config.toml
@@ -0,0 +1,20 @@
+# Change baseurl before deploy
+baseurl = "https://demo.stack.jimmycai.com"
+languageCode = "en-us"
+paginate = 5
+title = "Hugo Theme Stack Starter"
+theme = "hugo-theme-stack"
+
+# Theme i18n support
+# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
+DefaultContentLanguage = "en"
+
+# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
+# This will make .Summary and .WordCount behave correctly for CJK languages.
+hasCJKLanguage = false
+
+# Change it to your Disqus shortname before using
+disqusShortname = "hugo-theme-stack"
+
+# GA Tracking ID
+googleAnalytics = ""
diff --git a/exampleSite/config/_default/languages.toml b/exampleSite/config/_default/languages.toml
new file mode 100644
index 0000000..ad80c20
--- /dev/null
+++ b/exampleSite/config/_default/languages.toml
@@ -0,0 +1,16 @@
+# Enable multilanguage site support
+[en]
+languageName = "English"
+title = "Hugo Theme Stack Example Site"
+weight = 1
+
+[zh-cn]
+languageName = "中文"
+title = "Hugo 主题 Stack 演示站点"
+weight = 2
+
+[ar]
+languageName = "عربي"
+languagedirection = "rtl"
+title = "موقع تجريبي"
+weight = 3
diff --git a/exampleSite/config/_default/markup.toml b/exampleSite/config/_default/markup.toml
new file mode 100644
index 0000000..591ce9e
--- /dev/null
+++ b/exampleSite/config/_default/markup.toml
@@ -0,0 +1,18 @@
+# Markdown renderer configuration
+[goldmark.renderer]
+# Set it to true if you have HTML content inside Markdown
+unsafe = false
+
+[tableOfContents]
+endLevel = 4
+ordered = true
+startLevel = 2
+
+[highlight]
+noClasses = false
+codeFences = true
+guessSyntax = true
+lineNoStart = 1
+lineNos = true
+lineNumbersInTable = true
+tabWidth = 4
diff --git a/exampleSite/config/_default/menu.toml b/exampleSite/config/_default/menu.toml
new file mode 100644
index 0000000..e01b4f7
--- /dev/null
+++ b/exampleSite/config/_default/menu.toml
@@ -0,0 +1,20 @@
+### Custom menu
+### See https://docs.stack.jimmycai.com/configuration/custom-menu.html
+### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
+main = []
+
+[[social]]
+identifier = "github"
+name = "GitHub"
+url = "https://github.com/CaiJimmy/hugo-theme-stack"
+
+[social.params]
+icon = "brand-github"
+
+[[social]]
+identifier = "twitter"
+name = "Twitter"
+url = "https://twitter.com"
+
+[social.params]
+icon = "brand-twitter"
diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml
new file mode 100644
index 0000000..a87c986
--- /dev/null
+++ b/exampleSite/config/_default/params.toml
@@ -0,0 +1,106 @@
+mainSections = ["post"]
+featuredImageField = "image"
+rssFullContent = true
+favicon = "img/favicon.png"
+
+[footer]
+since = 2020
+
+[dateFormat]
+published = "Jan 02, 2006"
+lastUpdated = "Jan 02, 2006 15:04 MST"
+
+[sidebar]
+emoji = "🍥"
+subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
+
+[sidebar.avatar]
+enabled = true
+local = true
+src = "img/logo.jpg"
+
+[article]
+math = false
+toc = true
+readingTime = true
+
+[article.license]
+enabled = true
+default = "Licensed under CC BY-NC-SA 4.0"
+
+[comments]
+enabled = true
+provider = "disqus"
+
+[comments.disqusjs]
+
+[comments.utterances]
+issueTerm = "pathname"
+
+[comments.remark42]
+
+[comments.vssue]
+autoCreateIssue = false
+
+[comments.waline]
+emoji = ["https://unpkg.com/@waline/emojis@1.0.1/weibo"]
+requiredMeta = ["name", "email", "url"]
+
+[comments.waline.locale]
+admin = "Admin"
+
+[comments.twikoo]
+
+[comments.cactus]
+defaultHomeserverUrl = "https://matrix.cactus.chat:8448"
+serverName = "cactus.chat"
+siteName = ""
+
+[comments.giscus]
+reactionsEnabled = 1
+emitMetadata = 0
+
+[comments.gitalk]
+
+[comments.cusdis]
+
+[[widgets.homepage]]
+type = "search"
+
+[[widgets.homepage]]
+type = "archives"
+
+[widgets.homepage.params]
+limit = 5
+
+[[widgets.homepage]]
+type = "categories"
+
+[widgets.homepage.params]
+limit = 10
+
+[[widgets.homepage]]
+type = "tag-cloud"
+
+[widgets.homepage.params]
+limit = 10
+
+[[widgets.page]]
+type = "toc"
+
+[opengraph.twitter]
+card = "summary_large_image"
+
+[defaultImage.opengraph]
+enabled = false
+local = false
+
+[colorScheme]
+toggle = true
+default = "auto"
+
+[imageProcessing.cover]
+enabled = true
+
+[imageProcessing.content]
+enabled = true \ No newline at end of file
diff --git a/exampleSite/config/_default/permalinks.toml b/exampleSite/config/_default/permalinks.toml
new file mode 100644
index 0000000..2499a7e
--- /dev/null
+++ b/exampleSite/config/_default/permalinks.toml
@@ -0,0 +1,3 @@
+# Permalinks format of each content section
+post = "/p/:slug/"
+page = "/:slug/" \ No newline at end of file
diff --git a/exampleSite/config/_default/related.toml b/exampleSite/config/_default/related.toml
new file mode 100644
index 0000000..be52654
--- /dev/null
+++ b/exampleSite/config/_default/related.toml
@@ -0,0 +1,12 @@
+# Related contents configuration
+includeNewer = true
+threshold = 60
+toLower = false
+
+[[indices]]
+name = "tags"
+weight = 100
+
+[[indices]]
+name = "categories"
+weight = 200 \ No newline at end of file
diff --git a/exampleSite/content/post/emoji-support/index.md b/exampleSite/content/post/emoji-support/index.md
deleted file mode 100644
index bc3e348..0000000
--- a/exampleSite/content/post/emoji-support/index.md
+++ /dev/null
@@ -1,50 +0,0 @@
-+++
-author = "Hugo Authors"
-title = "Emoji Support"
-date = "2019-03-05"
-description = "Guide to emoji usage in Hugo"
-categories = [
- "Test"
-]
-tags = [
- "emoji",
-]
-image = "the-creative-exchange-d2zvqp3fpro-unsplash.jpg"
-+++
-
-Emoji can be enabled in a Hugo project in a number of ways.
-<!--more-->
-The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
-
-To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
-
-<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
-<br>
-
-The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
-
-***
-
-**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
-
-{{< highlight html >}}
-.emoji {
- font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
-}
-{{< /highlight >}}
-
-{{< css.inline >}}
-<style>
-.emojify {
- font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
- font-size: 2rem;
- vertical-align: middle;
-}
-@media screen and (max-width:650px) {
- .nowrap {
- display: block;
- margin: 25px 0;
- }
-}
-</style>
-{{< /css.inline >}}
diff --git a/exampleSite/content/post/emoji-support/the-creative-exchange-d2zvqp3fpro-unsplash.jpg b/exampleSite/content/post/emoji-support/the-creative-exchange-d2zvqp3fpro-unsplash.jpg
deleted file mode 100644
index e34a59d..0000000
--- a/exampleSite/content/post/emoji-support/the-creative-exchange-d2zvqp3fpro-unsplash.jpg
+++ /dev/null
Binary files differ
diff --git a/exampleSite/content/post/markdown-syntax/index.md b/exampleSite/content/post/markdown-syntax/index.md
index 0254cca..752a655 100644
--- a/exampleSite/content/post/markdown-syntax/index.md
+++ b/exampleSite/content/post/markdown-syntax/index.md
@@ -42,12 +42,12 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
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
+### 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
+### Blockquote with attribution
> Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite>
@@ -63,7 +63,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
Bob | 27
Alice | 23
-#### Inline Markdown within tables
+### Inline Markdown within tables
| Italics | Bold | Code |
| -------- | -------- | ------ |
@@ -74,8 +74,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. | Phasellus ultricies, sapien non euismod aliquam, dui ligula tincidunt odio, at accumsan nulla sapien eget ex. | Proin eleifend dictum ipsum, non euismod ipsum pulvinar et. Vivamus sollicitudin, quam in pulvinar aliquam, metus elit pretium purus | Proin sit amet velit nec enim imperdiet vehicula. | Ut bibendum vestibulum quam, eu egestas turpis gravida nec | Sed scelerisque nec turpis vel viverra. Vivamus vitae pretium sapien |
## Code Blocks
-
-#### Code block with backticks
+### Code block with backticks
```html
<!doctype html>
@@ -90,7 +89,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
</html>
```
-#### Code block indented with four spaces
+### Code block indented with four spaces
<!doctype html>
<html lang="en">
@@ -103,21 +102,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
</body>
</html>
-#### Code block with Hugo's internal highlight shortcode
-{{< highlight html >}}
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>Example HTML5 Document</title>
-</head>
-<body>
- <p>Test</p>
-</body>
-</html>
-{{< /highlight >}}
-
-#### Diff code block
+### Diff code block
```diff
[dependencies.bevy]
@@ -127,21 +112,27 @@ rev = "11f52b8c72fc3a568e8bb4a4cd1f3eb025ac2e13"
+ features = ["jpeg", "dynamic"]
```
+### One line code block
+
+```html
+<p>A paragraph</p>
+```
+
## List Types
-#### Ordered List
+### Ordered List
1. First item
2. Second item
3. Third item
-#### Unordered List
+### Unordered List
* List item
* Another item
* And another item
-#### Nested list
+### Nested list
* Fruit
* Apple