Open simonstumpf opened 2 months ago
In config/_default/hugo.toml
with
baseurl = "http://localhost/"
running
pnpm dev --baseURL="http://localhost/subdir/"
works for me OK
I agree that works. But if I execute npm run build
(baseurl="https://myservice.test.ch/abc/" in production/config.toml), the generated public folder holds these incorrect URLs:
<img src=https://myservice.test.ch/abc/abc/docs/artifactory/artifactory-overview_hu1dbfdd588fb0cc2f17a368000f94ac4d_78905_1897x751_resize_q85_h2_lanczos_3.webp width=1897 height=751 decoding=async fetchpriority=auto loading=lazy alt="Manage Permission" id=h-rh-i-2></p>
Yes, you'll also need publishDir
. In config/production/hugo.toml
, set:
# Overrides for production environment
baseurl = "http://172.21.64.1:8080/subdir/"
publishDir= "/public/subdir/"
Description
When building with a baseUrl (https://myservice.test.ch/abc/ in my case), the image paths don't seem quiet right. The links are then:
<img src=https://myservice.test.ch/abc/abc/docs/artifactory/art...
. As you can see /abc is duplicated in the path (if this duplication is removed, it works fine).Steps to reproduce
define a baseurl with a subpath and use some local pictures.
![myPicutre](artifactory-user-passwordgen.png)
Expected result
the baseurl should be correct applied and not twice.
Actual result
the baseurl got applied twice https://myservice.test.ch/abc/abc/
Environment
Paste the information here as shown by
npm run info