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
This commit is contained in:
parent
c071a83fde
commit
6f520773f5
21
README.md
21
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,6 +31,23 @@ 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.
|
||||
|
@ -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"
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 100 KiB |
BIN
images/tn.png
BIN
images/tn.png
Binary file not shown.
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 74 KiB |
@ -14,7 +14,7 @@
|
||||
<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 }}
|
||||
•
|
||||
{{ .Site.LastChange.Format "2006" }}
|
||||
<p class="credits copyright text-muted">
|
||||
{{ .Site.Author.name }}
|
||||
•
|
||||
{{ .Site.LastChange.Format "2006" }}
|
||||
|
||||
{{ if .Site.Title }}
|
||||
•
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
{{ end }}
|
||||
{{ if .Site.Title }}
|
||||
•
|
||||
<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 • 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 }} • [<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" . }}
|
||||
|
@ -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">
|
||||
@ -30,35 +19,3 @@
|
||||
</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 }}
|
22
layouts/partials/header_wp.html
Normal file
22
layouts/partials/header_wp.html
Normal file
@ -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>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
BIN
static/img/avatar-favicon.png
Normal file
BIN
static/img/avatar-favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
static/img/favicon.ico
Normal file
BIN
static/img/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
static/img/favicon.ico.zip
Normal file
BIN
static/img/favicon.ico.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user