Updates README, fonts, adds GraphComment

This commit is contained in:
Huy Tran 2018-04-05 16:17:04 +10:00
parent f830530c5a
commit d49f6bf471
6 changed files with 20 additions and 17 deletions

View file

@ -9,9 +9,10 @@ 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/posts.png) ![hyde-hyde main screen](https://github.com/htr3n/hyde-hyde/blob/master/images/posts.png)
## Notable Changes ## Notable Changes
* Migrated to [Font-Awesome 5](https://fontawesome.com) * Using [highlight.js](https://highlightjs.org) for highlighting code
* The color tone is inspired by [Nate Finch's blog](https://npf.io) * Using [Font-Awesome 5](https://fontawesome.com) for icons
* Main font [Fira-Sans](https://fonts.google.com/specimen/Fira+Sans) * Color tones are inspired by [Nate Finch's blog](https://npf.io)
* Main font [Fira-Sans](https://fonts.google.com/specimen/Fira+Sans) + fixed width font [Roboto Mono](https://fonts.google.com/specimen/Roboto+Mono)
## Installation ## Installation

View file

@ -5,8 +5,8 @@ languageCode = "en"
theme = "hyde-hyde" theme = "hyde-hyde"
## Hugo Built-in Features ## Hugo Built-in Features
# disqusShortname = "" # disqusShortname = "your-disqus-shortname"
# googleAnalytics = "" # googleAnalytics = "your-google-analytics-id"
# enableRobotsTXT = true # enableRobotsTXT = true
## Site Settings ## Site Settings
@ -18,6 +18,8 @@ theme = "hyde-hyde"
dateformat = "Jan 2, 2006" dateformat = "Jan 2, 2006"
highlightjs = true highlightjs = true
# highlightjsstyle = "github" # highlightjsstyle = "github"
# please choose either GraphComment or Disqus
# GraphCommentId = "your-graph-comment-id"
## Social Accounts ## Social Accounts
[params.social] [params.social]

View file

@ -1,10 +1,10 @@
<link href="http://gmpg.org/xfn/11" rel="profile"> <link href="http://gmpg.org/xfn/11" rel="profile">
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
{{ "<!-- Enable responsiveness on mobile devices -->" | safeHTML }} {{ "<!-- Enable responsiveness on mobile devices -->" | safeHTML }}
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
{{ with .Site.Params.meta.description -}}<meta name="description" content="{{ . }}">{{- end }} {{ with .Site.Params.meta.description -}}<meta name="description" content="{{ . }}">{{- end }}
{{ with .Site.Params.meta.keywords -}}<meta name="keywords" content="{{.}}">{{- end }} {{ with .Site.Params.meta.keywords -}}<meta name="keywords" content="{{.}}">{{- end }}
{{ .Hugo.Generator }} {{ .Hugo.Generator }}
{{ if .IsHome -}} {{ if .IsHome -}}
<title>{{ .Site.Title }}</title> <title>{{ .Site.Title }}</title>
@ -12,20 +12,20 @@
<title>{{ .Title }} &middot; {{ .Site.Title }}</title> <title>{{ .Title }} &middot; {{ .Site.Title }}</title>
{{- end }} {{- end }}
<meta content="{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}" property="og:title"> <meta content="{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}" property="og:title">
<meta content="{{ $isHomePage := eq .Title .Site.Title }}{{ .Site.Params.meta.description }}{{ if eq $isHomePage false }} - {{ .Description }}{{ end }}" property="og:description"> <meta content="{{ $isHomePage := eq .Title .Site.Title }}{{ .Site.Params.meta.description }}{{ if eq $isHomePage false }} - {{ .Description }}{{ end }}" property="og:description">
{{ "<!-- CSS -->" | safeHTML }} {{ "<!-- CSS -->" | safeHTML }}
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i|Roboto+Mono:300,300i,400,400i" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i|Roboto+Mono:300,300i,400,400i" rel="stylesheet">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print"> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/poole.css"> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/poole.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/hyde.css"> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/hyde.css">
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" /> --> {{ "<!-- Font-Awesome -->" | safeHTML }}
<script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js" integrity="sha384-8iPTk2s/jMVj81dnzb/iFR2sdA7u06vHJyyLlAd4snFpCl/SnyUjRrbdJsw1pGIl" crossorigin="anonymous"></script> <script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js" integrity="sha384-8iPTk2s/jMVj81dnzb/iFR2sdA7u06vHJyyLlAd4snFpCl/SnyUjRrbdJsw1pGIl" crossorigin="anonymous"></script>
{{ if .Site.Params.highlightjs -}} {{ if .Site.Params.highlightjs -}}
{{ "<!-- highlight.js-->" | safeHTML }} {{ "<!-- highlight.js-->" | safeHTML }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
{{- end }} {{- end }}
{{ if .Site.Params.PygmentsUseClasses -}} {{ if .Site.Params.PygmentsUseClasses -}}
{{ "<!-- Pygments Syntax -->" | safeHTML }} {{ "<!-- Pygments Syntax -->" | safeHTML }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/syntax.css"> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/syntax.css">
{{- end }} {{- end }}
{{- "<!-- Customised CSS -->" | safeHTML }} {{- "<!-- Customised CSS -->" | safeHTML }}
@ -39,7 +39,7 @@
<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">
{{ if .RSSLink -}} {{ if .RSSLink -}}
{{ "<!-- RSS -->" | safeHTML }} {{ "<!-- RSS -->" | safeHTML }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" /> <link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{- end }} {{- end }}

View file

@ -30,6 +30,8 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
<br/>
<i class="fas fa-clock"></i> {{ .ReadingTime }} min read
</span> </span>
</div> </div>
{{ end }} {{ end }}

View file

@ -14,9 +14,7 @@
<h2>Comments</h2> <h2>Comments</h2>
{{ partial "post_disqus.html" . }} {{ partial "post_disqus.html" . }}
{{ end }} {{ end }}
{{- end }} {{ else if .Site.Params.GraphCommentId -}}
{{ if .Site.Params.GraphCommentId -}}
<div id="graphcomment"></div> <div id="graphcomment"></div>
<script type="text/javascript"> <script type="text/javascript">
window.graphcomment_id = '{{ .Site.Params.GraphCommentId }}'; window.graphcomment_id = '{{ .Site.Params.GraphCommentId }}';

View file

@ -2,7 +2,7 @@ name = "hyde-hyde"
license = "MIT" license = "MIT"
licenselink = "https://github.com/htr3n/hyde-hyde/blob/master/LICENSE.md" licenselink = "https://github.com/htr3n/hyde-hyde/blob/master/LICENSE.md"
description = "A forked/derived version of Hyde" description = "A forked/derived version of Hyde"
tags = ["blog", "theme", "hyde", "highlight.js", "font-awesome", "google analytics", "disqus", "personal", "syntax highlighting", "responsive"] tags = ["blog", "theme", "hyde", "highlight.js", "font-awesome", "google analytics", "disqus", "personal", "syntax highlighting", "responsive", "graphcomment"]
features = ["blog", "theme", "highlight.js", "font-awesome"] features = ["blog", "theme", "highlight.js", "font-awesome"]
min_version = "0.33" min_version = "0.33"