Merge pull request #565 from d0ugal/master

Configuration values can also be str on Python 2.
This commit is contained in:
Dougal Matthews
2015-05-27 08:41:23 +01:00
6 changed files with 41 additions and 4 deletions

View File

@@ -14,6 +14,12 @@ You can determine your currently installed version using `mkdocs --version`:
mkdocs, version 0.13.0
## Version 0.13.1 (2015-05-27)
* Bugfix: Fix a problem with minimal configurations which only contain a list
of paths in the pages config (#562)
## Version 0.13.0 (2015-05-26)
### Deprecations

View File

@@ -1 +1 @@
__version__ = '0.13.0'
__version__ = '0.13.1'

View File

@@ -361,10 +361,10 @@ class Pages(Extras):
# TODO: Remove in 1.0
config_types = set(type(l) for l in value)
if config_types.issubset(set([six.text_type, dict, ])):
if config_types.issubset(set([six.text_type, dict, str])):
return value
if config_types.issubset(set([six.text_type, list, ])):
if config_types.issubset(set([six.text_type, list, str])):
return legacy.pages_compat_shim(value)
raise ValidationError("Invalid pages config. {0} {1}".format(

View File

@@ -25,6 +25,7 @@ from mkdocs import utils
DIR = os.path.dirname(__file__)
MKDOCS_CONFIG = os.path.abspath(os.path.join(DIR, '../../mkdocs.yml'))
MKDOCS_THEMES = utils.get_theme_names()
TEST_PROJECTS = os.path.abspath(os.path.join(DIR, 'integration'))
@click.command()
@@ -40,7 +41,14 @@ def main(output=None):
command = ['mkdocs', 'build', '--site-dir', out, '--theme', theme]
subprocess.check_call(command, cwd=project_dir)
print("The theme builds are available in {0}".format(output))
for project in os.listdir(TEST_PROJECTS):
project_dir = os.path.join(TEST_PROJECTS, project)
out = os.path.join(output, project)
command = ['mkdocs', 'build', '--site-dir', out]
subprocess.check_call(command, cwd=project_dir)
print("Theme and integration builds are available in {0}".format(output))
if __name__ == '__main__':
main()

View File

@@ -0,0 +1,17 @@
# Welcome to MkDocs
For full documentation visit [mkdocs.org](http://mkdocs.org).
## Commands
* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs help` - Print this help message.
## Project layout
mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.

View File

@@ -0,0 +1,6 @@
site_name: MyTest
pages:
- 'testing.md'
site_author: "Tom Christie & Dougal Matthews"