Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mkdocs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import os

from jinja2.exceptions import TemplateNotFound
from six.moves.urllib.parse import urljoin
import jinja2
import json
import six

from mkdocs import nav, search, utils
from mkdocs.relative_path_ext import RelativePathExtension
Expand Down Expand Up @@ -115,7 +115,8 @@ def get_page_context(page, content, toc, meta, config):
base = config['site_url']
if not base.endswith('/'):
base += '/'
canonical_url = urljoin(base, page.abs_url.lstrip('/'))
canonical_url = six.moves.urllib.parse.urljoin(
base, page.abs_url.lstrip('/'))
else:
canonical_url = None

Expand Down Expand Up @@ -149,7 +150,7 @@ def build_sitemap(config, env, site_navigation):

def build_template(template_name, env, config, site_navigation=None):

log.debug("Building {0} page".format(template_name))
log.debug("Building %s page", template_name)

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.

Was this intentional? You are using string.format throughout the config_options.py file. Not sure why it can't be used here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, technically speaking this is the correct way to use the logging API. It should be passed in unformatted and interpolation left to the logging function.


try:
template = env.get_template(template_name)
Expand Down Expand Up @@ -262,7 +263,7 @@ def build_pages(config, dump_json=False):
build_result = _build_page(page, config, site_navigation, env, dump_json)
if build_result is None:
continue
html_content, table_of_contents, meta = build_result
html_content, table_of_contents, _ = build_result
search_index.add_entry_from_context(
page, html_content, table_of_contents)
except Exception:
Expand Down
240 changes: 0 additions & 240 deletions mkdocs/config.py

This file was deleted.

3 changes: 3 additions & 0 deletions mkdocs/config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from mkdocs.config.base import load_config

__all__ = ["load_config", ]
Loading