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

@ -1,6 +1,8 @@
# hyde-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).
__`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)
@ -8,7 +10,7 @@ __`hyde-hyde`__ is a [Hugo](https://gohugo.io)'s theme derived from @spf13's [Hy
## Installation
`hyde-hyde` can be easily installed as other themes:
`hyde-hyde` can be easily installed as many other Hugo's themes:
```sh
$ cd HUGO_SITE
@ -25,7 +27,7 @@ Then indicate `hyde-hyde` as the main theme
```tomp
theme = "hyde-hyde"
```
* `config.yaml`
```yaml
@ -34,7 +36,7 @@ theme : "hyde-hyde"
## 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)
### Original Developed by Mark Otto

View file

@ -1,14 +1,13 @@
## Basic Configuration
baseurl = "http://localhost:1313/"
baseurl = "https://example.com/"
languageCode = "en"
theme = "hyde-hyde"
paginate = 7
## Hugo Built-in Features
disqusShortname = ""
googleAnalytics = ""
enableRobotsTXT = true
# disqusShortname = ""
# googleAnalytics = ""
# enableRobotsTXT = true
## Site Settings
[params]
@ -17,6 +16,8 @@ enableRobotsTXT = true
# description = "..."
authorimage = "/img/hugo.png"
dateformat = "Jan 1, 2006"
highlightjs = true
# highlightjsstyle = "github"
## Social Accounts
[params.social]
@ -29,13 +30,6 @@ enableRobotsTXT = true
stackoverflow = "<username>"
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
[[menu.main]]
name = "Posts"

View file

@ -1,7 +1,36 @@
{{ define "main" -}}
<div class="post">
<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 }}
</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="{{ .Site.BaseURL }}css/custom.css">
<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 -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.png">

View file

@ -15,7 +15,7 @@
</ul>
</div>
{{ 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>

View file

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