Repository navigation
Conversation
First shot at enabling installation of theme via a url, specified by the
config param `theme_url`.
`theme_url` should point to a zip file online. The zip file will be
downloaded and unzipped to the `themes` folder.
Note that as of current implementation, `theme_url` installs the theme,
but does not use it, i.e. the `theme` parameter needs to be specified in
order for the newly installed theme to be used.
A point of consideration:
- Should we check if the theme already exists? This is to prevent
downloading every single time we run `config.py`
|
Nice! By the way, don't worry about the appveyor fail - the tests are currently failing on Windows. See #396 where I'm trying to fix that. The travis tests will need fixed tho' and then I can do a review :) |
|
@d0ugal weird, the 2 test that failed seem to be some 404 error. That's a good chance to discuss with the way the test is written currently is suitable at all. |
|
@ngzhian The problem is that you put testing data (yeti.zip) into the themes directory. We should only have themes directories in there. I'd move testing data into the tests directory. |
|
To add further details - the integration test builds all themes, to find all the themes it looks in the theme directory. Until you added a zip file it only contained directories and no files - we could add a check to make sure it is a directory but I'd rather not have test data in there anyway. |
|
@d0ugal sweet, moved the zip file to |
- Don't install themes into the site-packages, we don't want to edit that. It should be considered read-only for us. Instead, download the theme to a .mkdocs directory in the same location as the mkdocs.yml - When installing a theme, use it like a custom theme would be used by adding it to the theme_dir. - Rather than include a zip file in the tests, create one on the fly that can be used - this makes it more flxible and clearer what is happening. - Compare the extracted theme with the original zipped theme - Use a pre-build theme zip for integration tests only
|
I played around with the code a bit and had a few suggestions. I sent you a pull request here: https://github.com/ngzhian/mkdocs/pull/1 - do you think they all make sense? |
Improvements to the theme_url setting
|
I've rebased this to fix the conflict in #424 |
This is an updated PR from #221.