diff --git a/CHANGELOG.md b/CHANGELOG.md index f1b6bae5..8049881f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added +- Site logo support - Chinese translation ([#2](https://github.com/jpanther/congo/pull/2)) ## [1.2.1] - 2021-08-26 diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 2a4889f2..d848dadf 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -2701,6 +2701,10 @@ body a, body button { flex-direction: row; } + .sm\:items-center { + align-items: center; + } + .sm\:px-14 { padding-left: 3.5rem; padding-right: 3.5rem; diff --git a/config/_default/params.toml b/config/_default/params.toml index e660ba28..e5ad4f4d 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -6,6 +6,7 @@ # https://jpanther.github.io/congo/docs/configuration/#theme-parameters colorScheme = "congo" +# logo = "img/logo.jpg" # description = "My awesome website" # mainSections = ["section1", "section2"] # robots = "" diff --git a/exampleSite/content/docs/configuration.md b/exampleSite/content/docs/configuration.md index 38c16468..f52c1df6 100644 --- a/exampleSite/content/docs/configuration.md +++ b/exampleSite/content/docs/configuration.md @@ -55,6 +55,7 @@ Many of the article defaults here can be overridden on a per article basis by sp |Name|Type|Default|Description| | --- | --- | --- | --- | |`colorScheme`|string|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean` and `fire`.| +|`logo`|string|_Not set_|The relative path to the site logo file within the Hugo assets folder. The logo file should be provided at 2x resolution and supports any image dimensions.| |`description`|string|_Not set_|The description of the website for metadata purposes.| |`mainSections`|array of strings|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.| |`robots`|string|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 9b480e7f..3616b597 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,11 +1,25 @@ -
+
- {{ .Site.Title }} + {{ if .Site.Params.Logo -}} + {{ $logo := resources.Get .Site.Params.Logo }} + {{ if $logo }} + {{ .Site.Title }} + {{ end }} + {{ else }} + {{ .Site.Title }} + {{- end }}