diff options
author | Huy Tran <hoang.huy.tran@gmail.com> | 2020-11-03 03:25:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 03:25:29 +0300 |
commit | e74a3fc003ae5fd9438579af98ef90033c96267d (patch) | |
tree | 8b6be04c7700b81c5ad22d002b8463bac55f708b | |
parent | e703e0ecf87644513236a3cc54f40b7e9262e9eb (diff) | |
parent | a4ecbb1e8f8a9b1162565a1f5cc2f255a4cd26a2 (diff) |
Merge branch 'master' into pgpkey
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | exampleSite/config.toml | 4 | ||||
-rw-r--r-- | layouts/partials/footer/font-awesome-js.html | 2 | ||||
-rw-r--r-- | layouts/partials/header/meta.html | 1 | ||||
-rw-r--r-- | layouts/partials/highlight-js.html | 8 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 10 | ||||
-rw-r--r-- | layouts/partials/sidebar/copyright.html | 2 | ||||
-rw-r--r-- | layouts/partials/sidebar/social.html | 13 |
8 files changed, 44 insertions, 8 deletions
@@ -4,6 +4,8 @@ __`Hyde-hyde`__ is a [Hugo](https://gohugo.io)'s theme inspired and derived from @spf13's [Hyde](https://github.com/spf13/hyde.git) and [Nate Finch's blog](https://npf.io). +> NOTICE: Maintainers / collaborators seeking: As I'm underwater with my full time job at the moment, I'm actively looking for and welcome any new maintainers or collaborators. If you are interested, comment on [#130](https://github.com/htr3n/hyde-hyde/issues/130) and I can add you to the project. TIA. + ## Breaking Changes Since version 2.0, __`hyde-hyde`__ has been overhauled and, therefore, might cause some disruptions. @@ -159,6 +161,16 @@ Here is a longer summary of the project. You can write as long as you wish. If you want to adjust the portfolio page to your needs, please have a look at the [main template](https://github.com/htr3n/hyde-hyde/blob/master/layouts/portfolio/list.html), that uses this [partial template](https://github.com/htr3n/hyde-hyde/blob/master/layouts/partials/portfolio/content.html) and [this SCSS style](https://github.com/htr3n/hyde-hyde/blob/master/assets/scss/hyde-hyde/_project.scss). +### Posts in home page +By default hugo will show in your home page the most populated section. +This means that if you have more projects than posts, by default your home page will list your projects instead of your posts. +If you want to change this behaviour you can change the [mainsections](https://gohugo.io/functions/where/#mainsections). +For example, for the [exampleSite](https://github.com/htr3n/hyde-hyde/tree/master/exampleSite) this is how you should change the `config.toml` file: +``` +[params] + mainSections = ["posts"] +``` + ## Some Screenshots ### Main page diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4661ff8..7e3baed 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -23,7 +23,9 @@ theme = "hyde-hyde" dateformat = "Jan 2, 2006" # sidebar, copyright & license + #logoimage = "/img/hugo.png" copyright = "htr3n" + since = 2019 license = "CC BY-SA 4.0" licenseURL = "https://creativecommons.org/licenses/by-sa/4.0" showBuiltWith = true @@ -49,8 +51,10 @@ theme = "hyde-hyde" linkedin = "<username>" twitter = "<username>" facebook = "<username>" + microblog = "<username>" stackoverflow = "<username>" telegram = "<username>" + # orcid = "<xxxx-xxxx-xxxx-xxxx>" email = "your-email@example.com" # gravatar = "your-email@example.com" # pgpkey = "<path-to-your-key-in-/static>" diff --git a/layouts/partials/footer/font-awesome-js.html b/layouts/partials/footer/font-awesome-js.html index d94a68c..a92a75a 100644 --- a/layouts/partials/footer/font-awesome-js.html +++ b/layouts/partials/footer/font-awesome-js.html @@ -1 +1 @@ -<script defer src="https://use.fontawesome.com/releases/v5.5.0/js/all.js" integrity="sha384-GqVMZRt5Gn7tB9D9q7ONtcp4gtHIUEW/yG7h98J7IpE3kpi+srfFyyB/04OV6pG0" crossorigin="anonymous"></script> +<script defer src="https://use.fontawesome.com/releases/v5.12.1/js/all.js" integrity="sha384-ZbbbT1gw3joYkKRqh0kWyRp32UAvdqkpbLedQJSlnI8iLQcFVxaGyrOgOJiDQTTR" crossorigin="anonymous"></script> diff --git a/layouts/partials/header/meta.html b/layouts/partials/header/meta.html index 5adbbe8..e0ce340 100644 --- a/layouts/partials/header/meta.html +++ b/layouts/partials/header/meta.html @@ -1,6 +1,5 @@ <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta http-equiv="Cache-Control" content="public" /> {{ "<!-- Enable responsiveness on mobile devices -->" | safeHTML }} <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> {{ hugo.Generator }} diff --git a/layouts/partials/highlight-js.html b/layouts/partials/highlight-js.html index 87c347d..e20528b 100644 --- a/layouts/partials/highlight-js.html +++ b/layouts/partials/highlight-js.html @@ -1,13 +1,12 @@ -{{ if or ((not (isset .Params "highlight")) and ((isset .Params "highlight") .Params.highlight)) }} +{{- if (.Site.Params.highlightjs) -}} +{{ if (or (not (isset .Params "highlight")) (and (isset .Params "highlight") .Params.highlight)) }} {{ $.Scratch.Set "hl_languages" (union (.Site.Params.highlightjslanguages) (.Params.highlightjslanguages)) }} - {{ if (.Site.Params.highlightjs) }} - <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script> {{ with $.Scratch.Get "hl_languages" }} {{ range . }} <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/{{.}}.min.js"></script> {{ end }} {{ end }} - {{ end }} <script type="text/javascript"> {{ with $.Scratch.Get "hl_languages" }} hljs.configure({languages: [{{(delimit . ", ")}}]}); @@ -16,3 +15,4 @@ </script> {{ $.Scratch.Delete "hl_languages" }} {{ end }} +{{- end -}} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 2e33fec..e256384 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -3,7 +3,15 @@ <div class="container {{ with .Site.Params.sidebarSticky }}sidebar-sticky{{ end }}"> <div class="sidebar-about"> <span class="site__title"> - <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> + <a href="{{ .Site.BaseURL }}"> + {{ with .Site.Params.logoimage }} + {{ $strippedSlash := ($.Site.Params.logoimage | replaceRE "^(/)+(.*)" "$2") }} + {{ $logoImage := (printf "%s%s" $.Site.BaseURL $strippedSlash) }} + <img src="{{$logoImage}}" alt="Logo Image" class="element--center"> + {{ else }} + {{ .Site.Title }} + {{ end }} + </a> </span> {{ if and (isset .Site.Params "authorimage") (not (isset .Site.Params.social "gravatar")) }} {{ with .Site.Params.authorimage }} diff --git a/layouts/partials/sidebar/copyright.html b/layouts/partials/sidebar/copyright.html index e9227d8..b3c4d0c 100644 --- a/layouts/partials/sidebar/copyright.html +++ b/layouts/partials/sidebar/copyright.html @@ -1,6 +1,6 @@ {{ with .Site.Params.copyright }} <div class="copyright"> - © {{ now.Format "2006"}} {{ . | safeHTML }} + © {{ with $.Site.Params.since }}{{ if lt . now.Year }}{{ . | safeHTML }} - {{ end }}{{ end }}{{ now.Format "2006"}} {{ . | safeHTML }} {{ with $.Site.Params.license }} <a href="{{$.Site.Params.licenseURL | safeHTML}}">{{ . | safeHTML }}</a> {{end}} diff --git a/layouts/partials/sidebar/social.html b/layouts/partials/sidebar/social.html index d7a64e9..8fe3872 100644 --- a/layouts/partials/sidebar/social.html +++ b/layouts/partials/sidebar/social.html @@ -2,6 +2,9 @@ {{ with .Site.Params.social.twitter }} <a href="https://twitter.com/{{.}}" rel="me"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a> {{ end }} + {{ with .Site.Params.social.microblog }} + <a href="https://micro.blog/{{.}}" rel="me"><i class="fab fa-microblog fa-lg" aria-hidden="true"></i></a> + {{ end }} {{ with .Site.Params.social.facebook }} <a href="https://facebook.com/{{.}}" rel="me"><i class="fab fa-facebook-f"></i></a> {{ end }} @@ -24,6 +27,9 @@ {{ with .Site.Params.social.linkedin }} <a href="https://linkedin.com/in/{{.}}" rel="me"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a> {{ end }} + {{ with .Site.Params.social.googlescholar}} + <a href="https://scholar.google.com/citations?user={{.}}" rel="me"><i class="fas fa-graduation-cap fa-lg" aria-hidden="true"></i></a> + {{ end }} {{ with .Site.Params.social.stackoverflow }} <a href="https://stackoverflow.com/users/{{.}}" rel="me"><i class="fab fa-stack-overflow fa-lg" aria-hidden="true"></i></a> {{ end }} @@ -42,10 +48,17 @@ {{ with .Site.Params.social.aboutme }} <a href="https://about.me/{{.}}"><i class="fas fa-address-card fa-lg" aria-hidden="true"></i></a> {{ end }} + {{ with .Site.Params.social.orcid }} + <a href="https://orcid.org/{{.}}" rel="me"><i class="fab fa-orcid fa-lg" aria-hidden="true"></i></a> + {{end}} {{ with .Site.Params.social.email }} <a href="mailto:{{.}}" rel="me"><i class="fas fa-at fa-lg" aria-hidden="true"></i></a> {{ end }} {{ with .Site.Params.social.pgpkey }} <a href="{{.}}" rel="pgpkey"><i class="fa fa-key fa-lg" aria-hidden="true"></i></a> + {{ with .Site.Params.social.reddit }} + <a href="https://www.reddit.com/user/{{.}}" rel="me"><i class="fab fa-reddit-alien fa-lg" aria-hidden="true"></i></a> + {{ with .Site.Params.social.rss }} + <a href="{{.}}" rel="me"><i class="fas fa-rss fa-lg" aria-hidden="true"></i></a> {{ end }} </section> |