diff --git a/CHANGELOG.md b/CHANGELOG.md index 49451ac0..24aa2222 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.47.8] +### Changed +- Removed ternary operator and URL object instantiation from `absoluteUrl` generation in Nunjucks engine, simplifying it to use `currentPath` directly + ## [0.47.7] - 2024-02-13 ### Added diff --git a/lib/engines/nunjucks.js b/lib/engines/nunjucks.js index 5e27502b..0a9427ce 100644 --- a/lib/engines/nunjucks.js +++ b/lib/engines/nunjucks.js @@ -163,13 +163,8 @@ export class NunjucksEngine extends BaseEngine { ...parts, }); - // build the complete URL, using this.domain if it's set - const currentUrl = this.domain - ? new URL(currentPath, this.domain) - : currentPath; - // prepare the absolute URL to be passed to context - const absoluteUrl = currentUrl.toString(); + const absoluteUrl = currentPath; // prep the page tracking object // TODO: get rid of the snakecase variables in 1.0 diff --git a/package.json b/package.json index 6d4bc0ec..fd0d5ee0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@datagraphics/baker", "type": "module", - "version": "0.47.7", + "version": "0.47.8", "exports": "./lib/index.js", "files": [ "bin",