Use relative path for `path` Liquid variable in Documents

Addresses #2897. The only change here is in the `to_liquid` method since the rest of the file heavily depends on the original `path` variable.