-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include directory not found when running gh-deploy #213
Comments
Welcome to this project and thank you!' first issue |
Thanks! I am new with
The relevant code is here: # -------------------
# Create the jinja2 environment:
# -------------------
DOCS_DIR = config.get('docs_dir')
debug("Docs directory:", DOCS_DIR)
# define the include directory:
# NOTE: using DOCS_DIR as default is not ideal,
# because those files get rendered as well, which is incorrect
# since they are partials; but we do not want to break existing installs
include_dir = self.config['include_dir'] or DOCS_DIR
if not os.path.isdir(include_dir):
raise FileNotFoundError("MACROS ERROR: Include directory '%s' "
"does not exist!" %
include_dir)
if self.config['include_dir']:
trace("Includes directory:", include_dir)
else:
debug("Includes directory:", include_dir) What you mean by "build directory" is, I suppose the MkDocs project directory, where the original MkDocs config file is? I suppose you defined the |
@wragge Is the issue this relevant for you? |
I'm deploying my site to GH pages organisation using
mkdocs gh-deploy
. As documented, you build the organisation site in a separate directory. However, when I setinclude_dir
in themacros
config, the build fails, complaining that the include directory could not be found. This seems to be because the macros plugin is looking for the include directory in the build directory rather than the site directory.A workaround is to create a copy of the
mkdocs.yml
file specifically for deployment that uses a relative path to the include directory eg:../site/includes
.The text was updated successfully, but these errors were encountered: