Here is my site, and there is an image. I use it here. When I run hugo server
everything looks fine:
But after deployment I get just git man
text instead of the actual image. I donβt get where things go wrong to fix it.
Here is my site, and there is an image. I use it here. When I run hugo server
everything looks fine:
But after deployment I get just git man
text instead of the actual image. I donβt get where things go wrong to fix it.
What is the deployment URL?
Do u mean baseURL?
baseURL: http://command-line-interface-pages.org/
No, I want to look at your deployed site.
Then here it is.
You are deploying your site to a subdirectory.
Visit:
https://command-line-interface-pages.github.io/site.github.io/about/
Now open your browserβs dev tools and look at the console:
The image destination in markdown is /git.jpg
which is relative to the root of the server.
You are deploying your site to a subdirectory.
So⦠Is it the right way to do things or not? I mean what should I change then? I wanna just refer to images as I do now (and change something else).
Use page bundles.
hugo new about/index.md
content/
βββ about/
β βββ git.jpg
β βββ index.md
βββ posts/
β βββ my-first-post.md
βββ future.md
βββ goals.md
Then use a page-relative destination in markdown:
{{< image src="git.jpg" alt="git man" position="center" style="border-radius: 4px;" >}}
Youβll need to contact the theme author to fix the other stuff thatβs broken.
And change the baseURL in your site configuration to:
https://command-line-interface-pages.github.io/site.github.io/
I am not surprised that I break things at the first hours of usage, itβs a usual situation.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.