revise link to Hyde's options

This commit is contained in:
Huy Tran 2018-01-21 21:17:19 +07:00
parent 6290896986
commit 365a5731ca
6 changed files with 56 additions and 20 deletions

View file

@ -2,13 +2,15 @@
__`hyde-hyde`__ is a [Hugo](https://gohugo.io)'s theme derived from @spf13's [Hyde](https://github.com/spf13/hyde.git) which is in turn ported from @mdo Jekyll's [Hyde](https://github.com/poole/hyde). __`hyde-hyde`__ is a [Hugo](https://gohugo.io)'s theme derived from @spf13's [Hyde](https://github.com/spf13/hyde.git) which is in turn ported from @mdo Jekyll's [Hyde](https://github.com/poole/hyde).
You can see a real site in action [here](https://htr3n.github.io).
![hyde-hyde main screen](https://github.com/htr3n/hyde-hyde/blob/master/images/hyde-hyde-main.PNG) ![hyde-hyde main screen](https://github.com/htr3n/hyde-hyde/blob/master/images/hyde-hyde-main.PNG)
![hyde-hyde main screen](https://github.com/htr3n/hyde-hyde/blob/master/images/hyde-hyde-posts.PNG) ![hyde-hyde main screen](https://github.com/htr3n/hyde-hyde/blob/master/images/hyde-hyde-posts.PNG)
## Installation ## Installation
`hyde-hyde` can be easily installed as other themes: `hyde-hyde` can be easily installed as many other Hugo's themes:
```sh ```sh
$ cd HUGO_SITE $ cd HUGO_SITE
@ -34,7 +36,7 @@ theme : "hyde-hyde"
## Options ## Options
* `hyde-hyde` essentially inherits all options from [Hyde](https://github.com/spf13/hyde). * `hyde-hyde` essentially inherits [all options](https://github.com/spf13/hyde#options) from Hyde.
## Author(s) ## Author(s)
### Original Developed by Mark Otto ### Original Developed by Mark Otto

View file

@ -1,14 +1,13 @@
## Basic Configuration ## Basic Configuration
baseurl = "http://localhost:1313/" baseurl = "https://example.com/"
languageCode = "en" languageCode = "en"
theme = "hyde-hyde" theme = "hyde-hyde"
paginate = 7
## Hugo Built-in Features ## Hugo Built-in Features
disqusShortname = "" # disqusShortname = ""
googleAnalytics = "" # googleAnalytics = ""
enableRobotsTXT = true # enableRobotsTXT = true
## Site Settings ## Site Settings
[params] [params]
@ -17,6 +16,8 @@ enableRobotsTXT = true
# description = "..." # description = "..."
authorimage = "/img/hugo.png" authorimage = "/img/hugo.png"
dateformat = "Jan 1, 2006" dateformat = "Jan 1, 2006"
highlightjs = true
# highlightjsstyle = "github"
## Social Accounts ## Social Accounts
[params.social] [params.social]
@ -29,13 +30,6 @@ enableRobotsTXT = true
stackoverflow = "<username>" stackoverflow = "<username>"
email = "your-email@example.com" email = "your-email@example.com"
## Extras
[params.extra]
copyright = "© 2018. [Some Rights Reserved](http://creativecommons.org/licenses/by/3.0/)."
poweredby = true
# highlightjs = true
# highlightjsstyle = "github"
## Main Menu ## Main Menu
[[menu.main]] [[menu.main]]
name = "Posts" name = "Posts"

View file

@ -1,7 +1,36 @@
{{ define "main" -}} {{ define "main" -}}
<div class="post"> <div class="post">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }}</span> {{ if ne .Params.showpagemeta false }}
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
<!-- published date -->
{{ if not .Date.IsZero }} {{ .Date.Format .Site.Params.dateformat }} {{end}}
<!-- categories -->
{{ if isset .Params "categories" }}
{{ $total := len .Params.categories }}
{{ if gt $total 0 }}
in
{{ $total := sub $total 1 }}
{{ range $i, $cat := sort $.Params.categories }}
<a class="meta" href="{{ "/categories/" | relURL }}{{ $cat | urlize }}">{{ $cat | upper }}</a>{{ if lt $i $total }}, {{ end }}
{{ end }}
{{ end }}
{{ end }}
<!-- tags -->
{{ if isset .Params "tags" }}
{{ $total := len .Params.tags }}
{{ if gt $total 0 }}
{{ $subtotal := sub $total 1 }}
{{ range $i, $tag := sort $.Params.tags }}
<a class="meta" href="{{ "/tags/" | relURL }}{{ $tag | urlize }}">#{{ $tag | upper }}</a>{{ if lt $i $subtotal }} {{ end }}
{{ end }}
{{ end }}
{{ end }}
</span>
</div>
{{ end }}
{{ .Content }} {{ .Content }}
</div> </div>

View file

@ -22,6 +22,11 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i,500"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i,500">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/custom.css"> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/custom.css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
{{ if .Site.Params.highlightjs }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
{{ end }}
<!-- Icons --> <!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.png"> <link rel="shortcut icon" href="/favicon.png">

View file

@ -15,7 +15,7 @@
</ul> </ul>
</div> </div>
{{ partial "social.html" . }} {{ partial "social.html" . }}
<p>{{ with .Site.Params.copyright }}{{.}}{{ else }}&copy; {{ now.Format "2006"}} {{.Site.Params.author}}. Some rights reserved. {{end}}</p> <p>{{ with .Site.Params.copyright }}{{.}}{{ else }}&copy; {{ now.Format "2006"}} {{.Site.Params.author}}. <a href="http://creativecommons.org/licenses/by/3.0">Some Rights Reserved</a>. {{end}}</p>
</div> </div>
<div> <div>
</div> </div>

View file

@ -5,7 +5,8 @@ body {
} }
code { code {
font-family: "Fira Code", "Source Code Pro", Consolas, monospace; font-family: monospace;
font-size: .9rem;
} }
.img-circle { .img-circle {
@ -29,3 +30,8 @@ span, p, code {
.text-center { .text-center {
text-align:center; text-align:center;
} }
.meta {
font-size: .9rem !important;
font-weight: 300;
}