diff --git a/CHANGELOG.md b/CHANGELOG.md index 0006213e..2e9df036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,17 +6,27 @@ 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)) +- 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)) + ## [2.7.0] - 2023-10-23 ### 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 @@ -745,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/assets/js/search.js b/assets/js/search.js index e5f88047..4a47ba58 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.map(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 = ""; 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/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 5408216c..e42c035c 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 }} 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 }} 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" 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",