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

github.com/mazgi/hugo-theme-techlog-simple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuki, Hidenori <mazgi@users.noreply.github.com>2020-11-01 12:23:01 +0300
committerGitHub <noreply@github.com>2020-11-01 12:23:01 +0300
commitf23ee2b6b9fadbf4ceb481475b5e5cae34a4676a (patch)
tree34897c0fca244bea2655825b5fa5a3bc6233bac7
parent68c9d326832d94583720dd32b847e3eb52419f1f (diff)
parentd1d98fde4bea10ba97cb8ee65c5472b061901262 (diff)
Merge pull request #9 from mazgi/fix-taxonomiesv2020.11.0
Fix taxonomies
-rw-r--r--exampleSite/config.toml8
-rw-r--r--exampleSite/content/posts/2006.01/first-page.en.md3
-rw-r--r--exampleSite/content/posts/2006.01/first-page.ja.md3
-rw-r--r--exampleSite/content/posts/2006.01/second-page.en.md94
-rw-r--r--exampleSite/content/posts/2006.01/second-page.ja.md96
-rw-r--r--exampleSite/docker-compose.yml7
-rw-r--r--layouts/_default/list.html42
-rw-r--r--layouts/index.html20
-rw-r--r--theme.toml4
9 files changed, 240 insertions, 37 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 528bfc0..cb3a377 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,6 +1,6 @@
baseURL = "https://example.org/"
languageCode = "en-us"
-title = "A Hugo theme"
+title = "A Hugo Theme"
theme = "techlog-simple"
defaultContentLanguage = "en"
# defaultContentLanguage = "ja"
@@ -16,15 +16,15 @@ enableRobotsTXT = true
description = "A simple Hugo theme for tech blogs :)"
[params.sns]
+# facebook = ""
github = "mazgi"
-twitter = "mazgi"
instagram = "mazgi"
-# facebook = ""
+twitter = "mazgi"
[taxonomies]
+author = "authors"
category = "categories"
tag = "tags"
-author = "authors"
[languages]
[languages.en]
diff --git a/exampleSite/content/posts/2006.01/first-page.en.md b/exampleSite/content/posts/2006.01/first-page.en.md
index ea82ffe..9c60a59 100644
--- a/exampleSite/content/posts/2006.01/first-page.en.md
+++ b/exampleSite/content/posts/2006.01/first-page.en.md
@@ -2,8 +2,9 @@
title: "First Page"
date: 2018-10-04T05:12:12Z
description: "My first post"
-tags: ["hugo", "example"]
authors: ["John", "Jugemu Jugemu Gokoh no Surikire"]
+categories: ["example-category-a", "cat-b"]
+tags: ["example-tag-a"]
---
## My first post
diff --git a/exampleSite/content/posts/2006.01/first-page.ja.md b/exampleSite/content/posts/2006.01/first-page.ja.md
index c4e0e6c..4f4a9f8 100644
--- a/exampleSite/content/posts/2006.01/first-page.ja.md
+++ b/exampleSite/content/posts/2006.01/first-page.ja.md
@@ -2,8 +2,9 @@
title: "最初のページ"
date: 2018-10-04T05:12:12Z
description: "私の最初のポスト"
-tags: ["hugo", "example"]
authors: ["John", "Jugemu Jugemu Gokoh no Surikire"]
+categories: ["example-category-a", "cat-b"]
+tags: ["example-tag-a"]
---
## 私の最初のポスト
diff --git a/exampleSite/content/posts/2006.01/second-page.en.md b/exampleSite/content/posts/2006.01/second-page.en.md
index b026610..b9b8b25 100644
--- a/exampleSite/content/posts/2006.01/second-page.en.md
+++ b/exampleSite/content/posts/2006.01/second-page.en.md
@@ -1,8 +1,9 @@
---
title: "Second Page"
date: 2018-10-05T05:12:12Z
-tags: ['hugo', 'example']
-authors: ['John', 'Smith']
+authors: ["John", "Smith"]
+categories: ["cat-b"]
+tags: ["example-tag-a", "tag-b"]
---
## My second post
@@ -11,9 +12,86 @@ authors: ['John', 'Smith']
The pretty cat photo from [here](https://www.pexels.com/photo/grey-and-white-short-fur-cat-104827/).
-col1|col2|col3
----|---|---
-val1-1|val2-1|val3-1
-val1-2|val2-2 long text|val3-2
-val1-3|val2-3|val3-3
-val1-4|val2-4|val3-4
+<!--more-->
+
+| col1 | col2 | col3 |
+| ------ | ---------------- | ------ |
+| val1-1 | val2-1 | val3-1 |
+| val1-2 | val2-2 long text | val3-2 |
+| val1-3 | val2-3 | val3-3 |
+| val1-4 | val2-4 | val3-4 |
+
+```shellsession
+$ hugo help
+hugo is the main command, used to build your Hugo site.
+
+Hugo is a Fast and Flexible Static Site Generator
+built with love by spf13 and friends in Go.
+
+Complete documentation is available at http://gohugo.io/.
+
+Usage:
+ hugo [flags]
+ hugo [command]
+
+Available Commands:
+ config Print the site configuration
+ convert Convert your content to different formats
+ deploy Deploy your site to a Cloud provider.
+ env Print Hugo version and environment info
+ gen A collection of several useful generators.
+ help Help about any command
+ import Import your site from others.
+ list Listing out various types of content
+ mod Various Hugo Modules helpers.
+ new Create new content for your site
+ server A high performance webserver
+ version Print the version number of Hugo
+
+Flags:
+ -b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
+ -D, --buildDrafts include content marked as draft
+ -E, --buildExpired include expired content
+ -F, --buildFuture include content with publishdate in the future
+ --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+ --cleanDestinationDir remove files from destination not found in static directories
+ --config string config file (default is path/config.yaml|json|toml)
+ --configDir string config dir (default "config")
+ -c, --contentDir string filesystem path to content directory
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ --disableKinds strings disable different kind of pages (home, RSS etc.)
+ --enableGitInfo add Git revision, date and author info to the pages
+ -e, --environment string build environment
+ --forceSyncStatic copy all files when static is changed.
+ --gc enable to run some cleanup tasks (remove unused cache files) after the build
+ -h, --help help for hugo
+ --i18n-warnings print missing translations
+ --ignoreCache ignores the cache directory
+ --ignoreVendor ignores any _vendor directory
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ -l, --layoutDir string filesystem path to layout directory
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --minify minify any supported output format (HTML, XML etc.)
+ --noChmod don't sync permission mode of files
+ --noTimes don't sync modification time of files
+ --path-warnings print warnings on duplicate target paths etc.
+ --print-mem print memory usage to screen at intervals
+ --quiet build in quiet mode
+ --renderToMemory render to memory (only useful for benchmark testing)
+ -s, --source string filesystem path to read files relative from
+ --templateMetrics display metrics about template executions
+ --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
+ -t, --theme strings themes to use (located in /themes/THEMENAME/)
+ --themesDir string filesystem path to themes directory
+ --trace file write trace to file (not useful in general)
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+ -w, --watch watch filesystem for changes and recreate as needed
+
+Additional help topics:
+ hugo check Contains some verification checks
+
+Use "hugo [command] --help" for more information about a command.
+```
diff --git a/exampleSite/content/posts/2006.01/second-page.ja.md b/exampleSite/content/posts/2006.01/second-page.ja.md
index 2b6e149..98cb3c5 100644
--- a/exampleSite/content/posts/2006.01/second-page.ja.md
+++ b/exampleSite/content/posts/2006.01/second-page.ja.md
@@ -1,19 +1,97 @@
---
title: "2番目のページ"
date: 2018-10-05T05:12:12Z
-tags: ['hugo', 'example']
-authors: ['John', 'Smith']
+authors: ["John", "Smith"]
+categories: ["cat-b"]
+tags: ["example-tag-a", "tag-b"]
---
-## 私の2番目のポスト
+## 私の 2 番目のポスト
{{< figure src="cat.jpeg" >}}
かわいい猫の写真は[こちら](https://www.pexels.com/photo/grey-and-white-short-fur-cat-104827/)からお借りしました。
-col1|col2|col3
----|---|---
-val1-1|val2-1|val3-1
-val1-2|val2-2 長いテキスト|val3-2
-val1-3|val2-3|val3-3
-val1-4|val2-4|val3-4
+<!--more-->
+
+| col1 | col2 | col3 |
+| ------ | ------------------- | ------ |
+| val1-1 | val2-1 | val3-1 |
+| val1-2 | val2-2 長いテキスト | val3-2 |
+| val1-3 | val2-3 | val3-3 |
+| val1-4 | val2-4 | val3-4 |
+
+```shellsession
+$ hugo help
+hugo is the main command, used to build your Hugo site.
+
+Hugo is a Fast and Flexible Static Site Generator
+built with love by spf13 and friends in Go.
+
+Complete documentation is available at http://gohugo.io/.
+
+Usage:
+ hugo [flags]
+ hugo [command]
+
+Available Commands:
+ config Print the site configuration
+ convert Convert your content to different formats
+ deploy Deploy your site to a Cloud provider.
+ env Print Hugo version and environment info
+ gen A collection of several useful generators.
+ help Help about any command
+ import Import your site from others.
+ list Listing out various types of content
+ mod Various Hugo Modules helpers.
+ new Create new content for your site
+ server A high performance webserver
+ version Print the version number of Hugo
+
+Flags:
+ -b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
+ -D, --buildDrafts include content marked as draft
+ -E, --buildExpired include expired content
+ -F, --buildFuture include content with publishdate in the future
+ --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+ --cleanDestinationDir remove files from destination not found in static directories
+ --config string config file (default is path/config.yaml|json|toml)
+ --configDir string config dir (default "config")
+ -c, --contentDir string filesystem path to content directory
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ --disableKinds strings disable different kind of pages (home, RSS etc.)
+ --enableGitInfo add Git revision, date and author info to the pages
+ -e, --environment string build environment
+ --forceSyncStatic copy all files when static is changed.
+ --gc enable to run some cleanup tasks (remove unused cache files) after the build
+ -h, --help help for hugo
+ --i18n-warnings print missing translations
+ --ignoreCache ignores the cache directory
+ --ignoreVendor ignores any _vendor directory
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ -l, --layoutDir string filesystem path to layout directory
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --minify minify any supported output format (HTML, XML etc.)
+ --noChmod don't sync permission mode of files
+ --noTimes don't sync modification time of files
+ --path-warnings print warnings on duplicate target paths etc.
+ --print-mem print memory usage to screen at intervals
+ --quiet build in quiet mode
+ --renderToMemory render to memory (only useful for benchmark testing)
+ -s, --source string filesystem path to read files relative from
+ --templateMetrics display metrics about template executions
+ --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
+ -t, --theme strings themes to use (located in /themes/THEMENAME/)
+ --themesDir string filesystem path to themes directory
+ --trace file write trace to file (not useful in general)
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+ -w, --watch watch filesystem for changes and recreate as needed
+
+Additional help topics:
+ hugo check Contains some verification checks
+
+Use "hugo [command] --help" for more information about a command.
+```
diff --git a/exampleSite/docker-compose.yml b/exampleSite/docker-compose.yml
index e5e71a9..f1b3cec 100644
--- a/exampleSite/docker-compose.yml
+++ b/exampleSite/docker-compose.yml
@@ -7,7 +7,12 @@ services:
UID: ${UID:-0}
GID: ${GID:-0}
working_dir: /techlog-simple/exampleSite
- command: hugo server --bind 0.0.0.0 --buildDrafts --themesDir="../.."
+ command: >
+ hugo server
+ --baseURL http://$BIND_IP_ADDR:1313
+ --bind 0.0.0.0
+ --buildDrafts
+ --themesDir="../.."
volumes:
- ../:/techlog-simple
ports:
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 4061bed..908ac05 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,7 +1,11 @@
{{ partial "header.html" . }}
<div class="row">
<div class="col-lg-9">
- {{ if and ( eq .Kind "taxonomy" ) ( eq .Type "authors" ) }}
+
+ <!-- content header -->
+
+ <!-- /authors/* -->
+ {{ if and ( eq .Kind "term" ) ( eq .Type "authors" ) }}
<div class="row">
<h2>{{ .Name }}'s articles</h2>
</div>
@@ -11,14 +15,30 @@
</div>
<hr/>
{{ end }}
- {{ end }}
- {{ $paginator := .Paginate ( where .Site.RegularPages "Section" "ne" "profiles" ) }}
+ <!-- /categories/* -->
+ {{ else if and ( eq .Kind "term" ) ( eq .Type "categories" ) }}
+ <div class="row">
+ <h2>{{ .Name }}</h2>
+ </div>
+
+ <!-- /tags/* -->
+ {{ else if and ( eq .Kind "term" ) ( eq .Type "tags" ) }}
+ <div class="row">
+ <h2>{{ .Name }}</h2>
+ </div>
+
+ <!-- / -->
+ {{ else }}
+ {{ end }}
+
+ <!-- contents -->
+ {{ $paginator := .Paginate ( where .Data.Pages "Section" "ne" "profiles" ) }}
{{ range $idx, $page := $paginator.Pages }}
{{ if $page.Section }}
<article>
<div class="row">
- <h3><a href="{{ .RelPermalink}}">{{ .Title }}</a></h3>
+ <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
</div>
<div class="row">
<span class="ml-1">Created At: {{ .Date.Format "2006.01.02" }}</span>
@@ -28,10 +48,10 @@
{{ with .Params.Authors }}
{{ range . }}
<a class="ml-1 badge badge-pill badge-secondary" href="{{ "/authors/" | relLangURL }}{{ . | urlize }}/">{{ . }}</a>
- {{ end }}
- {{ end }}
+ {{ end }} <!-- end of range -->
+ {{ end }} <!-- end of with -->
</span>
- {{ end }}
+ {{ end }} <!-- end of if -->
</div>
<div class="row">
{{ .Summary }}
@@ -40,13 +60,13 @@
{{ with .Params.Tags }}
{{ range . }}
<a class="ml-1 badge badge-pill badge-secondary" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}/">{{ . }}</a>
- {{ end }}
- {{ end }}
+ {{ end }} <!-- end of range -->
+ {{ end }} <!-- end of with -->
</div>
</article>
<hr/>
- {{ end }}
- {{ end }}
+ {{ end }} <!-- end of if -->
+ {{ end }} <!-- end of range -->
{{ partial "pagination.html" . }}
</div>
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..b78bc4c
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,20 @@
+{{ partial "header.html" . }}
+<div class="row">
+ <div class="col-lg-9">
+ {{ range ( .Paginate ( where .Site.RegularPages "Section" "posts" )).Pages }}
+ <article>
+ <div class="row">
+ <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
+ </div>
+ <div class="row">
+ {{ .Summary }}
+ </div>
+ </article>
+ {{ end }}
+ {{ partial "pagination.html" . }}
+ </div>
+ <div class="col-lg-3">
+ {{ partial "sidebar.html" . }}
+ </div>
+</div>
+{{ partial "footer.html" . }}
diff --git a/theme.toml b/theme.toml
index b7b2d0a..969b517 100644
--- a/theme.toml
+++ b/theme.toml
@@ -8,8 +8,8 @@ description = "A simple Hugo theme for tech blog."
homepage = "https://github.com/mazgi/hugo-theme-techlog-simple"
tags = []
features = []
-min_version = "0.57.0"
+min_version = "0.76.0"
[author]
name = "Hidenori Matsuki"
- homepage = "https://mazgi.com/"
+ homepage = "https://mazgi.github.io/"