mkdocs / mkdocs-bootstrap

MkDocs Bootstrap Theme
http://mkdocs.github.io/mkdocs-bootstrap/
BSD 2-Clause "Simplified" License
84 stars 38 forks source link

The theme can't be used? #17

Closed webkong closed 6 years ago

webkong commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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!