From 0b275717d39cba521ad63482bae97252fd0ede14 Mon Sep 17 00:00:00 2001 From: Joe Hutchinson Date: Mon, 13 Jul 2020 23:00:17 -0400 Subject: [PATCH] Use assets folder for bgimg and homeimg --- README.md | 12 ++++++------ {static => assets}/img/grey-cloud.jpg | Bin layouts/partials/head.html | 7 +++---- layouts/partials/home-card.html | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) rename {static => assets}/img/grey-cloud.jpg (100%) diff --git a/README.md b/README.md index 1d1182b..db19dd7 100644 --- a/README.md +++ b/README.md @@ -34,18 +34,18 @@ googleAnalytics = "Your google analytics tracking ID - optional" disqusShortname = "Your shortname for Disqus - optional" [params] -brand = "The name that is displayed in the top left of the website, consider it the website name" -description = "The website's description" -homeimg = "URL to the image used for the home button at the bottom of each post - optional" -bgimg = "URL to the image used for the page background - optional" -rssinmenu = whether you would like a RSS feed link to appear in the navigation menu (true, false) - optional + brand = "The name that is displayed in the top left of the website, consider it the website name" + description = "The website's description" + homeimg = "Path, within the 'assets' folder, of the image used for the home button at the bottom of each post - optional" + bgimg = "Path, within the 'assets' folder, of the image used for the page background - optional" + rssinmenu = whether you would like a RSS feed link to appear in the navigation menu (true, false) - optional ``` The `title` parameter is used for each page title, the title that search engines display in search results. If you would like the title shown in the top left of the page to be different from the page title, use the `brand` parameter. For instance, the title parameter for my site is `Joe Hutchinson` but the brand parameter is set to `joehutch`. Find your `language code` [here](https://www.metamodpro.com/browser-language-codes). -The `homeimg` and `bgimg` parameters give you the ability to customize the look of your site further. The homeimg parameter is the image used for the home button at the bottom of every page. Since the text used on the home button is white, a darker background image is preferred. If the homeimg parameter is not specified, a fallback image is used. Similarly, the bgimg parameter is used for the background of each webpage. Aether is designed to look best with a subtle tiling image for the background. If no background image is specified, the background will be a solid gray color. +The `homeimg` and `bgimg` parameters give you the ability to customize the look of your site further. Both the homeimg and the bgimg should reside in the assets folder of your site. The homeimg parameter is the image used for the home button at the bottom of every page. Since the text used on the home button is white, a darker background image is preferred. If the homeimg parameter is not specified, a fallback image is used. Similarly, the bgimg parameter is used for the background of each webpage. Aether is designed to look best with a subtle tiling image for the background. If no background image is specified, the background will be a solid gray color. That is the only configuration required at the site level! You can now begin writing content for your site. diff --git a/static/img/grey-cloud.jpg b/assets/img/grey-cloud.jpg similarity index 100% rename from static/img/grey-cloud.jpg rename to assets/img/grey-cloud.jpg diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 426b21d..4dae5fd 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -28,19 +28,18 @@ {{ $mainStyle := resources.Get "css/style.css" }} - {{ $xcodeStyle := resources.Get "css/xcode.css" }} {{ $fontStyle := resources.Get "css/latolatinfonts.css" }} {{ $overrideStyle := resources.Get "css/override.css" }} - {{ $style := slice $xcodeStyle $fontStyle $mainStyle $overrideStyle | resources.Concat "css/concated.css" | minify }} + {{ $style := slice $fontStyle $mainStyle $overrideStyle | resources.Concat "css/concated.css" | minify }} {{ range .AlternativeOutputFormats -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} {{ template "_internal/google_analytics.html" . }} - {{ if isset $.Site.Params "bgimg" -}} + {{ with resources.Get $.Site.Params.bgimg -}} {{- end }} diff --git a/layouts/partials/home-card.html b/layouts/partials/home-card.html index 5490e70..7435a58 100644 --- a/layouts/partials/home-card.html +++ b/layouts/partials/home-card.html @@ -1,4 +1,4 @@ + href="{{ .Site.BaseURL }}" class="card home-card" style="background-image: url({{if isset .Site.Params "homeimg"}} {{ (resources.Get .Site.Params.homeimg).Permalink | safeCSS }} {{ else }} {{ (resources.Get "img/grey-cloud.jpg").Permalink | safeCSS }} {{ end }})" rel="bookmark" > Home \ No newline at end of file