From 6bb45cb7ad643da21e97f00fea95833457c38242 Mon Sep 17 00:00:00 2001 From: Dougal Matthews Date: Wed, 27 May 2015 08:07:42 +0100 Subject: [PATCH 1/3] Configuration values can also be str on Python 2. Closes #562 --- mkdocs/config/config_options.py | 4 ++-- mkdocs/tests/integration.py | 10 +++++++++- .../tests/integration/minimal/docs/testing.md | 17 +++++++++++++++++ mkdocs/tests/integration/minimal/mkdocs.yml | 6 ++++++ 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 mkdocs/tests/integration/minimal/docs/testing.md create mode 100644 mkdocs/tests/integration/minimal/mkdocs.yml diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py index 7d732792..7a01e16f 100644 --- a/mkdocs/config/config_options.py +++ b/mkdocs/config/config_options.py @@ -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( diff --git a/mkdocs/tests/integration.py b/mkdocs/tests/integration.py index 53ab0d23..d064da38 100644 --- a/mkdocs/tests/integration.py +++ b/mkdocs/tests/integration.py @@ -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() diff --git a/mkdocs/tests/integration/minimal/docs/testing.md b/mkdocs/tests/integration/minimal/docs/testing.md new file mode 100644 index 00000000..da37213a --- /dev/null +++ b/mkdocs/tests/integration/minimal/docs/testing.md @@ -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. diff --git a/mkdocs/tests/integration/minimal/mkdocs.yml b/mkdocs/tests/integration/minimal/mkdocs.yml new file mode 100644 index 00000000..7e678648 --- /dev/null +++ b/mkdocs/tests/integration/minimal/mkdocs.yml @@ -0,0 +1,6 @@ +site_name: MyTest + +pages: +- 'testing.md' + +site_author: "Tom Christie & Dougal Matthews" From 3b0d1dd2f97323d2e80e44761fa322925e851cd8 Mon Sep 17 00:00:00 2001 From: Dougal Matthews Date: Wed, 27 May 2015 08:17:03 +0100 Subject: [PATCH 2/3] Bump to 0.13.1 --- mkdocs/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs/__init__.py b/mkdocs/__init__.py index 2d7893e3..deea98b4 100644 --- a/mkdocs/__init__.py +++ b/mkdocs/__init__.py @@ -1 +1 @@ -__version__ = '0.13.0' +__version__ = '0.13.1' From 162d8a73dcba169a20c5ba58c1b36a24700a9eac Mon Sep 17 00:00:00 2001 From: Dougal Matthews Date: Wed, 27 May 2015 08:18:46 +0100 Subject: [PATCH 3/3] Add release notes for 0.13.1 --- docs/about/release-notes.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 22f02d9e..bff1e343 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -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