Merge branch 'master' into pgpkey

This commit is contained in:
Huy Tran 2020-11-03 11:25:29 +11:00 committed by GitHub
commit e74a3fc003
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 44 additions and 8 deletions

View file

@ -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

View file

@ -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>"

View file

@ -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>

View file

@ -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 }}

View file

@ -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 -}}

View file

@ -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 }}

View file

@ -1,6 +1,6 @@
{{ with .Site.Params.copyright }}
<div class="copyright">
&copy; {{ now.Format "2006"}} {{ . | safeHTML }}
&copy; {{ 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}}

View file

@ -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 }}
&nbsp;<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>