Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove metadata from mkdocs.yml, allow mkdocs to build again #83

Merged
merged 1 commit into from
Jan 4, 2017

Conversation

brendo
Copy link
Contributor

@brendo brendo commented Jan 4, 2017

Currently, mkdocs build results in an error, this change fixes that 馃憤

mkdocs build --clean
INFO    -  Cleaning site directory 
INFO    -  Building documentation to directory: /Users/brendanabbott/Sites/mkdocs-material/site 
ERROR   -  file not found: /Users/brendanabbott/Sites/mkdocs-material/docs/extensions/metadata.md 
ERROR   -  Error building page extensions/metadata.md 
Traceback (most recent call last):
  File "/usr/local/bin/mkdocs", line 9, in <module>
    load_entry_point('mkdocs', 'console_scripts', 'mkdocs')()
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/brendanabbott/Sites/mkdocs/mkdocs/__main__.py", line 156, in build_command
    ), dirty=not clean)
  File "/Users/brendanabbott/Sites/mkdocs/mkdocs/commands/build.py", line 379, in build
    build_pages(config, dirty=dirty)
  File "/Users/brendanabbott/Sites/mkdocs/mkdocs/commands/build.py", line 332, in build_pages
    dump_json)
  File "/Users/brendanabbott/Sites/mkdocs/mkdocs/commands/build.py", line 179, in _build_page
    input_content = io.open(input_path, 'r', encoding='utf-8').read()
IOError: [Errno 2] No such file or directory: '/Users/brendanabbott/Sites/mkdocs-material/docs/extensions/metadata.md'

@brendo
Copy link
Contributor Author

brendo commented Jan 4, 2017

Sidenote, perhaps a test should be added to travis to attempt to build mkdocs to prevent this from happening in future?

edit I noticed that the mkdocs:build gulp task is actually called, but the error is not bubbled up. This could happen by using stdio (similar to the serve script) which would give visibility, but not stop the build. Alternatively we could peek at the result of spawnSync and if the status is not 0, throw an error which would cause gulp to exit with a non zero code, and have it fail 馃憤

@squidfunk squidfunk merged commit e3fa0eb into squidfunk:rework Jan 4, 2017
@squidfunk
Copy link
Owner

Thanks! Indeed the build should have errored. I will look into it.

@squidfunk
Copy link
Owner

Build error bubbling fixed in f56b070

@brendo brendo deleted the fix-metadata branch January 5, 2017 07:43
StanzillaManticore referenced this pull request in ManticoreGamesInc/mkdocs-material Dec 11, 2019
Remove metadata from mkdocs.yml, allow mkdocs to build again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants