Verified Commit b22a81aa authored by Aral Balkan's avatar Aral Balkan
Browse files

Non-default local port is now correctly added to Hugo `baseURL`

parent 5bbfee4c
......@@ -4,6 +4,12 @@ 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).
## [15.4.2] - 2020-11-04
### Fixed
- When running Hugo sites locally from a non-default port, the port is now correctly added to the `baseURL`.
## [15.4.1] - 2020-11-04
### Fixed
......
......@@ -542,7 +542,7 @@ class Site {
const sourcePath = path.join(this.pathToServe, file)
const destinationPath = `../.generated${mountPath}`
const localBaseURL = `https://localhost${mountPath}`
const localBaseURL = `https://localhost${this.port === 443 ? '' : `:${this.port}`}${mountPath}`
const globalBaseURL = `https://${Site.hostname}${mountPath}`
let baseURL = this.global ? globalBaseURL : localBaseURL
......
{
"name": "@small-tech/site.js",
"version": "15.4.1",
"version": "15.4.2",
"description": "Small Web construction set.",
"keywords": [
"web server",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment