bastibe / org-static-blog

A static site generator using org-mode
BSD 3-Clause "New" or "Revised" License
341 stars 74 forks source link

generate-post-path should be sub-directory aware #83

Closed justinabrahms closed 3 years ago

justinabrahms commented 3 years ago

Compare:

(file-name-sans-extension (file-name-nondirectory "/path/to/my-file.txt"))
returns: my-file
(file-name-sans-extension (file-relative-name "/path/to/my-file.txt" "/path/"))
returns: to/my-file
bastibe commented 3 years ago

Thank you for your pull request.

Could you comment on when this change is important?

justinabrahms commented 3 years ago

Ah, right. Sorry for that.

If I have a blog post in posts/computer-science/foo.org it will compile out to posts/foo.html. With this change, it correctly goes to posts/computer-science/foo.html

bastibe commented 3 years ago

I see! I had never considered that posts might be nested inside subfolders of posts.

Thank you for the contribution! (Feel free to ping me in this issue or otherwise if I don't release an updated version within a few weeks)