Skip to content

Commit

Permalink
Merge branch 'master' into pgpkey
Browse files Browse the repository at this point in the history
  • Loading branch information
htr3n committed Nov 3, 2020
2 parents e703e0e + a4ecbb1 commit e74a3fc
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 8 deletions.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions exampleSite/config.toml
Expand Up @@ -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
Expand All @@ -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>"
Expand Down
2 changes: 1 addition & 1 deletion 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>
1 change: 0 additions & 1 deletion 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 }}
Expand Down
8 changes: 4 additions & 4 deletions 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 . ", ")}}]});
Expand All @@ -16,3 +15,4 @@
</script>
{{ $.Scratch.Delete "hl_languages" }}
{{ end }}
{{- end -}}
10 changes: 9 additions & 1 deletion layouts/partials/sidebar.html
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/sidebar/copyright.html
@@ -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}}
Expand Down
13 changes: 13 additions & 0 deletions layouts/partials/sidebar/social.html
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}

This comment has been minimized.

Copy link
@tom10d

tom10d Nov 3, 2020

@htr3n These changes here are not so good. After this commit, neither pgpkey or reddit's "{{ with ... }}" block close properly, i.e. two "{{ end }}" are missing. The effect of this bug is:

Error: add site dependencies: load resources: loading templates: "/home/thomas/projects/tom10/themes/hyde-hyde/layouts/partials/sidebar/social.html:65:1": parse failed: template: partials/sidebar/social.html:65: unexpected EOF

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

0 comments on commit e74a3fc

Please sign in to comment.