cmacmackin / markdown-include

Provides syntax for Python-Markdown which allows for the inclusion of the contents of other Markdown documents.
GNU General Public License v3.0
104 stars 41 forks source link

Include file reference does not work with relative path #6

Closed r0ckarong closed 8 years ago

r0ckarong commented 8 years ago

So I just tried deploying some docs using includes via Jenkins and for whatever reason it won't find the files. I'm using the extension with Mkdocs and it gives me the following type of messages:

Warning: could not find file changelog/5.3.1-hotfix2.md. Ignoring include statement. Error: [Errno 2] No such file or directory: u'changelog/5.3.1-hotfix2.md'
Warning: could not find file changelog/5.3.1-hotfix1.md. Ignoring include statement. Error: [Errno 2] No such file or directory: u'changelog/5.3.1-hotfix1.md'

The full filename is /data/workspace///docs/changelog/5.3.1-hotfix2.md

I have set "base_path" to "/docs/" and it works locally on Mac OS X 10.11.4 and on my CentOS testing machine. But on the jenkins machine running CentOS 7 as well it can't find the files.

When I change the filename references to absolute paths to the files it works but this is not desirable for my implementation. Any ideas? Markdown and the extension should be called by mkdocs just like it does locally.

r0ckarong commented 8 years ago

I now changed the base_path back to the default . and rewrote all links for "docs/" and now it seems to work. Didn't understand that your code checked for .isabs