Skip to content

Commit

Permalink
Various improvements I have made on my fork. (#70)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
b4d authored and Rajesh Shenoy committed Sep 18, 2019
1 parent ccec9e0 commit 18799ae
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions exampleSite/config.toml
Expand Up @@ -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]]
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/content.html
Expand Up @@ -22,6 +22,9 @@ <h6 class="text-left meta">
</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>
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/footer.html
Expand Up @@ -19,5 +19,6 @@
<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>
9 changes: 6 additions & 3 deletions layouts/partials/header.html
Expand Up @@ -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 }}">
Expand All @@ -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]>
Expand Down
5 changes: 4 additions & 1 deletion layouts/partials/sub_footer.html
Expand Up @@ -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>
1 change: 1 addition & 0 deletions static/css/custom.css
@@ -0,0 +1 @@
/* Add custom CSS here. */
4 changes: 4 additions & 0 deletions static/css/main.css
Expand Up @@ -40,6 +40,10 @@ html
min-height: 100%;
margin: 0;
}
li
{
text-align: left;
}
.author
{
color: #444;
Expand Down
1 change: 1 addition & 0 deletions static/js/custom.js
@@ -0,0 +1 @@
// Insert custom javascript here.

0 comments on commit 18799ae

Please sign in to comment.