diff --git a/README.md b/README.md index dd11a05..04c124f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Beautiful Hugo - A port of Beautiful Jekyll Theme -![Beautiful Hugo Theme Screenshot](https://github.com/halogenica/Hugo-BeautifulHugo/blob/master/images/screenshot.png) +![Beautiful Hugo Theme Screenshot](https://github.com/1138-4EB/beautifulhugo/blob/master/images/screenshot.png) ## Installation $ mkdir themes $ cd themes - $ git clone https://github.com/halogenica/Hugo-BeautifulHugo.git beautifulhugo + $ git clone https://github.com/1138-4EB/beautifulhugo.git beautifulhugo See [the Hugo documentation](http://gohugo.io/themes/installing/) for more information. @@ -31,10 +31,27 @@ To use this feature, uncomment and fill out the `disqusShortname` parameter in ` To add Google Analytics, simply sign up to [Google Analytics](http://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`. +### Commit SHA on the footer + +If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two environment variables have to be set (`GIT_COMMIT_SHA` and `GIT_COMMIT_SHA_SHORT`) and parameter `commit` has to be defined in the config file: + +``` +[Params] + commit = "https://github.com///tree/" +``` + +This can be achieved by running the next command prior to calling Hugo: + +``` + GIT_COMMIT_SHA=`git rev-parse --verify HEAD` GIT_COMMIT_SHA_SHORT=`git rev-parse --short HEAD` +``` + +See at [xor-gate/xor-gate.org](https://github.com/xor-gate/xor-gate.org) an example of how to add it to a continuous integration system. + ## About This is a port of the Jekyll theme [Beautiful Jekyll](http://deanattali.com/beautiful-jekyll/) by [Dean Attali](http://deanattali.com/aboutme#contact). It supports most of the features of the original theme. ## License -MIT Licensed, see [LICENSE](https://github.com/halogenica/Hugo-BeautifulHugo/blob/master/LICENSE). +MIT Licensed, see [LICENSE](https://github.com/halogenica/Hugo-BeautifulHugo/blob/master/LICENSE). \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 970c4d5..d38acc9 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,4 +1,4 @@ -baseurl = "http://username.github.io" +baseurl = "https://username.github.io" languageCode = "en-us" title = "Beautiful Hugo" theme = "beautifulhugo" @@ -7,8 +7,10 @@ pygmentsUseClasses = true #googleAnalytics = "XXX" [Params] - logo = "img/avatar-icon.png" subtitle = "Build a beautiful and simple website in minutes" + logo = "img/avatar-icon.png" + favicon = "img/favicon.ico" + commit = false [Author] name = "Some Person" @@ -17,9 +19,9 @@ pygmentsUseClasses = true github = "username" twitter = "username" linkedin = "pub/username/X/YYY/ZZZ" - stackoverflow = "XXXXXXX/username" + stackoverflow = "users/XXXXXXX/username" soundcloud = "username" - wikipedia = "username" + wikipedia = "User:username" [[menu.main]] name = "Blog" diff --git a/images/screenshot.png b/images/screenshot.png index 8a290b0..0d68a8a 100644 Binary files a/images/screenshot.png and b/images/screenshot.png differ diff --git a/images/tn.png b/images/tn.png index 05e47a5..97904cc 100644 Binary files a/images/tn.png and b/images/tn.png differ diff --git a/layouts/404.html b/layouts/404.html index a4a5038..a7919f2 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -14,7 +14,7 @@

Move along. (404 error)


- + diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 16b7ca5..4a8f410 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -9,14 +9,17 @@
- {{ partial "header.html" . }} + {{ partial "header_wp.html" . }} {{ if eq .Type "post" }} {{ partial "post.html" . }} {{ else if eq .Type "page" }} {{ partial "page.html" . }} {{ else }} - NO MATCHING PARTIAL +
+ NO MATCHING PARTIAL + {{.Content}} +
{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 286b192..a1a6f87 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,5 @@ - - - + + + {{ template "_internal/google_analytics.html" . }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 810ca28..e9d67b3 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,31 +4,24 @@ {{ .Title }} - - - - {{ if .Description }} - - {{ end }} - + {{ with .Description }}{{ end }} + {{ .Hugo.Generator }} - {{ if isset .Site.Params "favicon" }} - - {{ end }} + {{ with .Site.Params.favicon }}{{ end }} - - - - - - + + + + + + - - + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 0c5cab1..0e79c6a 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,14 +1,3 @@ - - -{{ if or .Params.bigimg .Title }} - -{{ if .Params.bigimg }} -
-{{ end }} - -
-{{ if .Params.bigimg }} -
@@ -29,36 +18,4 @@
-
- - -{{ end }} -
-
-
-
-
-

{{ if .Title }}{{ .Title }}{{ else }}
{{ end }}

- {{ if .Params.subtitle }} - {{ if eq .Type "page" }} -
- {{ .Params.subtitle }} - {{ else }} -

{{ .Params.subtitle }}

- {{ end }} - {{ end }} - - {{ if eq .Type "post" }} - - {{ end }} -
-
-
-
-
-
- - -{{ else }} -
-{{ end }} \ No newline at end of file + \ No newline at end of file diff --git a/layouts/partials/header_wp.html b/layouts/partials/header_wp.html new file mode 100644 index 0000000..e3b8fdf --- /dev/null +++ b/layouts/partials/header_wp.html @@ -0,0 +1,22 @@ + + +{{ if or .Params.bigimg .Title }} + + {{ if .Params.bigimg }} +
+ {{ end }} + +
+ {{ if .Params.bigimg }} +
+ {{ partial "header.html" . }} + +
+ {{ end }} +
+ {{ partial "header.html" . }} +
+
+{{ else }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 18cad43..fe876fb 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -35,7 +35,7 @@
{{ if isset .Site.Params "logo" }} - {{ .Site.Title }} + {{ .Site.Title }} {{ end }}
diff --git a/static/css/main.css b/static/css/main.css index 71fda86..0383537 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -247,13 +247,14 @@ footer .list-inline { margin: 0; padding: 0; } +footer .credits { + text-align: center; +} footer .copyright { font-family: Open Sans; - text-align: center; margin-bottom: 0; } footer .theme-by { - text-align: center; margin: 10px 0 0; } diff --git a/static/img/avatar-favicon.png b/static/img/avatar-favicon.png new file mode 100644 index 0000000..e567046 Binary files /dev/null and b/static/img/avatar-favicon.png differ diff --git a/static/img/favicon.ico b/static/img/favicon.ico new file mode 100644 index 0000000..523bc99 Binary files /dev/null and b/static/img/favicon.ico differ diff --git a/static/img/favicon.ico.zip b/static/img/favicon.ico.zip new file mode 100644 index 0000000..8c6f17e Binary files /dev/null and b/static/img/favicon.ico.zip differ