Permalink
Browse files

Add slashes to links in <head.html>, <nav.html>, <footer.html> and

<404.html>.

Add favicon example.

Modify footer vars to allow links not pointing to user profiles.

<header.html> renamed to <header_wp.html> and part of it moved to <header.html> since the same block was repeated two times.

Add Hugo version to footer
  • Loading branch information...
1138-4EB authored and U.Martinez-Corral committed Feb 6, 2017
1 parent c071a83 commit 6f520773f55ef9e7c3133344606b3af76add8bcf
View
@@ -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/<username>/<siterepo>/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).
View
@@ -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"
View
BIN +23.5 KB (130%) images/screenshot.png
Binary file not shown.
View
BIN -2.82 KB (96%) images/tn.png
Binary file not shown.
View
@@ -14,7 +14,7 @@ <h1>Whoops, this page doesn't exist.</h1>
<h1>Move along. (404 error)</h1>
<br/>
<img src="{{ .Site.BaseURL }}img/404-southpark.jpg" />
<img src="{{ .Site.BaseURL }}/img/404-southpark.jpg" />
</div>
</div>
@@ -9,14 +9,17 @@
<div role="main" class="container main-content">
{{ 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
<div class="container" role="main">
NO MATCHING PARTIAL
{{.Content}}
</div>
{{ end }}
</div>
@@ -1,5 +1,5 @@
<footer>
<div class="container beautiful-jekyll-footer">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center footer-links">
@@ -55,7 +55,7 @@
{{ end }}
{{ if .Site.Author.stackoverflow }}
<li>
<a href="https://stackoverflow.com/users/{{ .Site.Author.stackoverflow }}" title="StackOverflow">
<a href="https://stackoverflow.com/{{ .Site.Author.stackoverflow }}" title="StackOverflow">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-stack-overflow fa-stack-1x fa-inverse"></i>
@@ -75,7 +75,7 @@
{{ end }}
{{ if .Site.Author.wikipedia }}
<li>
<a href="https://wikipedia.org/wiki/User:{{ .Site.Author.wikipedia }}" title="Wikipedia">
<a href="https://wikipedia.org/wiki/{{ .Site.Author.wikipedia }}" title="Wikipedia">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-wikipedia-w fa-stack-1x fa-inverse"></i>
@@ -94,27 +94,28 @@
</li>
</ul>
<p class="copyright text-muted">
{{ .Site.Author.name }}
&nbsp;&bull;&nbsp;
{{ .Site.LastChange.Format "2006" }}
<p class="credits copyright text-muted">
{{ .Site.Author.name }}
&nbsp;&bull;&nbsp;
{{ .Site.LastChange.Format "2006" }}
{{ if .Site.Title }}
&nbsp;&bull;&nbsp;
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
{{ end }}
{{ if .Site.Title }}
&nbsp;&bull;&nbsp;
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
{{ end }}
</p>
<!-- Please don't remove this, keep my open source work credited :) -->
<p class="theme-by text-muted">
<a href="http://gohugo.io">Hugo</a> powered - Themed by <a href="https://github.com/xor-gate/beautifulhugo/">beautiful-jekyll</a>. Source on Github (<a href="https://github.com/xor-gate/xor-gate.org/tree/{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT"}}</a>)</p>
</p>
<!-- Please don't remove this, keep my open source work credited :) -->
<p class="credits theme-by text-muted">
<a href="http://gohugo.io">Hugo v{{ .Hugo.Version }}</a> powered &nbsp;&bull;&nbsp; Theme by <a href="http://deanattali.com/beautiful-jekyll/">beautiful-jekyll</a> adapted to <a href="https://github.com/1138-4EB/beautifulhugo">Beautiful Hugo</a>
{{ with .Site.Params.commit }}&nbsp;&bull;&nbsp;[<a href="{{.}}{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT" }}</a>]{{ end }}
</p>
</div>
</div>
</div>
</footer>
<script src="{{ .Site.BaseURL }}js/jquery-1.11.2.min.js"></script>
<script src="{{ .Site.BaseURL }}js/bootstrap.min.js"></script>
<script src="{{ .Site.BaseURL }}js/main.js"></script>
<script src="{{ .Site.BaseURL }}/js/jquery-1.11.2.min.js"></script>
<script src="{{ .Site.BaseURL }}/js/bootstrap.min.js"></script>
<script src="{{ .Site.BaseURL }}/js/main.js"></script>
{{ template "_internal/google_analytics.html" . }}
View
@@ -4,31 +4,24 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>{{ .Title }}</title>
<meta name="author" content="{{ .Site.Author.name }}" />
{{ if .Description }}
<meta name="description" content="{{ .Description }}">
{{ end }}
{{ with .Description }}<meta name="description" content="{{ . }}">{{ end }}
<meta name="author" content="{{ .Site.Author.name }}"/>
{{ .Hugo.Generator }}
{{ if isset .Site.Params "favicon" }}
<link href='{{ .Site.BaseURL }}{{ .Site.Params.favicon }}' rel='icon' type='image/x-icon'/>
{{ end }}
{{ with .Site.Params.favicon }}<link href='{{ $.Site.BaseURL }}/{{ . }}' rel='icon' type='image/x-icon'/>{{ end }}
<link rel="alternate" href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/bootstrap.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/pygment_highlights.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/bootstrap.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/main.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/pygment_highlights.css" />
<!-- Facebook OpenGraph tags -->
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .URL }}/" />
<meta property="og:image" content="{{ .Site.Params.logo }}" />
<meta property="og:url" content="{{ .URL }}" />
<meta property="og:image" content="/{{ .Site.Params.logo }}" />
</head>
@@ -1,14 +1,3 @@
<!-- TODO this file has become a mess, refactor it -->
{{ if or .Params.bigimg .Title }}
{{ if .Params.bigimg }}
<div id="header-big-imgs" data-num-img=1 data-img-src-1="{{.Params.bigimg}}"></div>
{{ end }}
<header class="header-section {{ if .Params.bigimg }}has-img{{ end }}">
{{ if .Params.bigimg }}
<div class="big-img intro-header">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
@@ -29,36 +18,4 @@ <h2 class="{{ .Type }}-subheading">{{ .Params.subtitle }}</h2>
</div>
</div>
</div>
</div>
<span class='img-desc'></span>
</div>
{{ end }}
<div class="intro-header no-img">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="{{ .Type }}-heading">
<h1>{{ if .Title }}{{ .Title }}{{ else }}<br/>{{ end }}</h1>
{{ if .Params.subtitle }}
{{ if eq .Type "page" }}
<hr class="small">
<span class="{{ .Type }}-subheading">{{ .Params.subtitle }}</span>
{{ else }}
<h2 class="{{ .Type }}-subheading">{{ .Params.subtitle }}</h2>
{{ end }}
{{ end }}
{{ if eq .Type "post" }}
<span class="post-meta">Posted on {{ .Date.Format "January 2, 2006" }}</span>
{{ end }}
</div>
</div>
</div>
</div>
</div>
</header>
{{ else }}
<div class="intro-header"></div>
{{ end }}
</div>
@@ -0,0 +1,22 @@
<!-- TODO this file has become a mess, refactor it -->
{{ if or .Params.bigimg .Title }}
{{ if .Params.bigimg }}
<div id="header-big-imgs" data-num-img=1 data-img-src-1="{{.Params.bigimg}}"></div>
{{ end }}
<header class="header-section {{ if .Params.bigimg }}has-img{{ end }}">
{{ if .Params.bigimg }}
<div class="big-img intro-header">
{{ partial "header.html" . }}
<span class='img-desc'></span>
</div>
{{ end }}
<div class="intro-header no-img">
{{ partial "header.html" . }}
</div>
</header>
{{ else }}
<div class="intro-header"></div>
{{ end }}
@@ -35,7 +35,7 @@
<div class="avatar-img-border">
{{ if isset .Site.Params "logo" }}
<a title="{{ .Site.Title }}" href="{{ .Site.BaseURL }}">
<img class="avatar-img" src="{{ .Site.BaseURL }}{{ .Site.Params.logo }}" alt="{{ .Site.Title }}" />
<img class="avatar-img" src="{{ .Site.BaseURL }}/{{ .Site.Params.logo }}" alt="{{ .Site.Title }}" />
</a>
{{ end }}
</div>
View
@@ -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;
}
View
Binary file not shown.
View
BIN +1.06 KB static/img/favicon.ico
Binary file not shown.
View
Binary file not shown.

0 comments on commit 6f52077

Please sign in to comment.