-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
Encode index_files
as full-path
#501
Comments
Thanks for the feedback. Is all this happening when working on a new post ? Or is it happening for old posts ?
is it in preview mode or in the build website ?
I believe this is due to the new default support for leaf bundle in 0.21. See the NEWS
I believe this is related to #499 you can try set |
I think the problem here is, the Hugo theme displays the full content of a post on the home page, and images in the post won't be found because their paths are relative to the post instead of the home page. I can fix this issue in blogdown, but I'll do some research to see if there is a solution in Hugo first, because my fix would introduce another issue.
Yes, that would work for new posts (but not existing posts that were created as index pages, i.e., |
Please the development version via remotes::install_github('rstudio/blogdown') Note that you need to recompile the old post once. Thanks for the report! |
… instead of using Hugo's relref, because the latter requires me to provide the input filename, which can be problematic in two ways: 1. I need to hard-code the post filename, but the filename could change: https://discourse.gohugo.io/t/29113 2. It doesn't work on a multilingual site: https://stackoverflow.com/q/65097597/559676 the shortcode blogdown/postref is basically a wrapper of .Page.Permalink, which doesn't require me to provide the post filename the slight downside is that I have to install this simple shortcode onto all sites, and I hope users won't mind
FYI I just pushed an alternative fix to this problem, which should be more robust: remotes::install_github('rstudio/blogdown') |
Hi,
I've been using blogdown on a personal lab notebook and notice after v.0.21 update that my main page, which includes the most recent post in full, the figures within
index_files
were not rendering. By checking their paths, I noticed they are relative to the post page.A quick improvement is to fix these files path using
encode_paths
which right now just skips when detectindex_files
paths.This improvement would be greatly appreciated. Thanks for everything and great job everyone!
By filing an issue to this repo, I promise that
xfun::session_info('blogdown')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/blogdown')
.The text was updated successfully, but these errors were encountered: