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

github.com/shenoybr/hugo-goa.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeni (s55db) <b4d@sablun.org>2019-09-18 12:19:21 +0300
committerRajesh Shenoy <shenoybr@users.noreply.github.com>2019-09-18 12:19:21 +0300
commit18799ae79663ed789b0ff7e5761901b5e68e6492 (patch)
tree43322e3ed57e4caf16c5bf77ccc2c4c2b16b90b1
parentccec9e019966fb0f3eb681512ea02b98ac8d6bcf (diff)
Various improvements I have made on my fork. (#70)
* Improving the title setup for the pages. Display site title on the first page, and site title + page title (blog post name) on all other sites. Probably improves SEO. * Table of contents in blog posts Added table of contets to the blog posts if they are longer than 300 words and toc variable is set to true in config file. * RSS icon in the footer. Added RSS icon with link to feed if displayrssicon variable is set to true in config file. * Added Hugo version to the powered by footer section * Updated for Hugo version 0.55. * Updated fontawesome to version 5.8.2. * Using variable for site url. * Found even better variable. * Added custom css and js files Template users can add custom CSS and JS to their projects without losing main.css/js content * Added placeholder files for custom JS and CSS, to prevent errors in browsers. * Align list text to the left instead of justify. Avoids funky whitespaces when the list entry is short and browser tries to justify the text. * Fixed link to agency hugo theme. * Bruno de Carvalho's blog link has no SSL. Reverting to http link
-rw-r--r--README.md4
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/partials/content.html3
-rw-r--r--layouts/partials/footer.html1
-rw-r--r--layouts/partials/header.html9
-rw-r--r--layouts/partials/sub_footer.html5
-rw-r--r--static/css/custom.css1
-rw-r--r--static/css/main.css4
-rw-r--r--static/js/custom.js1
9 files changed, 24 insertions, 6 deletions
diff --git a/README.md b/README.md
index 793f39d..813cc57 100644
--- a/README.md
+++ b/README.md
@@ -236,10 +236,10 @@ Example:
The theme's design was inspired by many blogs and themes:
-1. Bruno de Carvalho's [blog](https://biasedbit.com).
+1. Bruno de Carvalho's [blog](http://biasedbit.com).
2. [Hugo Cocoa](https://themes.gohugo.io/cocoa/).
3. [Hugo Vec](https://themes.gohugo.io/hugo-theme-vec/).
-4. [Hugo Agency](https://themes.gohugo.io/hugo-agency/).
+4. [Hugo Agency](https://themes.gohugo.io/agency/).
## License
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index cd36631..d3f52f8 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -74,6 +74,8 @@ copyright = "© 2016. Erlich Bachman. [Some Rights Reserved](http://creativecomm
poweredby = true
highlightjs = true
socialmarkup = true
+toc = true
+displayrssicon = true
## Main Menu
[[menu.main]]
diff --git a/layouts/partials/content.html b/layouts/partials/content.html
index 79889c8..26e35cb 100644
--- a/layouts/partials/content.html
+++ b/layouts/partials/content.html
@@ -22,6 +22,9 @@
</section>
<section id="content-pane" class="row">
<div class="col-md-12 text-justify content">
+ {{ if and ( ne .Params.toc false) (gt .WordCount 300 ) }}
+ {{ .TableOfContents }}
+ {{ end }}
{{ .Content }}
</div>
</section>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index f2c81b9..5b9829c 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -19,5 +19,6 @@ hljs.initHighlightingOnLoad();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="js/main.js"></script>
+<script src="js/custom.js"></script>
</body>
</html>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index c4b7bde..fa7fa5c 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -12,9 +12,11 @@
<base href="{{ .Site.BaseURL }}">
-<title>{{ .Site.Title }}</title>
+<title>
+{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ if eq $url "" }} {{ .Site.Title }} {{ else }} {{ .Site.Title }} - {{ .Title }} {{ end }}
+</title>
-{{ .Hugo.Generator }}
+{{ hugo.Generator }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
@@ -26,8 +28,9 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:300,400|Roboto+Slab:400,700|Roboto:300,300i,400,400i,500,500i,700,700i">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
-<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css">
+<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}">
+<link rel="stylesheet" href="{{ "css/custom.css" | absURL }}">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
diff --git a/layouts/partials/sub_footer.html b/layouts/partials/sub_footer.html
index 1d3974e..c3ed18a 100644
--- a/layouts/partials/sub_footer.html
+++ b/layouts/partials/sub_footer.html
@@ -3,7 +3,10 @@
{{ with .Site.Params.extra }}
<h6 class="text-center copyright">{{ .copyright | markdownify }}</h6>
{{ if ne .poweredby false }}
- <h6 class="text-center powered">Powered by <a href="https://gohugo.io/">Hugo</a> &amp; <a href="https://github.com/shenoybr/hugo-goa">Goa</a>.</h6>
+ <h6 class="text-center powered">Powered by <a href="https://gohugo.io/">Hugo v{{ hugo.Version }}</a> &amp; <a href="https://github.com/shenoybr/hugo-goa">Goa</a>.</h6>
{{ end }}
+ {{ if ne .displayrssicon false }}
+ <h6><a href="{{ .RSSLink }}" aria-label="RSS Feed"><i class="fas fa-rss" aria-hidden="true"></i></a></h6>
+ {{ end }}
{{ end }}
</footer>
diff --git a/static/css/custom.css b/static/css/custom.css
new file mode 100644
index 0000000..4f174c1
--- /dev/null
+++ b/static/css/custom.css
@@ -0,0 +1 @@
+/* Add custom CSS here. */
diff --git a/static/css/main.css b/static/css/main.css
index 70d9cb4..19a3c77 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -40,6 +40,10 @@ html
min-height: 100%;
margin: 0;
}
+li
+{
+ text-align: left;
+}
.author
{
color: #444;
diff --git a/static/js/custom.js b/static/js/custom.js
new file mode 100644
index 0000000..c0e86c3
--- /dev/null
+++ b/static/js/custom.js
@@ -0,0 +1 @@
+// Insert custom javascript here.