spanezz / staticsite

Static site generator
GNU General Public License v3.0
47 stars 7 forks source link

Link traversal toward the root does not appear to work #66

Open hartmans opened 1 year ago

hartmans commented 1 year ago

Using 2.4-1 from Debian, I find the following in the markdown feature documentation:

Relative links are resolved relative to the location of the current page first,
and failing that relative to its parent directory, and so on until the root of

So, if I have a page blog/2020/Hermes.md that links to blogpost98-Yule-Return-of-the-Sun, I would expect it to eventually find that blog/2020/Yule-Return-of-the-Sun.md declares the alias aliases: blogpost98-Yule-Return-of-the-Sun and find that aliased page in the root of the site. (I'm converting one of my blogs from tikiwiki to staticsite) I was expecting a bug in the alias logic, so I tried to debug, starting at site.py:resolve_path.

For my specific use case I think I can through in a regexp replace as I go from tikiwiki to markdown and solve my specific problem, but I'd like to understand how this ought to work.