Skip to content

Implement installation of external theme via them_url - #221

Closed
ngzhian wants to merge 5 commits into
mkdocs:masterfrom
ngzhian:theme-url
Closed

ngzhian wants to merge 5 commits into
mkdocs:masterfrom
ngzhian:theme-url

Conversation

@ngzhian

@ngzhian ngzhian commented Nov 14, 2014

Copy link
Copy Markdown
Contributor

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

Comment thread mkdocs/config.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import location is differnet in Python 3. This will need to be added to the compat.py file

#python 3
from io import StringIO

#python 2
from StringIO import StringIO

@d0ugal

d0ugal commented Nov 14, 2014

Copy link
Copy Markdown
Contributor

Looks like a good start, I think the general design is right, but a few small changes required.

Pinging @tomchristie as I think he will want to take a look at this (but perhaps not until after an update)

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`
This test isn't that useful, and refers to a hardcoded url in one of my
branches.
Might want to consider if this test is even needed.
Ref #179
@d0ugal

d0ugal commented Apr 2, 2015

Copy link
Copy Markdown
Contributor

Happy to consider this with an updated PR.

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.

2 participants