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

Hyas SEO v2 twitter:image path problem #16

Closed
h-enk opened this issue Dec 23, 2023 · 12 comments
Closed

Hyas SEO v2 twitter:image path problem #16

h-enk opened this issue Dec 23, 2023 · 12 comments
Assignees
Milestone

Comments

@h-enk
Copy link
Member

h-enk commented Dec 23, 2023

Discussed in https://github.com/orgs/gethyas/discussions/446

Originally posted by pensivedog December 22, 2023
After upgrading the hyas seo module from v1 to v2, the twitter image path is incorrect. Instead of using, for instance:

localhost:1313/articles/article-title/article-image.jpg for the twitter image, it now uses

localhost:1313/article-image.jpg, placing the file name directly after the site root, without the rest of the file path.

Any idea how to fix this?

@h-enk h-enk transferred this issue from thuliteio/thulite Dec 23, 2023
@h-enk h-enk self-assigned this Dec 23, 2023
@h-enk h-enk added this to the v2.2.0 milestone Dec 23, 2023
@razonyang
Copy link

What does the content structure looks like? I guess that the article-image.jpg isn't a image resource of the article-title.

@h-enk
Copy link
Member Author

h-enk commented Jan 3, 2024

No, I tested/confirmed this. I suspect it's got something to do with the context and the dot

@razonyang
Copy link

Could you provide tree output of content structure of this sample? Since I can't reproduce it, it should work same as other themes when using same internal template.

@h-enk
Copy link
Member Author

h-enk commented Jan 3, 2024

Frontmatter referenced image:

images: ["vincent-van-zalinge-9NapHjhwxEg-unsplash.jpg"]

Page bundle:

│
└───doks-1-2
        cover-doks-1-2.png
        index.md
        vincent-van-zalinge-9NapHjhwxEg-unsplash.jpg

Output:

<meta property="og:image" content="http://localhost:1313/vincent-van-zalinge-9NapHjhwxEg-unsplash.jpg" />

Should be:

<meta property="og:image" content="http://localhost:1313/blog/doks-1-2/vincent-van-zalinge-9NapHjhwxEg-unsplash.jpg" >

@razonyang
Copy link

razonyang commented Jan 3, 2024

I still couldn't reproduce it with this repo on both of Linux (WSL2 Ubuntu) and Windows.

Hugo version: v0.121.1

image

I think there should be something else cause this issue, perhaps running on wrong Hugo version (this changes was introduced since v0.121.0), older version of this repo, or others.

@h-enk
Copy link
Member Author

h-enk commented Jan 3, 2024

[..] this changes was introduced since v0.121.0 [..]

Ah, I missed that — thanks!

I can confirm it does work all right with:

  "otherDependencies": {
    "hugo": "0.121.1"
  },

@pensivedog
Copy link

So we should manually add this to our package.json -- is that the right way to fix this?

@h-enk
Copy link
Member Author

h-enk commented Jan 8, 2024

That won't work right now. But, it will work with the upcoming Doks (and Hyas) release that will surface the most important dependencies, so you can update Hugo, Images, and SEO for example — yourself.

@h-enk
Copy link
Member Author

h-enk commented Jan 8, 2024

Available soon

@pensivedog
Copy link

Looking forward to this!

@h-enk
Copy link
Member Author

h-enk commented Mar 13, 2024

Tested/verified — solved/works with:

  "otherDependencies": {
    "hugo": "0.123.7"
  },

@h-enk h-enk unpinned this issue Mar 13, 2024
@h-enk
Copy link
Member Author

h-enk commented Mar 15, 2024

Closing

@h-enk h-enk closed this as completed Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants