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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The theme can't be used? #17

Closed
webkong opened this issue Dec 12, 2017 · 5 comments
Closed

The theme can't be used? #17

webkong opened this issue Dec 12, 2017 · 5 comments

Comments

@webkong
Copy link

webkong commented Dec 12, 2017

Python 2.7.13
mkdocs, version 0.17.2
mkdocs-bootstrap 0.1.1

site_description: knowledge Document
theme: bootstrap

then I use mkdocs serve , will report an error below

INFO    -  Building documentation... 
WARNING -  The theme 'bootstrap' does not appear to have a configuration file. Please upgrade to a current version of the theme. 
INFO    -  Cleaning site directory 
ERROR   -  Error building page index.md 
Traceback (most recent call last):
  File "/usr/local/bin/mkdocs", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/mkdocs/__main__.py", line 127, in serve_command
    livereload=livereload
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/serve.py", line 117, in serve
    config = builder()
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/serve.py", line 112, in builder
    build(config, live_server=live_server, dirty=dirty)
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/build.py", line 282, in build
    build_pages(config, dirty=dirty)
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/build.py", line 242, in build_pages
    _build_page(page, config, site_navigation, env)
  File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/build.py", line 150, in _build_page
    template = env.get_template('main.html')
  File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/usr/local/lib/python2.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/usr/local/lib/python2.7/site-packages/jinja2/loaders.py", line 187, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: main.html

@JOduMonT
Copy link

JOduMonT commented Jan 17, 2018

as mention on mkdocs wiki
you need to use mkdocs 16.x
https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes#broken-themes-on-17x-

from 16 to 17 they change a lot of stuff related to themes
http://www.mkdocs.org/about/release-notes/#theme-customization-1164

now I wonder if it's temporary or if these theme is just obsolete.

@caseyjhol
Copy link

The latest version that's available in the repo actually does work with 0.17.2, you just have to manually install it. If the authors would release the latest version and update the currently available Python package, installing via pip install mkdocs-bootstrap would work with the latest version of mkDocs. @d0ugal @waylan Is there a reason this package hasn't already been updated?

@waylan
Copy link
Member

waylan commented Feb 9, 2018

Sorry, but I don't have the proper permissions to upload new versions to PYPI. @d0ugal as a reminder, the mkdocs package is uploaded via a automation script run from the CI server. But the various theme packages have not been set up that way so I can't update them. If you get things set up, I'll take care of the rest.

@d0ugal
Copy link
Member

d0ugal commented Feb 9, 2018

@waylan the mkdocsdeploy pypi user has permissions already. I guess I’d need to setup travis for the password... but for now I’ve just added your user as an owner. So you can manually deploy

Sorry if I missed pings about this before.

waylan added a commit to waylan/mkdocs-bootstrap that referenced this issue Feb 13, 2018
@waylan waylan closed this as completed in fca19ee Feb 13, 2018
@waylan
Copy link
Member

waylan commented Feb 13, 2018

FYI, I just accepted all of the outstanding PRs and updated the theme to work with MkDocs 0.17. I then created and released a new version (0.2) of the theme. Enjoy!

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

No branches or pull requests

5 participants