diff --git a/docs/conf.py b/docs/conf.py index 2f34f51..9646fc0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,8 +28,16 @@ html_theme = 'bizstyle' html_static_path = ['_static'] - import os import sys -sys.path.insert(0, os.path.abspath('../markdown2canvas/')) -sys.path.insert(0, os.path.abspath('./markdown2canvas/')) \ No newline at end of file + +_HERE = os.path.dirname(__file__) +_ROOT_DIR = os.path.abspath(os.path.join(_HERE, '..')) +_PACKAGE_DIR = os.path.abspath(os.path.join(_HERE, '../markdown2canvas')) + +sys.path.insert(0, _ROOT_DIR) +sys.path.insert(0, _PACKAGE_DIR) + +# test the path; not strictly needed +import markdown2canvas +