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

github.com/J-Siu/hugo-theme-sk1.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Siu (imacpro) <john.sd.siu@gmail.com>2020-06-26 06:18:12 +0300
committerJohn Siu (imacpro) <john.sd.siu@gmail.com>2020-06-26 06:18:12 +0300
commit2dcac111c608cda50978263c385c193ebd459957 (patch)
tree4e695739b4896c393738c34567d9706ac0b73897
Initial commit.
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules3
-rw-r--r--LICENSE20
-rw-r--r--README.md86
-rw-r--r--archetypes/default.md2
m---------exampleSite0
-rw-r--r--layouts/404.html1
-rw-r--r--layouts/_default/baseof.html13
-rw-r--r--layouts/_default/list.html23
-rw-r--r--layouts/_default/single.html27
-rw-r--r--layouts/partials/footer.html3
-rw-r--r--layouts/partials/head.html0
-rw-r--r--layouts/partials/header.html2
-rw-r--r--theme.toml12
14 files changed, 193 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..496ee2c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_Store \ No newline at end of file
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..81a47aa
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "exampleSite"]
+ path = exampleSite
+ url = https://github.com/gohugoio/hugoBasicExample.git
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..062bb83
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 John Siu
+
+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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f3212de
--- /dev/null
+++ b/README.md
@@ -0,0 +1,86 @@
+Hugo Theme - SK1 (Skeleton 1)
+
+---
+
+Fully functional basic Hugo theme, html only, no css, no javascript.
+
+Intended for learning hugo them or a skeleton to develop full feature theme.
+
+### Usage
+
+- Git clone
+
+ In site directory:
+
+ ```sh
+ git clone https://github.com/J-Siu/hugo-theme-sk1 theme/sk1
+ ```
+
+- Git submodule
+
+ In site directory:
+
+ ```sh
+ git submodule add https://github.com/J-Siu/hugo-theme-sk1 theme/sk1
+ ```
+
+### Hugo Features Implemented
+
+- layouts
+ - _default
+ - baseof.html
+ - No change, auto generated by Hugo
+ - list.html
+ - `Site.Params.maintype` for home page listing. Default: `post`
+ - Pagination
+ - single.html
+ - Content
+ - Date
+ - Next/Prev
+ - Related
+ - Tags
+ - ToC
+ - partials
+ - footer.html
+ - Site.Params.copyright
+ - head.html
+ - No change, auto generated by Hugo
+ - header.html
+ - Site.Params.subtitle
+ - 404.html
+ - Text "Page Not Found."
+ - index.html
+ - Deleted. Merged with list.html
+
+### Site Config
+
+```toml
+baseURL = "https://sk1.jsiu.dev"
+title = ""
+
+enableGitInfo = false
+relativeURLs = true
+theme = "hugo-theme-sk1"
+
+[Params]
+copyright = ""
+maintype = ""
+subtitle = ""
+```
+
+### Demo
+
+- https://sk1.jsiu.dev/
+
+### Repository
+
+- [docker_compose](https://github.com/J-Siu/hugo-theme-sk1)
+
+### Contributors
+
+- [John Sing Dao Siu](https://github.com/J-Siu)
+
+### Change Log
+
+- 1.0.0
+ - Initial Commit \ No newline at end of file
diff --git a/archetypes/default.md b/archetypes/default.md
new file mode 100644
index 0000000..ac36e06
--- /dev/null
+++ b/archetypes/default.md
@@ -0,0 +1,2 @@
++++
++++
diff --git a/exampleSite b/exampleSite
new file mode 160000
+Subproject e4440a1848c1780a45b8ff0508a1d9154c4665a
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..40a76aa
--- /dev/null
+++ b/layouts/404.html
@@ -0,0 +1 @@
+Page Not Found. \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..e43f994
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+{{- partial "head.html" . -}}
+
+<body>
+ {{- partial "header.html" . -}}
+ <div id="content">
+ {{- block "main" . }}{{- end }}
+ </div>
+ {{- partial "footer.html" . -}}
+</body>
+
+</html> \ No newline at end of file
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..5a5b443
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,23 @@
+{{define "main"}}
+
+{{if .Site.Params.mainType}}
+ {{.Scratch.Set "type" .Site.Params.mainType}}
+{{else}}
+ {{.Scratch.Set "type" "post"}}
+{{end}}
+
+{{if .IsHome}}
+ {{.Scratch.Set "Paginator" (.Paginate (where .Site.RegularPages "Type" (.Scratch.Get "type")))}}
+{{else}}
+ {{.Scratch.Set "Paginator" .Paginator}}
+{{end}}
+{{$paginator:=(.Scratch.Get "Paginator")}}
+<ul>
+ {{range $paginator.Pages}}
+ <li>{{.Date.Format "2006-01-02"}} | <a href="{{.RelPermalink}}">{{.Title}}</a></li>
+ {{end}}
+</ul>
+
+{{template "_internal/pagination.html" .}}
+
+{{end}} \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..2ce0fa8
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,27 @@
+{{define "main"}}
+
+<h2>{{.Title}}</h2>
+{{.Date.Format "2006-01-30"}}
+{{.TableOfContents}}
+{{.Content}}
+
+<ul>
+ {{range (.GetTerms "tags")}}
+ <li><a href="{{.RelPermalink}}">{{.LinkTitle}}</a></li>
+ {{end}}
+</ul>
+
+{{with .PrevInSection}}<a href="{{.RelPermalink}}">{{.Title}}</a>{{end }}
+{{with .NextInSection}}<a href="{{.RelPermalink}}">{{.Title}}</a>{{end }}
+
+{{$related := .Site.RegularPages.Related . | first 5}}
+{{with $related}}
+<h3>See Also</h3>
+<ul>
+ {{range .}}
+ <li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
+ {{end}}
+</ul>
+{{end}}
+
+{{end}} \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..daddf07
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,3 @@
+{{with .Site.copyright}}{{.}} / {{end}}
+Power by <a href="https://gohugo.io">Hugo</a> /
+Theme <a href="https://github.com/J-Siu/hugo-theme-sk1/">SK1</a> by <a href="https://github.com/J-Siu/">J-Siu</a> \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/head.html
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..bf161ee
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,2 @@
+<a href="{{ "" | relLangURL}}">{{.Site.Title}}</a>
+{{with .Site.Params.subtitle}} / {{.}}{{end}} \ No newline at end of file
diff --git a/theme.toml b/theme.toml
new file mode 100644
index 0000000..9e4054e
--- /dev/null
+++ b/theme.toml
@@ -0,0 +1,12 @@
+name = "sk1"
+license = "MIT"
+licenselink = "https://github.com/J-Siu/hugo-theme-sk1/blob/master/LICENSE"
+description = "Fully functional basic Hugo theme, no css, no javascript."
+homepage = "https://sk1.jsiu.dev/"
+tags = ["blog"]
+features = []
+min_version = "0.65.0"
+
+[author]
+ name = "John Siu"
+ homepage = "https://github.com/J-Siu" \ No newline at end of file