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

github.com/heyeshuang/hugo-theme-tokiwa.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author贺叶霜 <i@heysh.xyz>2023-08-22 03:25:07 +0300
committerGitHub <noreply@github.com>2023-08-22 03:25:07 +0300
commitdd607ca18911aafed5f551e1cf02561fd4ba26f5 (patch)
tree19683d304f1605c98b100d9d31b4d6e6722fcf67
parent20bbb65bfaf691811ccc7ac900371098536bfe18 (diff)
parent201f37c2fb0e87ee95293f726ef7f5c0779e4e15 (diff)
Merge pull request #43 from deining/support-hugo-moduleHEADmaster
Support for theme installation as hugo module
-rw-r--r--README.md20
-rw-r--r--exampleSite/.gitignore1
-rw-r--r--exampleSite/README.md4
-rw-r--r--exampleSite/content/about.md5
-rw-r--r--exampleSite/content/post/math-typesetting.md11
-rw-r--r--exampleSite/hugo.toml (renamed from exampleSite/config.toml)10
-rw-r--r--go.mod3
-rwxr-xr-xlayouts/_default/baseof.html2
8 files changed, 37 insertions, 19 deletions
diff --git a/README.md b/README.md
index 70334de..4177243 100644
--- a/README.md
+++ b/README.md
@@ -11,14 +11,32 @@ This theme is especially optimized for Chinese characters, while works well with
![1](https://raw.githubusercontent.com/heyeshuang/hugo-theme-tokiwa/master/images/screenshot.png)
![2](https://raw.githubusercontent.com/heyeshuang/hugo-theme-tokiwa/master/images/screenshot02.png)
-A live demo is at <http://heysh.xyz/hugo-theme-tokiwa/>.
+A live demo is at <https://heysh.xyz/hugo-theme-tokiwa/>.
## Install
+### Git submodule
+
Inside the folder of your Hugo site run:
```bash
$ git submodule add https://github.com/heyeshuang/hugo-theme-tokiwa.git themes/hugo-theme-tokiwa
```
+
+### Hugo module
+
+Inside the folder of your Hugo site run:
+```bash
+$ hugo mod init https://github.com/<YOUR_NAME>/<THEME_NAME>
+$ hugo mod get https://github.com/heyeshuang/hugo-theme-tokiwa
+```
+
+Then add to your `hugo.toml`:
+```toml
+[module]
+[[module.imports]]
+ path = "github.com/heyeshuang/hugo-theme-tokiwa"
+```
+
## available config params
```toml
diff --git a/exampleSite/.gitignore b/exampleSite/.gitignore
index ca4d540..d28a87c 100644
--- a/exampleSite/.gitignore
+++ b/exampleSite/.gitignore
@@ -22,6 +22,7 @@ _testmain.go
*.exe
*.test
+.hugo_build.lock
/public
/themes
.DS_Store
diff --git a/exampleSite/README.md b/exampleSite/README.md
index aa38bb6..1f81e13 100644
--- a/exampleSite/README.md
+++ b/exampleSite/README.md
@@ -4,7 +4,7 @@ This repository offers an example site for [Hugo](https://gohugo.io/) and also i
# Using
-1. [Install Hugo](https://gohugo.io/overview/installing/)
+1. [Install Hugo](https://gohugo.io/installation/)
2. Clone this repository
```bash
git clone https://github.com/gohugoio/hugoBasicExample.git
@@ -19,4 +19,4 @@ hugo server -t YOURTHEME
- A section called `/post/` with sample markdown content
- A headless bundle called `homepage` that you may want to use for single page applications. You can find instructions about headless bundles over [here](https://gohugo.io/content-management/page-bundles/#headless-bundle)
- An `about.md` that is intended to provide the `/about/` page for a theme demo
-6. If you intend to build a theme that does not fit in the content structure provided in this repository, then you are still more than welcome to submit it for review at the [Hugo Themes](https://github.com/gohugoio/hugoThemes/issues) respository
+6. If you intend to build a theme that does not fit in the content structure provided in this repository, then you are still more than welcome to submit it for review at the [Hugo Themes](https://github.com/gohugoio/hugoThemes/issues) repository
diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md
index a412806..f77dfc1 100644
--- a/exampleSite/content/about.md
+++ b/exampleSite/content/about.md
@@ -20,9 +20,6 @@ Hugo is ideal for blogs, corporate websites, creative portfolios, online magazin
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
-Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
+Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
Learn more and contribute on [GitHub](https://github.com/gohugoio).
-
-
-
diff --git a/exampleSite/content/post/math-typesetting.md b/exampleSite/content/post/math-typesetting.md
index 5bfc7ee..c3a51cb 100644
--- a/exampleSite/content/post/math-typesetting.md
+++ b/exampleSite/content/post/math-typesetting.md
@@ -19,16 +19,16 @@ In this example we will be using [KaTeX](https://katex.org/)
{{ partial "math.html" . }}
{{ end }}
```
-- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
-- To enable KaTex on a per page basis include the parameter `math: true` in content files.
+- To enable KaTeX globally set the parameter `math` to `true` in a project's configuration
+- To enable KaTeX on a per page basis include the parameter `math: true` in content files.
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
-<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css" integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ" crossorigin="anonymous">
-<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>
-<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css" integrity="sha512-7nTa5CnxbzfQgjQrNmHXB7bxGTUVO/DcYX6rpgt06MkzM0rVXP3EYCv/Ojxg5H0dKbY7llbbYaqgfZjnGOAWGA==" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js" integrity="sha512-aoZChv+8imY/U1O7KIHXvO87EOzCuKO0GhFtpD6G2Cyjo/xPeTgdf3/bchB10iB+AojMTDkMHDPLKNxPJVqDcw==" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js" integrity="sha512-iWiuBS5nt6r60fCz26Nd0Zqe0nbk1ZTIQbl3Kv7kYsX+yKMUFHzjaH2+AnM6vp2Xs+gNmaBAVWJjSmuPw76Efg==" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{</ math.inline >}}
@@ -41,4 +41,3 @@ Block math:
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$
-
diff --git a/exampleSite/config.toml b/exampleSite/hugo.toml
index 1a7a01b..fda4cec 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/hugo.toml
@@ -26,7 +26,7 @@ Tokiwa-iro is the theme color of this site.
env = "production" # for Google Analytics and DISQUS.
favicon = "img/favicon-32x32.png"
fuse = true # for searchbox. "JSON" must added to output contents. See [outputs].
-math = true # for introducing $KaTEX$
+math = true # for introducing $KaTeX$
useChineseFonts = true
postDateFormat = "2006-1-2"
@@ -59,13 +59,13 @@ series = "series"
tag = "tags"
[social]
bilibili = "http://example.com/"
-github = "http://github.com/"
-gitlab = "http://gitlab.com/"
+github = "https://github.com/"
+gitlab = "https://gitlab.com/"
instagram = "http://example.com/"
mail = "mailto:anon@example.com"
-twitter = "http://twitter.com/"
+twitter = "https://twitter.com/"
weibo = "http://example.com/"
-youtube = "http://youtube.com/"
+youtube = "https://youtube.com/"
zhihu = "http://example.com/"
# any icon in layouts/partials/svg can be used by the name without the "-line.svg"
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..36044f4
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module github.com/heyeshuang/hugo-theme-tokiwa
+
+go 1.20
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index d2de1c4..265ba3a 100755
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -68,7 +68,7 @@
src: url('{{ ( printf "%s%s" .Site.Params.bannerFont ".woff2") | absURL }}') format('woff2'),
url('{{ ( printf "%s%s" .Site.Params.bannerFont ".woff") | absURL }}') format('woff');
}
- /* For varible font usage sometimes */
+ /* For variable font usage sometimes */
/*
@font-face {
font-family: 'Source Han Serif CN Variable';