Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image exists, but does not appear in Gitpod preview #9

Closed
zo0o0ot opened this issue Oct 15, 2020 · 3 comments
Closed

Image exists, but does not appear in Gitpod preview #9

zo0o0ot opened this issue Oct 15, 2020 · 3 comments

Comments

@zo0o0ot
Copy link
Contributor

zo0o0ot commented Oct 15, 2020

image

I think that the appropriate pathing is being used, as this format is currently working on the last published version.

However, when trying to move development to GitPod, I'm no longer seeing images used in the markdown content.

It also appears that the twitter icon is not being shown.

Existing web site:
image

Per @JianLoong in #7 , here is a possible explanation:

I was just looking at GitPod, it seems the reason this happens because of the URL generated for preview purposes.

So if you actually did a

hugo server or hugo server -D
to run it, it will not look nice because that is supposed to be for development. If you look at the generated files under public would be correct but the demo itself is not working on GitPod because it is mapped to localhost instead of the live url instead.

That being said, I tried to run the command below on GitPod instead

hugo server -b https://1313-c40017b2-ba54-4783-9c76-73b58c0603ba.ws-us02.gitpod.io -D --appendPort=false
and it seems to be working fine. (You will need to put the correct url in the command for it to be working)

What is happening here is that I specifically ask it generated with that base url without appending the port number.

I'm wondering what the possible difference might be between the preview images and the images that are used inline on individual posts, and why that would apply the to the social icons, as well.

@JianLoong
Copy link
Contributor

I think its much better not to use the original theme author img shortcode. It doesnt really seem to work because of the way the images are you stored for your directory structure. The hugo default figure shortcode seems to work better. I did a quick PR to fix it. It should be working as intended now.

@zo0o0ot
Copy link
Contributor Author

zo0o0ot commented Oct 16, 2020

I agree. I tested the figure shortcode in GitPod, and it worked right away.
image

@zo0o0ot
Copy link
Contributor Author

zo0o0ot commented Oct 16, 2020

Fixed in #11

@zo0o0ot zo0o0ot closed this as completed Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants