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

github.com/siegerts/hugo-theme-basic.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Siegert <stephen.siegert@sas.com>2019-02-15 16:38:36 +0300
committerStephen Siegert <stephen.siegert@sas.com>2019-02-15 16:38:36 +0300
commit27273ca6f07ac9da38e26f5f5e9584351dc57cd8 (patch)
tree3e61c9a20e2e2542186028bba0dd2449ad16f1df
parent90240c61db684a9ccb2fbb68c5202377f7be5982 (diff)
parent879bd3c5a9419c87baad5f5139c132a427e54dfb (diff)
Merge branch 'master' of https://github.com/siegerts/hugo-theme-basic
-rw-r--r--.prettierrc.js3
-rw-r--r--README.md50
-rw-r--r--archetypes/blog.md10
-rw-r--r--archetypes/default.md12
-rw-r--r--archetypes/project.md6
-rw-r--r--exampleSite/config.toml (renamed from config.toml)19
-rwxr-xr-xexampleSite/content/blog/creating-a-new-theme.md (renamed from exampleSite/content/posts/creating-a-new-theme.md)0
-rwxr-xr-xexampleSite/content/blog/goisforlovers.md (renamed from exampleSite/content/posts/goisforlovers.md)0
-rwxr-xr-xexampleSite/content/blog/hugoisforlovers.md (renamed from exampleSite/content/posts/hugoisforlovers.md)0
-rwxr-xr-xexampleSite/content/blog/migrate-from-jekyll.md (renamed from exampleSite/content/posts/migrate-from-jekyll.md)0
-rwxr-xr-xexampleSite/content/blog/post-with-featured-image.md (renamed from exampleSite/content/posts/post-with-featured-image.md)0
-rwxr-xr-xexampleSite/content/blog/the-figure-shortcode.md (renamed from exampleSite/content/posts/the-figure-shortcode.md)0
-rwxr-xr-xexampleSite/content/blog/typography.md (renamed from exampleSite/content/posts/typography.md)0
-rwxr-xr-xexampleSite/content/page/about-hugo.md (renamed from exampleSite/content/about-hugo.md)0
-rw-r--r--exampleSite/content/project/hugo.md13
-rw-r--r--images/screenshot.pngbin0 -> 50217 bytes
-rw-r--r--images/screenshotBlog.pngbin0 -> 150930 bytes
-rw-r--r--images/tn.pngbin0 -> 85347 bytes
-rw-r--r--layouts/_default/baseof.html14
-rw-r--r--layouts/_default/list.html12
-rw-r--r--layouts/_default/single.html6
-rw-r--r--layouts/index.html21
-rw-r--r--layouts/page/single.html25
-rw-r--r--layouts/partials/footer.html4
-rw-r--r--layouts/project/single.html25
-rw-r--r--layouts/section/project.html0
-rw-r--r--theme.toml16
27 files changed, 170 insertions, 66 deletions
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 0000000..8257a5e
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,3 @@
+module.exports = {
+ disableLanguages: ["html"]
+};
diff --git a/README.md b/README.md
index 84460f0..7864821 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,24 @@
Basic personal site theme styled with minimal tachyons.
+## Features
+
+- ✨ Basic — HTML with a dash of style + emojis stand out more
+- 🌯 Extensible — Easily leverage [tachyons](https://tachyons.io/components/) to spice it up
+- 🥑 Syntax Highlighting - When you get the urge to code
+
+### Index
+
+![](https://github.com/siegerts/hugo-theme-basic/blob/master/images/screenshot.png)
+
+### Blog
+
+![](https://github.com/siegerts/hugo-theme-basic/blob/master/images/screenshotBlog.png)
+
+### Post
+
+![](https://github.com/siegerts/hugo-theme-basic/blob/master/images/tn.png)
+
## Getting started
### Installation
@@ -24,8 +42,38 @@ For more information, read the official [documentation](https://gohugo.io/themes
### Configuration
-The example configuration file can be found in the theme's `exampleSite` folder. You can just copy the `config.toml` to the root directory of your Hugo site. There are instructions in the example configuration file, feel free to change strings as you like to customize your website.
+Take a look at the sample `config.toml`file located in the `exampleSite` folder. You can just copy the `config.toml` to the root directory of your Hugo site. There are instructions in the example configuration file, feel free to change strings as you like to customize your website.
+
+#### Content Types
+
+| Type | Description | Command |
+| ----------- | --------------------------------------------------------------------------------- | ------------------------------------ |
+| **Post** | Used for blog posts. Posts are listed on the `/blog` page. | `hugo new post/<post-name>.md` |
+| **Page** | Used for site pages. | `hugo new page/<page-name>.md` |
+| **Project** | Used for project pages. Extend project list with `/layouts/section/project.html`. | `hugo new project/<project-name>.md` |
+
+#### Menu
+
+Menu links are specified, in order, in the theme configuration.
+
+For example:
+
+```toml
+[[params.menu]]
+ name = "blog"
+ url = "blog/"
+
+
+[[params.menu]]
+ name = "about"
+ url = "page/about"
+
+```
## Acknowledgments
- [tachyons](http://tachyons.io/)
+
+## License
+
+The code is available under the [MIT license](https://github.com/siegerts/hugo-theme-basic/blob/master/LICENSE).
diff --git a/archetypes/blog.md b/archetypes/blog.md
index 65f7e2c..2493181 100644
--- a/archetypes/blog.md
+++ b/archetypes/blog.md
@@ -1,13 +1,7 @@
+++
title = ""
description = ""
-tags = [
-
- "development",
-]
-topics = [
- "Development",
-
-]
+tags = ["development"]
+topics = ["Development"]
date = {{ .Date }}
+++
diff --git a/archetypes/default.md b/archetypes/default.md
index 65f7e2c..4c896c0 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -1,13 +1,7 @@
+++
-title = ""
+title = {{ replace .Name "-" " " | title }}
description = ""
-tags = [
-
- "development",
-]
-topics = [
- "Development",
-
-]
+tags = ["development"]
+topics = ["Development"]
date = {{ .Date }}
+++
diff --git a/archetypes/project.md b/archetypes/project.md
index cb745f7..8f08084 100644
--- a/archetypes/project.md
+++ b/archetypes/project.md
@@ -1,10 +1,10 @@
+++
-Title = ""
-Date = "2019-01-07"
+Title = "{{ replace .Name "-" " " | title }}"
+Date = {{ .Date }}
Description = ""
Tags = ["Development", ""]
Topics = ["Development", ""]
-download_url = "http://github.com/siegerts/PROJECTNAME"
+download_url = "http://github.com/USERNAME/PROJECTNAME"
project_description = "DESC"
project_name = "PROJECTNAME"
project_url = "URL"
diff --git a/config.toml b/exampleSite/config.toml
index 71c32d2..2eb8ac4 100644
--- a/config.toml
+++ b/exampleSite/config.toml
@@ -1,16 +1,27 @@
-baseurl = ""
-title = ""
+baseurl = "https://www.example.com"
+title = "Example"
theme ="hugo-theme-basic"
languageCode = "en-us"
googleAnalytics = ""
-copyright = ""
+copyright = "© 2016-19 Example"
[params]
- twitter = ""
+ titleEmoji = "🎉"
+ twitter = "exampleHandle"
[Permalinks]
post = "post/:slug"
+[[params.menu]]
+ name = "blog"
+ url = "blog/"
+
+
+[[params.menu]]
+ name = "about"
+ url = "page/about-hugo"
+
+
[privacy]
[privacy.googleAnalytics]
anonymizeIP = true
diff --git a/exampleSite/content/posts/creating-a-new-theme.md b/exampleSite/content/blog/creating-a-new-theme.md
index c003815..c003815 100755
--- a/exampleSite/content/posts/creating-a-new-theme.md
+++ b/exampleSite/content/blog/creating-a-new-theme.md
diff --git a/exampleSite/content/posts/goisforlovers.md b/exampleSite/content/blog/goisforlovers.md
index 41079d5..41079d5 100755
--- a/exampleSite/content/posts/goisforlovers.md
+++ b/exampleSite/content/blog/goisforlovers.md
diff --git a/exampleSite/content/posts/hugoisforlovers.md b/exampleSite/content/blog/hugoisforlovers.md
index 747ab41..747ab41 100755
--- a/exampleSite/content/posts/hugoisforlovers.md
+++ b/exampleSite/content/blog/hugoisforlovers.md
diff --git a/exampleSite/content/posts/migrate-from-jekyll.md b/exampleSite/content/blog/migrate-from-jekyll.md
index d5b2f54..d5b2f54 100755
--- a/exampleSite/content/posts/migrate-from-jekyll.md
+++ b/exampleSite/content/blog/migrate-from-jekyll.md
diff --git a/exampleSite/content/posts/post-with-featured-image.md b/exampleSite/content/blog/post-with-featured-image.md
index c42ff5c..c42ff5c 100755
--- a/exampleSite/content/posts/post-with-featured-image.md
+++ b/exampleSite/content/blog/post-with-featured-image.md
diff --git a/exampleSite/content/posts/the-figure-shortcode.md b/exampleSite/content/blog/the-figure-shortcode.md
index bfbe7e8..bfbe7e8 100755
--- a/exampleSite/content/posts/the-figure-shortcode.md
+++ b/exampleSite/content/blog/the-figure-shortcode.md
diff --git a/exampleSite/content/posts/typography.md b/exampleSite/content/blog/typography.md
index 94f469b..94f469b 100755
--- a/exampleSite/content/posts/typography.md
+++ b/exampleSite/content/blog/typography.md
diff --git a/exampleSite/content/about-hugo.md b/exampleSite/content/page/about-hugo.md
index b188b2a..b188b2a 100755
--- a/exampleSite/content/about-hugo.md
+++ b/exampleSite/content/page/about-hugo.md
diff --git a/exampleSite/content/project/hugo.md b/exampleSite/content/project/hugo.md
new file mode 100644
index 0000000..a75c569
--- /dev/null
+++ b/exampleSite/content/project/hugo.md
@@ -0,0 +1,13 @@
++++
+Title = "Hugo"
+Date = 2019-02-10T16:53:06-05:00
+Description = ""
+Tags = ["Development", ""]
+Topics = ["Development", ""]
+download_url = "http://github.com/USERNAME/PROJECTNAME"
+project_description = "DESC"
+project_name = "PROJECTNAME"
+project_url = "URL"
+release_date = "DATE"
+version = "0.0"
++++
diff --git a/images/screenshot.png b/images/screenshot.png
new file mode 100644
index 0000000..da31556
--- /dev/null
+++ b/images/screenshot.png
Binary files differ
diff --git a/images/screenshotBlog.png b/images/screenshotBlog.png
new file mode 100644
index 0000000..fe150ca
--- /dev/null
+++ b/images/screenshotBlog.png
Binary files differ
diff --git a/images/tn.png b/images/tn.png
new file mode 100644
index 0000000..a5f7582
--- /dev/null
+++ b/images/tn.png
Binary files differ
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 5f8e2ec..f32d502 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,11 +1,9 @@
<!DOCTYPE html>
<html>
- {{- partial "head.html" . -}}
- <body>
- {{- partial "header.html" . -}}
- <div id="content">
- {{- block "main" . }}{{- end }}
- </div>
- {{- partial "footer.html" . -}}
- </body>
+ {{- partial "head.html" . -}}
+ <body>
+ {{- partial "header.html" . -}}
+ <div id="content">{{- block "main" . }}{{ -end }}</div>
+ {{- partial "footer.html" . -}}
+ </body>
</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 5c1cd09..398b305 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -11,9 +11,9 @@
>
<section id="main" class="mt5">
<div>
- <!-- <h1 id="title">{{ .Title }}</h1> -->
- <ul id="list" class="pl0"></ul>
- {{ range .Data.Pages }}
+ <ul id="list" class="pl0">
+ <!-- prettier-ignore -->
+ {{ range.Data.Pages.ByPublishDate }}
<li class="list pl0 lh-copy">
<a
class="f3 b dib black no-underline"
@@ -22,11 +22,11 @@
>
<span class="f6 gray">{{ .Date.Format "January 2, 2006" }}</span>
</li>
- {{ end }}
- </ul>
+ <!-- prettier-ignore -->
+ {{ end }}
+ </ul>
</div>
</section>
- <aside id="meta"></aside>
{{ partial "footer.html" . }}
</body>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 64957a4..2c5911a 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,11 +1,11 @@
{{ partial "header.html" . }}
<body
lang="{{ .Site.LanguageCode }}"
- class="sans-serif w-90 w-60-ns center center-ns mv2 mv5-ns"
+ class="sans-serif w-90 w-80-m w-60-ns center mv2 mv5-ns"
itemscope
itemtype="http://schema.org/Article"
>
- {{ $baseurl := .Site.BaseURL }}
+
<span class="b">/ </span>
<a href="{{ .Site.BaseURL }}" class="b bb bw1 pb1 no-underline black">{{ .Site.Title }}</a>
<span class="b"> / </span>
@@ -18,8 +18,6 @@
<article itemprop="articleBody" id="content" class="w-90 lh-copy">
{{ .Content }}
</article>
-
-
<span class="f6 gray mt3" title="Lastmod: {{ .Lastmod.Format "January 2, 2006" }}. Published at: {{ .PublishDate.Format "2006-01-02" }}.">
{{ if ne .Lastmod .PublishDate }}
diff --git a/layouts/index.html b/layouts/index.html
index d437952..da1f073 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -27,19 +27,18 @@
>
<section id="main">
<div>
- <h1 id="title" class="f3 pl3">{{.Site.Title}} ☕ 🐶</h1>
- <ul>
+ <h1 id="title" class="f3">
+ {{.Site.Title}} {{ .Site.Params.TitleEmoji }}
+ </h1>
+ <ul class="list pl0">
+ <!-- pages -->
+ <!-- prettier-ignore -->
+ {{ range.Site.Params.menu }}
<li class="b mv3">
- <a class="f3 b pa1 black" href="/blog">blog</a>
- </li>
- <li class="b mv3">
- <a class="f3 b pa black " href="https://github.com/siegerts"
- >github</a
- >
- </li>
- <li class="b mv3">
- <a class="f3 b black" href="https://gitlab.com/siegerts">gitlab</a>
+ <a class="f3 b pa1 black" href="{{ .url }}">{{ .name }}</a>
</li>
+ <!-- prettier-ignore -->
+ {{ end }}
</ul>
</div>
</section>
diff --git a/layouts/page/single.html b/layouts/page/single.html
new file mode 100644
index 0000000..4800a03
--- /dev/null
+++ b/layouts/page/single.html
@@ -0,0 +1,25 @@
+{{ partial "header.html" . }}
+<body
+ lang="{{ .Site.LanguageCode }}"
+ class="sans-serif w-90 w-60-ns center center-ns mv2 mv5-ns"
+ itemscope
+ itemtype="http://schema.org/Article"
+>
+ {{ $baseurl := .Site.BaseURL }}
+ <span class="b">/ </span>
+ <a
+ href="{{ .Site.BaseURL }}"
+ class="b bb bw1 pb1 no-underline black"
+ >{{ .Site.Title }}</a
+ >
+
+ <section id="main" class="mt5">
+ <h1 itemprop="name" id="title">{{ .Title }}</h1>
+
+ <article itemprop="articleBody" id="content" class="w-90 lh-copy">
+ {{ .Content }}
+ </article>
+ </section>
+
+ {{ partial "footer.html" . }}
+</body>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index abd583e..c425fec 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,7 +1,7 @@
<footer>
<div>
- <p>
-
+ <p class="f6 gray mt6 lh-copy">
+ {{ .Site.Copyright }}
</p>
</div>
</footer>
diff --git a/layouts/project/single.html b/layouts/project/single.html
new file mode 100644
index 0000000..4800a03
--- /dev/null
+++ b/layouts/project/single.html
@@ -0,0 +1,25 @@
+{{ partial "header.html" . }}
+<body
+ lang="{{ .Site.LanguageCode }}"
+ class="sans-serif w-90 w-60-ns center center-ns mv2 mv5-ns"
+ itemscope
+ itemtype="http://schema.org/Article"
+>
+ {{ $baseurl := .Site.BaseURL }}
+ <span class="b">/ </span>
+ <a
+ href="{{ .Site.BaseURL }}"
+ class="b bb bw1 pb1 no-underline black"
+ >{{ .Site.Title }}</a
+ >
+
+ <section id="main" class="mt5">
+ <h1 itemprop="name" id="title">{{ .Title }}</h1>
+
+ <article itemprop="articleBody" id="content" class="w-90 lh-copy">
+ {{ .Content }}
+ </article>
+ </section>
+
+ {{ partial "footer.html" . }}
+</body>
diff --git a/layouts/section/project.html b/layouts/section/project.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/section/project.html
diff --git a/theme.toml b/theme.toml
index 93f13bb..53b24ea 100644
--- a/theme.toml
+++ b/theme.toml
@@ -4,18 +4,14 @@
name = "Basic"
license = "MIT"
licenselink = "https://github.com/siegerts/hugo-theme-basic/blob/master/LICENSE"
-description = ""
+description = "Basic blog theme styled with minimal tachyons"
homepage = "https://github.com/siegerts/hugo-theme-basic"
-tags = []
-features = []
+tags = ["minimal", "tachyons", "blog", "syntax highlighting", "google analytics", "plain", "clean", "starter"]
+features = ["blog", "syntax highlighting", "google analytics", "tachyons"]
min_version = "0.41"
[author]
- name = "S. Siegert"
- homepage = ""
+ name = "Stephen Siegert"
+ homepage = "https://xiegerts.com"
+
-# If porting an existing theme
-[original]
- name = ""
- homepage = ""
- repo = ""