Skip to content
This repository was archived by the owner on Jul 15, 2022. It is now read-only.

Commit b22a81a

Browse files
committed
Non-default local port is now correctly added to Hugo baseURL
1 parent 5bbfee4 commit b22a81a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
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).
66

7+
## [15.4.2] - 2020-11-04
8+
9+
### Fixed
10+
11+
- When running Hugo sites locally from a non-default port, the port is now correctly added to the `baseURL`.
12+
713
## [15.4.1] - 2020-11-04
814

915
### Fixed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ class Site {
542542
const sourcePath = path.join(this.pathToServe, file)
543543
const destinationPath = `../.generated${mountPath}`
544544

545-
const localBaseURL = `https://localhost${mountPath}`
545+
const localBaseURL = `https://localhost${this.port === 443 ? '' : `:${this.port}`}${mountPath}`
546546
const globalBaseURL = `https://${Site.hostname}${mountPath}`
547547
let baseURL = this.global ? globalBaseURL : localBaseURL
548548

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@small-tech/site.js",
3-
"version": "15.4.1",
3+
"version": "15.4.2",
44
"description": "Small Web construction set.",
55
"keywords": [
66
"web server",

0 commit comments

Comments
 (0)