Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'twatzl/add-on-fix' into remove-cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentTam committed Aug 26, 2019
2 parents b055367 + 7973044 commit e94a830
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 70 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ _false_ will turn a feature **off**. It is structured as follows:
└── .Social // Controls Links to Social Media
```

### Custom JavaScript and CSS

You can adapt this theme according to your preferences using your own JS or CSS code.
To do this your can add your custom scripts to the `cssFiles` and `jsFiles`
parameters in *config.toml*.

### Hugo's Built-In Server

To see a live version of your site locally, use the following command:
Expand Down
4 changes: 1 addition & 3 deletions archetypes/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ author = ""
categories = [""]
date = ""
description = ""
featured = ""
featuredalt = ""
featuredpath = ""
images = [""]
linktitle = ""
title = ""
type = "post"
Expand Down
4 changes: 1 addition & 3 deletions archetypes/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ author = ""
categories = []
description = ""
linktitle = ""
featured = ""
featuredpath = ""
featuredalt = ""
images = [""]

+++
15 changes: 0 additions & 15 deletions archetypes/itemized.md

This file was deleted.

75 changes: 50 additions & 25 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,32 +110,37 @@ disableLanguages = [""]
# Identifier prepends a Font Awesome icon to the menu item
[[menu.main]]
name = "Home"
identifier = "home"
url = "/"
identifier = "fas fa-home"
pre = "<i class='fa fa-home'></i>"
weight = 1

[[menu.main]]
name = "About"
identifier = "about"
url = "/about/"
identifier = "far fa-id-card"
pre = "<i class='far fa-id-card'></i>"
weight = 2

[[menu.main]]
name = "Blog"
identifier = "blog"
url = "/blog/"
identifier = "far fa-newspaper"
pre = "<i class='far fa-newspaper'></i>"
weight = 3

[[menu.main]]
name = "Categories"
identifier = "categories"
url = "/categories/"
identifier = "fas fa-sitemap"
pre = "<i class='fas fa-sitemap'></i>"
weight = 5

[[menu.main]]
name = "Contact"
identifier = "contact"
url = "/contact/"
identifier = "far fa-envelope"
pre = "<i class='far fa-envelope'></i>"
weight = 6

[Languages]
Expand All @@ -154,32 +159,37 @@ disableLanguages = [""]

[[Languages.de.menu.main]]
name = "Startseite"
identifier = "home"
url = "/"
identifier = "fas fa-home"
pre = "<i class='fas fa-home'></i>"
weight = 1

[[Languages.de.menu.main]]
name = "Über mich"
identifier = "about"
url = "/about/"
identifier = "far fa-id-card"
pre = "<i class='far fa-id-card'></i>"
weight = 2

[[Languages.de.menu.main]]
name = "Blog"
identifier = "blog"
url = "/blog/"
identifier = "far fa-newspaper"
pre = "<i class='far fa-newspaper'></i>"
weight = 3

[[Languages.de.menu.main]]
name = "Kategorien"
identifier = "categories"
url = "/categories/"
identifier = "fas fa-sitemap"
pre = "<i class='fas fa-sitemap'></i>"
weight = 5

[[Languages.de.menu.main]]
name = "Kontakt"
identifier = "contact"
url = "/contact/"
identifier = "far fa-envelope"
pre = "<i class='far fa-envelope'></i>"
weight = 6

[Languages.fr]
Expand All @@ -191,32 +201,37 @@ disableLanguages = [""]

[[Languages.fr.menu.main]]
name = "Accueil"
identifier = "home"
url = "/"
identifier = "fas fa-home"
pre = "<i class='fas fa-home'></i>"
weight = 1

[[Languages.fr.menu.main]]
name = "About"
identifier = "about"
url = "/about/"
identifier = "far fa-id-card"
pre = "<i class='far fa-id-card'></i>"
weight = 2

[[Languages.fr.menu.main]]
name = "Blog"
identifier = "blog"
url = "/blog/"
identifier = "far fa-newspaper"
pre = "<i class='far fa-newspaper'></i>"
weight = 3

[[Languages.fr.menu.main]]
name = "Catégories"
identifier = "categories"
url = "/categories/"
identifier = "fas fa-sitemap"
pre = "<i class='fas fa-sitemap'></i>"
weight = 5

[[Languages.fr.menu.main]]
name = "Contact"
identifier = "contact"
url = "/contact/"
identifier = "far fa-envelope"
pre = "<i class='far fa-envelope'></i>"
weight = 6

[Languages.pl]
Expand All @@ -228,32 +243,37 @@ disableLanguages = [""]

[[Languages.pl.menu.main]]
name = "Home"
identifier = "home"
url = "/"
identifier = "fas fa-home"
pre = "<i class='fas fa-home'></i>"
weight = 1

[[Languages.pl.menu.main]]
name = "O mnie"
identifier = "about"
url = "/about/"
identifier = "far fa-id-card"
pre = "<i class='far fa-id-card'></i>"
weight = 2

[[Languages.pl.menu.main]]
name = "Blog"
identifier = "blog"
url = "/blog/"
identifier = "far fa-newspaper"
pre = "<i class='far fa-newspaper'></i>"
weight = 3

[[Languages.pl.menu.main]]
name = "Kategorie"
identifier = "categories"
url = "/categories/"
identifier = "fas fa-sitemap"
pre = "<i class='fas fa-sitemap'></i>"
weight = 5

[[Languages.pl.menu.main]]
name = "Kontakt"
identifier = "contact"
url = "/contact/"
identifier = "far fa-envelope"
pre = "<i class='far fa-envelope'></i>"
weight = 6

[Languages.pt]
Expand All @@ -265,32 +285,37 @@ disableLanguages = [""]

[[Languages.pt.menu.main]]
name = "Início"
identifier = "home"
url = "/"
identifier = "fas fa-home"
pre = "<i class='fas fa-home'></i>"
weight = 1

[[Languages.pt.menu.main]]
name = "Sobre"
identifier = "about"
url = "/about/"
identifier = "far fa-id-card"
pre = "<i class='far fa-id-card'></i>"
weight = 2

[[Languages.pt.menu.main]]
name = "Blog"
identifier = "blog"
url = "/blog/"
identifier = "far fa-newspaper"
pre = "<i class='far fa-newspaper'></i>"
weight = 3

[[Languages.pt.menu.main]]
name = "Categorias"
identifier = "categories"
url = "/categories/"
identifier = "fas fa-sitemap"
pre = "<i class='fas fa-sitemap'></i>"
weight = 5

[[Languages.pt.menu.main]]
name = "Contato"
identifier = "contact"
url = "/contact/"
identifier = "far fa-envelope"
pre = "<i class='far fa-envelope'></i>"
weight = 6

# Sets Social Media icons to appear and link to your account. Value should be your
Expand Down
6 changes: 0 additions & 6 deletions exampleSite/static/css/add-on.css

This file was deleted.

6 changes: 0 additions & 6 deletions exampleSite/static/js/add-on.js

This file was deleted.

2 changes: 0 additions & 2 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
{{ $mainCSSOptions := (dict "targetPath" "css/main.min.css" "outputStyle" "compressed") }}
{{ $main := resources.Get "scss/main.scss" | resources.ToCSS $mainCSSOptions | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $main.RelPermalink }}" integrity="{{ $main.Data.Integrity }}">
<link rel="stylesheet" href="{{ "css/add-on.css" | relURL }}">
{{ else }}
<link rel="stylesheet" href="{{ . | relURL }}">
{{ end }}
Expand All @@ -35,7 +34,6 @@
{{ end }}
{{ $css := $cssSlice | resources.Concat "css/bundle.css" | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
<link rel="stylesheet" href="{{ "css/add-on.css" | relURL }}">
{{ else }}
<link rel="stylesheet" href="{{ . | relURL }}">
{{ end }}
Expand Down
1 change: 0 additions & 1 deletion layouts/partials/meta.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<meta charset="utf-8">
<title>{{ .Title }}{{ if ne .Title .Site.Title }} - {{ .Site.Title }}{{ end }}</title>
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.meta.description }}{{ . }}{{ end }}{{ end }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- TODO: Do we want to add rel=author? -->
{{ if .Site.Params.meta.favicon }}
Expand Down
4 changes: 1 addition & 3 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
{{ end }}
{{ $js := $jsSlice | resources.Concat "js/localbundle.js" | resources.Minify | resources.Fingerprint }}
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}">
<script src="{{ "js/add-on.js" | relURL }}"></script>
{{ else }}
<script src="{{ . | relURL }}"></script>
{{ end }}
Expand All @@ -39,8 +38,7 @@
}
{{ end }}
{{ $js := $jsSlice | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint }}
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
<script src="{{ "js/add-on.js" | relURL }}"></script>
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
{{ else }}
<script src="{{ . | relURL }}"></script>
{{ end }}
Expand Down
12 changes: 11 additions & 1 deletion layouts/partials/site-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ <h1 class="nav-title">
</h1>
<menu id="site-nav-menu" class="flyout-menu">
{{ range .Site.Menus.main }}
<a href="{{ .URL | relLangURL }}" class="link"><i class="{{ .Identifier }}">&nbsp;</i>{{ .Name }}</a>
{{ if and (gt (len (findRE "fa[rsb]( fa-([a-z-]+))+" .Identifier)) 0) (not .Pre) }}
{{/* Old syntax: use '.Identifier' for icon rendering */}}
<a href="{{ .URL | relLangURL }}" class="link"><i class="{{ .Identifier }}">&nbsp;</i>{{ .Name }}</a>
{{ else }}
{{/* New syntax: use '.Pre' for icon rendering */}}
{{ if .Pre }}
<a href="{{ .URL | relLangURL }}" class="link">{{ .Pre }} {{ .Name }}</a>
{{ else }}
<a href="{{ .URL | relLangURL }}" class="link">{{ .Name }}</a>
{{ end }}
{{ end }}
{{ end }}
{{ if .Site.Params.header.shareMenu }}<a href="#share-menu" class="share-toggle"><i class="fas fa-share-alt">&nbsp;</i>Share</a>{{ end }}
{{ if .Site.Params.header.searchMenu }}{{ partial "search-menu" . }}{{ end }}
Expand Down
1 change: 0 additions & 1 deletion layouts/partials/site-intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
</ul>
</footer>
{{ end }}
<p>{{ .Site.Languages }}</p>
</section>
14 changes: 10 additions & 4 deletions layouts/post/featured.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{{ if .Params.featured }}
<a href="{{ .RelPermalink }}" class="image featured">
<img src="{{ (path.Join "img" (cond (eq .Params.featuredpath "date") (.Page.Date.Format "2006/01") (.Params.featuredpath)) .Params.featured) | relURL }}" alt="{{ .Params.featuredalt }}">
</a>
{{ if .Params.images }}
<a href="{{ .RelPermalink }}" class="image featured">
{{ range first 1 .Params.images }}
<img src="{{ . | relURL }}" alt="">
{{ end }}
</a>
{{ else if .Params.featured }}
<a href="{{ .RelPermalink }}" class="image featured">
<img src="{{ (path.Join "img" (cond (eq .Params.featuredpath "date") (.Page.Date.Format "2006/01") (.Params.featuredpath)) .Params.featured) | relURL }}" alt="{{ .Params.featuredalt }}">
</a>
{{ end }}

0 comments on commit e94a830

Please sign in to comment.