问题
Based on this question, it's clear that Twitter requires absolute paths for card images. With that in mind, I've set baseurl = "https://strimas.com/"
in my config.toml file for the Hugo Academic theme. When I build the entire site with build_site()
, everything works as desired, the twitter:image metatag contains the full path to the image, and the card renders properly. However, when I use serve_site()
to only re-build changed posts, it breaks everything, the image URLs go back to relative, and the Twitter cards don't work anymore. Is there a way to call serve_site()
and have it retain the absolute paths?
It's not clear to me how to make a reprex for a blogdown example, but here's my site that's having the problem: https://github.com/mstrimas/website
System info:
blogdown v0.18.1
Hugo v0.67.1
Hugo Academic theme v4.9
来源:https://stackoverflow.com/questions/60807293/blogdown-serve-site-removes-absolute-image-paths-for-twitter-cards