Closed petergil closed 3 years ago
Thank you for following up on this!
Testing this pull request on my own machine, I found out that it broke my blog: It inserted "../" into all post links, such as "https://mydomain.org/../2021-03-05-a-new-post.html".
Hmmm that's strange.. what are your path configs? It should prefer paths relative to your org-static-blog-posts-directory
and fall back to org-static-blog-drafts-directory
if that did not work.
Also, obligatory, 'works on my machine'.
One point may be that those two paths as well as my render path are on the same level, so I have
~/blog/posts
~/blog/drafts
~/blog/public_html
I don't think that should have any affect but maybe? I should have some time to play around with this tomorrow so can hopefully diagnose something.
My config on the machine in question is
(setq org-static-blog-publish-directory "C:/Users/basti/projects/blog/")
(setq org-static-blog-posts-directory "C:/Users/basti/projects/blog/posts/")
(setq org-static-blog-drafts-directory "C:/Users/basti/projects/blog/drafts/")
Which looks innocuous enough... could this be a Windows issue, somehow?
BTW, I reverted this particular change in the latest release due to the error I was seeing. But I'll gladly re-include it once we figure this out.
BTW, I reverted this particular change in the latest release due to the error I was seeing. But I'll gladly re-include it once we figure this out.
No worries, I totally understand.
Sorry for the delay, I had some unexpected things happen. Hopefully I'll be able to look into this later this week.
No rush, do it whenever you feel like. We do this for fun, so no pressure.
Ensure that the relative path of a post is calculated based on which out of the post or draft directory it is located in.
This fixes #86.