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

Theme support #24

Closed
zzart opened this issue Feb 4, 2014 · 15 comments
Closed

Theme support #24

zzart opened this issue Feb 4, 2014 · 15 comments
Labels

Comments

@zzart
Copy link

zzart commented Feb 4, 2014

Hi @tomchristie , by the way thanks for lib!
Im having a wierd issue with serving anything but a default theme:

If I change config to

mkdocs.yml
site_name: 'Test doc'
theme: 'readthedocs'
#theme_dir: '/usr/lib64/python2.7/site-packages/mkdocs/themes' / tried but not working
pages:
- ['index.md', 'Home']


$mkdocs build
#OK , docs been build and correct theme is there 
$mkdocs serve
Traceback (most recent call last):
  File "/usr/bin/mkdocs", line 4, in <module>
    from mkdocs.build import build
ImportError: No module named mkdocs.build

This works with default theme.
Doesn't help if i make the change in mkdocs/config.py theme setting file or if i set it in mkdocs.yml . Anything but default theme throws ImportError.

@tomchristie
Copy link
Member

Running locally, or installed from PyPI?

@zzart
Copy link
Author

zzart commented Feb 4, 2014

pip install ,no virtual env , running on x86_64 gentoo , python2.7.5

@zzart
Copy link
Author

zzart commented Feb 4, 2014

Sorry for bothering you this problem is on my end. Seems the machine i was working on was missing dir in sys.path config.

@zzart zzart closed this as completed Feb 4, 2014
@jsborjesson
Copy link
Contributor

How did you solve it? It seems like I have this problem too

@zzart
Copy link
Author

zzart commented Feb 12, 2014

Depending on your platform add path where you've installed mkdocs into your pythonpath.
On linux you do
export PYTHONPATH=$PYTHONPATH:~/some/path/where/mkdocs/folder/is

@jsborjesson
Copy link
Contributor

Maybe this isn't what's causing my problem, I tried doing that but it says

raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: base.html

@tomchristie
Copy link
Member

@alcesleo - How have you installed mkdocs, and what's your mkdocs.yml config look like?

@jsborjesson
Copy link
Contributor

I've tried installing it both on Python 2 and 3, and inside and outside of a virtualenv, always with pip. It is a Rails app in the root and the docs-folder is at the same level as all the other stuff, the mkdocs.yml is at that level too and looks like this:

site_name: Mysite
pages:
- [index.md, Home]
theme: readthedocs

It works fine when removing the theme-line, but even copying over the theme-folder to the project and setting it in theme_dir produces the same TemplateNotFound-error.

Edit: didn't read the question properly

@tomchristie
Copy link
Member

@alcesleo I'm not sure what that's about. I've just pushed the current project to PyPI as version 0.4

Can you reinstall with pip install -U mkdocs and try again. Also if you could include the full console output if it still fails. Thanks!

@tomchristie tomchristie reopened this Feb 12, 2014
@jsborjesson
Copy link
Contributor

It works! Thank you so much!

@tomchristie
Copy link
Member

Most welcome.

@tomchristie
Copy link
Member

Btw the 'readthedocs' theme is still somewhat under development - but at least it's a taster.
I also need to go and check if the bootswatch themes are still up to date or need work.

@jsborjesson
Copy link
Contributor

I understand that it's in an early development stage - but I absolutely love the idea and I hope it grows. The least I can do is to use it. :-)

@tomchristie
Copy link
Member

Great stuff. I'm planning on putting plenty of work into it so no worries on that front.
If you do deploy any docs with it please do let me know - I'd love to see when other folks start writing stuff with it.

@jsborjesson
Copy link
Contributor

Fantastic! I'm going to use it here, not sure if the project will be any good but I'm sure the docs will be amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants