From 74e53cc7d2a81af0ca978818faa2a7d280cc9a41 Mon Sep 17 00:00:00 2001 From: stereobooster Date: Tue, 19 Sep 2023 06:59:55 +0200 Subject: [PATCH 1/9] Markdown portable links --- layouts/_default/_markup/render-link.html | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 5408216c..4592eb95 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1,7 +1,10 @@ - - {{- .Text | safeHTML -}} - \ No newline at end of file +{{ $link := .Destination }} +{{ $isRemote := strings.HasPrefix $link "http" }} +{{- if not $isRemote -}} +{{ $url := urls.Parse .Destination }} +{{- if $url.Path -}} +{{ $fragment := "" }} +{{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}} +{{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end }}{{ end -}} +{{- end -}} +{{ .Text | safeHTML }} From c22dbc06ee1e7adb24ff1f5385d4732f9cf743b4 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Mon, 23 Oct 2023 10:25:52 +1100 Subject: [PATCH 2/9] =?UTF-8?q?=F0=9F=93=9D=20Clean=20up=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0006213e..b11f9964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added - New portable locale picker that can be placed in any menu using the `locale` action ([#583](https://github.com/jpanther/congo/issues/583)) -- New icons for `chevron-down`, `chevron-up`, `globe` and `translate` +- New icons for `chevron-down`, `chevron-up`, `globe`, `translate`, `coffee` and `x-twitter` ([#669](https://github.com/jpanther/congo/pull/669)) - Plausible Analytics support ([#584](https://github.com/jpanther/congo/pull/584)) - Spanish translation of example site samples ([#606](https://github.com/jpanther/congo/pull/606)) - Japanese translation of docs and example site ([#618](https://github.com/jpanther/congo/pull/618)) - German translation of example site ([#631](https://github.com/jpanther/congo/pull/631)) -- New icons - `coffee` and `x-twitter` ([#669](https://github.com/jpanther/congo/pull/669)) ### Changed From 95f04231af0a1aca094ad2b399c00f87337ad12e Mon Sep 17 00:00:00 2001 From: stereobooster Date: Mon, 23 Oct 2023 01:55:35 +0200 Subject: [PATCH 3/9] add rel=noreferrer --- layouts/_default/_markup/render-link.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 4592eb95..e42c035c 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -7,4 +7,4 @@ {{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}} {{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end }}{{ end -}} {{- end -}} -{{ .Text | safeHTML }} +{{ .Text | safeHTML }} From fc4120662a0758e8a1674f4b261261bf0afa3a9b Mon Sep 17 00:00:00 2001 From: stereobooster Date: Tue, 12 Sep 2023 12:06:54 +0200 Subject: [PATCH 4/9] Small improvement in js --- assets/js/search.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/assets/js/search.js b/assets/js/search.js index e5f88047..7a17e742 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -133,21 +133,19 @@ function executeQuery(term) { let resultsHTML = ""; if (results.length > 0) { - results.forEach(function (value, key) { - resultsHTML = - resultsHTML + - `
  • - -
    -
    ${value.item.title}
    -
    ${value.item.section}${value.item.date == null ? '' : `·${value.item.date}`}
    -
    ${value.item.summary}
    -
    -
    -
    -
    -
  • `; - }); + resultsHTML = results.forEach(function (value, key) { + return `
  • + +
    +
    ${value.item.title}
    +
    ${value.item.section}${value.item.date == null ? '' : `·${value.item.date}`}
    +
    ${value.item.summary}
    +
    +
    +
    +
    +
  • `; + }).join(""); hasResults = true; } else { resultsHTML = ""; From 0e697b27caf9a410f17ae91eb851317648342e1f Mon Sep 17 00:00:00 2001 From: stereobooster Date: Mon, 23 Oct 2023 02:04:13 +0200 Subject: [PATCH 5/9] fix --- assets/js/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/search.js b/assets/js/search.js index 7a17e742..4a47ba58 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -133,7 +133,7 @@ function executeQuery(term) { let resultsHTML = ""; if (results.length > 0) { - resultsHTML = results.forEach(function (value, key) { + resultsHTML = results.map(function (value, key) { return `
  • From 1c8e681deea8f6b5c84fb5f8e7669c1b463f6ca2 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:53:16 +1100 Subject: [PATCH 6/9] =?UTF-8?q?=F0=9F=90=9B=20Fix=20theme=20colour=20error?= =?UTF-8?q?=20when=20site=20is=20in=20dark=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #676 --- CHANGELOG.md | 4 ++++ layouts/partials/head.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b11f9964..f8425b6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- JavaScript error setting theme colour when site is loaded in dark mode ([#676](https://github.com/jpanther/congo/issues/676)) + ## [2.7.0] - 2023-10-23 ### Added diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 5bfaafd5..cbae8736 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,6 +1,7 @@ + {{/* Title */}} {{ if .IsHome -}} {{ .Site.Title | emojify }} @@ -97,7 +98,6 @@ {{ end }} - {{/* Site Verification */}} {{ with .Site.Params.verification.google }} From 12fcf5f692375bfd82aa854df744c18c8f8f6476 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 24 Oct 2023 11:16:59 +1100 Subject: [PATCH 7/9] =?UTF-8?q?=F0=9F=93=9D=20Update=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8425b6d..fcc99e96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Changed + +- Minor refactor to improve memory efficiency in search results ([#650](https://github.com/jpanther/congo/pull/650)) +- Links in Markdown content are now portable ([#655](https://github.com/jpanther/congo/pull/655)) + ### Fixed - JavaScript error setting theme colour when site is loaded in dark mode ([#676](https://github.com/jpanther/congo/issues/676)) From 94bda6facab22b100f93ee4d1b094fd16fc775c4 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 24 Oct 2023 11:26:35 +1100 Subject: [PATCH 8/9] =?UTF-8?q?=F0=9F=91=B7=20Bump=20Hugo=20Nelify=20versi?= =?UTF-8?q?on=20to=200.119.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exampleSite/content/docs/hosting-deployment/index.md | 3 +-- netlify.toml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/exampleSite/content/docs/hosting-deployment/index.md b/exampleSite/content/docs/hosting-deployment/index.md index 392412c0..93995dd5 100644 --- a/exampleSite/content/docs/hosting-deployment/index.md +++ b/exampleSite/content/docs/hosting-deployment/index.md @@ -99,9 +99,8 @@ Then in the root of your site repository, create a `netlify.toml` file: publish = "public" [build.environment] - HUGO_VERSION = "0.118.2" + HUGO_VERSION = "0.119.0" NODE_ENV = "production" - GO_VERSION = "1.20" TZ = "UTC" # Set to preferred timezone [context.production.environment] diff --git a/netlify.toml b/netlify.toml index 881b6c9b..e6f407ce 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,7 +3,7 @@ publish = "exampleSite/public" [build.environment] -HUGO_VERSION = "0.118.2" +HUGO_VERSION = "0.119.0" HUGO_THEMESDIR = "../.." HUGO_THEME = "repo" TZ = "Australia/Melbourne" From d88f6c49be3ef0965e3860efdfd5863c5fc7e2a8 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 24 Oct 2023 11:31:27 +1100 Subject: [PATCH 9/9] =?UTF-8?q?=F0=9F=94=A8=20Preparing=20release=20v2.7.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 ++++- assets/css/compiled/main.css | 2 +- assets/css/main.css | 2 +- package.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcc99e96..2e9df036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [2.7.1] - 2023-10-24 + ### Changed - Minor refactor to improve memory efficiency in search results ([#650](https://github.com/jpanther/congo/pull/650)) @@ -753,7 +755,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Advanced customisation using simple Tailwind colour definitions and styles - Fully documented -[Unreleased]: https://github.com/jpanther/congo/compare/v2.7.0...HEAD +[Unreleased]: https://github.com/jpanther/congo/compare/v2.7.1...HEAD +[2.7.1]: https://github.com/jpanther/congo/compare/v2.7.0...v2.7.1 [2.7.0]: https://github.com/jpanther/congo/compare/v2.6.1...v2.7.0 [2.6.1]: https://github.com/jpanther/congo/compare/v2.6.0...v2.6.1 [2.6.0]: https://github.com/jpanther/congo/compare/v2.5.4...v2.6.0 diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index c6bdd79c..421b1d46 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1,4 +1,4 @@ -/*! Congo v2.7.0 | MIT License | https://github.com/jpanther/congo */ +/*! Congo v2.7.1 | MIT License | https://github.com/jpanther/congo */ /*! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com */ diff --git a/assets/css/main.css b/assets/css/main.css index b4bc5ad3..4103196f 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1,4 +1,4 @@ -/*! Congo v2.7.0 | MIT License | https://github.com/jpanther/congo */ +/*! Congo v2.7.1 | MIT License | https://github.com/jpanther/congo */ @tailwind base; @tailwind components; diff --git a/package.json b/package.json index a3f246c1..85ee167a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-congo-theme", - "version": "2.7.0", + "version": "2.7.1", "description": "Congo theme for Hugo", "scripts": { "preinstall": "rimraf assets/lib",