When building the website from a ghost base, all images are copied, hashed, and referenced using the Ghost URL.
However, the src is still using the Ghost URL.
The result is that images are unavailable when deploying because the src attribute points to a localhost url.
A basic config such as a domain name seems missing from eleventy (https://www.11ty.dev/docs/config/),
so I have no idea how to configure the domain name.
How to configure this theme so that images can be displayed on a real website?
Current outcome:
<img src="http://localhost:2368/lvnjnaregnrae.jpeg"/>
expected outcome:
<img src="/lvnjnaregnrae.jpeg"/>
There seems to be some work done for URLs in the config:
// Strip Ghost domain from urls
const stripDomain = url => {
return url.replace(process.env.GHOST_API_URL, "");
};
However that doesn't apply to images.
Some config info:
Version 1 of this package (eleventy starter ghost) with node 16.17.1
"dependencies": {
"@11ty/eleventy": "^0.11.0",
"@11ty/eleventy-plugin-rss": "^1.1.1",
"@tryghost/content-api": "^1.4.4",
"@tryghost/helpers": "^1.1.6",
"clean-css": "^4.2.1",
"cross-env": "^7.0.0",
"dotenv": "^8.0.0",
"eleventy-plugin-lazyimages": "liamfiddler/eleventy-plugin-lazyimages",
"eleventy-plugin-local-images": "^0.4.0",
"eslint-utils": "3.0.0",
"html-minifier": "^4.0.0",
"yarn": "^1.22.19"
},
"devDependencies": {
"eslint": "7.32.0",
"eslint-plugin-ghost": "2.11.0"
}
When building the website from a ghost base, all images are copied, hashed, and referenced using the Ghost URL.
However, the src is still using the Ghost URL.
The result is that images are unavailable when deploying because the src attribute points to a localhost url.
A basic config such as a domain name seems missing from eleventy (https://www.11ty.dev/docs/config/),
so I have no idea how to configure the domain name.
How to configure this theme so that images can be displayed on a real website?
Current outcome:
<img src="http://localhost:2368/lvnjnaregnrae.jpeg"/>expected outcome:
<img src="/lvnjnaregnrae.jpeg"/>There seems to be some work done for URLs in the config:
However that doesn't apply to images.
Some config info:
Version 1 of this package (eleventy starter ghost) with node 16.17.1