We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Multi-page documentaion does not work on Windows
Multi-page documentation did not work on Windows, possibly because of Windows usage of backward slash instead of forward slash for paths.

![capture](https://cloud.githubusercontent.com/assets/627637/5159293/1d38f74e-732e-11e4-807f-28fd80831b07.PNG)

Should be similar to:

![capture2](https://cloud.githubusercontent.com/assets/627637/5159302/85909c70-732e-11e4-9e6a-e285d13704ee.PNG)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mkdocs/nav.py`
Content:
```
1 # coding: utf-8
2 
3 """
4 Deals with generating the site-wide navigation.
5 
6 This consists of building a set of interlinked page and header objects.
7 """
8 
9 from mkdocs import utils
10 import posixpath
11 import os
12 
13 
14 def filename_to_title(filename):
15     """
16     Automatically generate a default title, given a filename.
17     """
18     if utils.is_homepage(filename):
19         return 'Home'
20 
21     title = os.path.splitext(filename)[0]
22     title = title.replace('-', ' ').replace('_', ' ')
23     # Captialize if the filename was all lowercase, otherwise leave it as-is.
24     if title.lower() == title:
25         title = title.capitalize()
26     return title
27 
28 
29 class SiteNavigation(object):
30     def __init__(self, pages_config, use_directory_urls=True):
31         self.url_context = URLContext()
32         self.file_context = FileContext()
33         self.nav_items, self.pages = \
34             _generate_site_navigation(pages_config, self.url_context, use_directory_urls)
35         self.homepage = self.pages[0] if self.pages else None
36         self.use_directory_urls = use_directory_urls
37 
38     def __str__(self):
39         return str(self.homepage) + ''.join([str(item) for item in self])
40 
41     def __iter__(self):
42         return iter(self.nav_items)
43 
44     def walk_pages(self):
45         """
46         Returns each page in the site in turn.
47 
48         Additionally this sets the active status of the pages and headers,
49         in the site navigation, so that the rendered navbar can correctly
50         highlight the currently active page and/or header item.
51         """
52         page = self.homepage
53         page.set_active()
54         self.url_context.set_current_url(page.abs_url)
55         self.file_context.set_current_path(page.input_path)
56         yield page
57         while page.next_page:
58             page.set_active(False)
59             page = page.next_page
60             page.set_active()
61             self.url_context.set_current_url(page.abs_url)
62             self.file_context.set_current_path(page.input_path)
63             yield page
64         page.set_active(False)
65 
66     @property
67     def source_files(self):
68         if not hasattr(self, '_source_files'):
69             self._source_files = set([page.input_path for page in self.pages])
70         return self._source_files
71 
72 
73 class URLContext(object):
74     """
75     The URLContext is used to ensure that we can generate the appropriate
76     relative URLs to other pages from any given page in the site.
77 
78     We use relative URLs so that static sites can be deployed to any location
79     without having to specify what the path component on the host will be
80     if the documentation is not hosted at the root path.
81     """
82 
83     def __init__(self):
84         self.base_path = '/'
85 
86     def set_current_url(self, current_url):
87         self.base_path = posixpath.dirname(current_url)
88 
89     def make_relative(self, url):
90         """
91         Given a URL path return it as a relative URL,
92         given the context of the current page.
93         """
94         suffix = '/' if (url.endswith('/') and len(url) > 1) else ''
95         # Workaround for bug on `posixpath.relpath()` in Python 2.6
96         if self.base_path == '/':
97             if url == '/':
98                 # Workaround for static assets
99                 return '.'
100             return url.lstrip('/')
101         relative_path = posixpath.relpath(url, start=self.base_path) + suffix
102 
103         # Under Python 2.6, relative_path adds an extra '/' at the end.
104         return relative_path.rstrip('/')
105 
106 
107 class FileContext(object):
108     """
109     The FileContext is used to ensure that we can generate the appropriate
110     full path for other pages given their relative path from a particular page.
111 
112     This is used when we have relative hyperlinks in the documentation, so that
113     we can ensure that they point to markdown documents that actually exist
114     in the `pages` config.
115     """
116     def __init__(self):
117         self.current_file = None
118         self.base_path = ''
119 
120     def set_current_path(self, current_path):
121         self.current_file = current_path
122         self.base_path = os.path.dirname(current_path)
123 
124     def make_absolute(self, path):
125         """
126         Given a relative file path return it as a POSIX-style
127         absolute filepath, given the context of the current page.
128         """
129         return posixpath.normpath(posixpath.join(self.base_path, path))
130 
131 
132 class Page(object):
133     def __init__(self, title, url, path, url_context):
134         self.title = title
135         self.abs_url = url
136         self.active = False
137         self.url_context = url_context
138 
139         # Relative paths to the input markdown file and output html file.
140         self.input_path = path
141         self.output_path = utils.get_html_path(path)
142 
143         # Links to related pages
144         self.previous_page = None
145         self.next_page = None
146         self.ancestors = []
147 
148     @property
149     def url(self):
150         return self.url_context.make_relative(self.abs_url)
151 
152     @property
153     def is_homepage(self):
154         return utils.is_homepage(self.input_path)
155 
156     def __str__(self):
157         return self._indent_print()
158 
159     def _indent_print(self, depth=0):
160         indent = '    ' * depth
161         active_marker = ' [*]' if self.active else ''
162         title = self.title if (self.title is not None) else '[blank]'
163         return '%s%s - %s%s\n' % (indent, title, self.abs_url, active_marker)
164 
165     def set_active(self, active=True):
166         self.active = active
167         for ancestor in self.ancestors:
168             ancestor.active = active
169 
170 
171 class Header(object):
172     def __init__(self, title, children):
173         self.title, self.children = title, children
174         self.active = False
175 
176     def __str__(self):
177         return self._indent_print()
178 
179     def _indent_print(self, depth=0):
180         indent = '    ' * depth
181         active_marker = ' [*]' if self.active else ''
182         ret = '%s%s%s\n' % (indent, self.title, active_marker)
183         for item in self.children:
184             ret += item._indent_print(depth + 1)
185         return ret
186 
187 
188 def _generate_site_navigation(pages_config, url_context, use_directory_urls=True):
189     """
190     Returns a list of Page and Header instances that represent the
191     top level site navigation.
192     """
193     nav_items = []
194     pages = []
195     previous = None
196 
197     for config_line in pages_config:
198         if isinstance(config_line, str):
199             path = config_line
200             title, child_title = None, None
201         elif len(config_line) in (1, 2, 3):
202             # Pad any items that don't exist with 'None'
203             padded_config = (list(config_line) + [None, None])[:3]
204             path, title, child_title = padded_config
205         else:
206             msg = (
207                 "Line in 'page' config contained %d items.  "
208                 "Expected 1, 2 or 3 strings." % len(config_line)
209             )
210             assert False, msg
211 
212         if title is None:
213             filename = path.split('/')[0]
214             title = filename_to_title(filename)
215         if child_title is None and '/' in path:
216             filename = path.split('/')[1]
217             child_title = filename_to_title(filename)
218 
219         url = utils.get_url_path(path, use_directory_urls)
220 
221         if not child_title:
222             # New top level page.
223             page = Page(title=title, url=url, path=path, url_context=url_context)
224             if not utils.is_homepage(path):
225                 nav_items.append(page)
226         elif not nav_items or (nav_items[-1].title != title):
227             # New second level page.
228             page = Page(title=child_title, url=url, path=path, url_context=url_context)
229             header = Header(title=title, children=[page])
230             nav_items.append(header)
231             page.ancestors = [header]
232         else:
233             # Additional second level page.
234             page = Page(title=child_title, url=url, path=path, url_context=url_context)
235             header = nav_items[-1]
236             header.children.append(page)
237             page.ancestors = [header]
238 
239         # Add in previous and next information.
240         if previous:
241             page.previous_page = previous
242             previous.next_page = page
243         previous = page
244 
245         pages.append(page)
246 
247     return (nav_items, pages)
248
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mkdocs/nav.py b/mkdocs/nav.py
--- a/mkdocs/nav.py
+++ b/mkdocs/nav.py
@@ -210,10 +210,11 @@
             assert False, msg
 
         if title is None:
-            filename = path.split('/')[0]
+            filename = path.split(os.path.sep)[0]
             title = filename_to_title(filename)
-        if child_title is None and '/' in path:
-            filename = path.split('/')[1]
+
+        if child_title is None and os.path.sep in path:
+            filename = path.split(os.path.sep)[-1]
             child_title = filename_to_title(filename)
 
         url = utils.get_url_path(path, use_directory_urls)

{"golden_diff": "diff --git a/mkdocs/nav.py b/mkdocs/nav.py\n--- a/mkdocs/nav.py\n+++ b/mkdocs/nav.py\n@@ -210,10 +210,11 @@\n             assert False, msg\n \n         if title is None:\n-            filename = path.split('/')[0]\n+            filename = path.split(os.path.sep)[0]\n             title = filename_to_title(filename)\n-        if child_title is None and '/' in path:\n-            filename = path.split('/')[1]\n+\n+        if child_title is None and os.path.sep in path:\n+            filename = path.split(os.path.sep)[-1]\n             child_title = filename_to_title(filename)\n \n         url = utils.get_url_path(path, use_directory_urls)\n", "issue": "Multi-page documentaion does not work on Windows\nMulti-page documentation did not work on Windows, possibly because of Windows usage of backward slash instead of forward slash for paths.\n\n![capture](https://cloud.githubusercontent.com/assets/627637/5159293/1d38f74e-732e-11e4-807f-28fd80831b07.PNG)\n\nShould be similar to:\n\n![capture2](https://cloud.githubusercontent.com/assets/627637/5159302/85909c70-732e-11e4-9e6a-e285d13704ee.PNG)\n\n", "before_files": [{"content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the site-wide navigation.\n\nThis consists of building a set of interlinked page and header objects.\n\"\"\"\n\nfrom mkdocs import utils\nimport posixpath\nimport os\n\n\ndef filename_to_title(filename):\n    \"\"\"\n    Automatically generate a default title, given a filename.\n    \"\"\"\n    if utils.is_homepage(filename):\n        return 'Home'\n\n    title = os.path.splitext(filename)[0]\n    title = title.replace('-', ' ').replace('_', ' ')\n    # Captialize if the filename was all lowercase, otherwise leave it as-is.\n    if title.lower() == title:\n        title = title.capitalize()\n    return title\n\n\nclass SiteNavigation(object):\n    def __init__(self, pages_config, use_directory_urls=True):\n        self.url_context = URLContext()\n        self.file_context = FileContext()\n        self.nav_items, self.pages = \\\n            _generate_site_navigation(pages_config, self.url_context, use_directory_urls)\n        self.homepage = self.pages[0] if self.pages else None\n        self.use_directory_urls = use_directory_urls\n\n    def __str__(self):\n        return str(self.homepage) + ''.join([str(item) for item in self])\n\n    def __iter__(self):\n        return iter(self.nav_items)\n\n    def walk_pages(self):\n        \"\"\"\n        Returns each page in the site in turn.\n\n        Additionally this sets the active status of the pages and headers,\n        in the site navigation, so that the rendered navbar can correctly\n        highlight the currently active page and/or header item.\n        \"\"\"\n        page = self.homepage\n        page.set_active()\n        self.url_context.set_current_url(page.abs_url)\n        self.file_context.set_current_path(page.input_path)\n        yield page\n        while page.next_page:\n            page.set_active(False)\n            page = page.next_page\n            page.set_active()\n            self.url_context.set_current_url(page.abs_url)\n            self.file_context.set_current_path(page.input_path)\n            yield page\n        page.set_active(False)\n\n    @property\n    def source_files(self):\n        if not hasattr(self, '_source_files'):\n            self._source_files = set([page.input_path for page in self.pages])\n        return self._source_files\n\n\nclass URLContext(object):\n    \"\"\"\n    The URLContext is used to ensure that we can generate the appropriate\n    relative URLs to other pages from any given page in the site.\n\n    We use relative URLs so that static sites can be deployed to any location\n    without having to specify what the path component on the host will be\n    if the documentation is not hosted at the root path.\n    \"\"\"\n\n    def __init__(self):\n        self.base_path = '/'\n\n    def set_current_url(self, current_url):\n        self.base_path = posixpath.dirname(current_url)\n\n    def make_relative(self, url):\n        \"\"\"\n        Given a URL path return it as a relative URL,\n        given the context of the current page.\n        \"\"\"\n        suffix = '/' if (url.endswith('/') and len(url) > 1) else ''\n        # Workaround for bug on `posixpath.relpath()` in Python 2.6\n        if self.base_path == '/':\n            if url == '/':\n                # Workaround for static assets\n                return '.'\n            return url.lstrip('/')\n        relative_path = posixpath.relpath(url, start=self.base_path) + suffix\n\n        # Under Python 2.6, relative_path adds an extra '/' at the end.\n        return relative_path.rstrip('/')\n\n\nclass FileContext(object):\n    \"\"\"\n    The FileContext is used to ensure that we can generate the appropriate\n    full path for other pages given their relative path from a particular page.\n\n    This is used when we have relative hyperlinks in the documentation, so that\n    we can ensure that they point to markdown documents that actually exist\n    in the `pages` config.\n    \"\"\"\n    def __init__(self):\n        self.current_file = None\n        self.base_path = ''\n\n    def set_current_path(self, current_path):\n        self.current_file = current_path\n        self.base_path = os.path.dirname(current_path)\n\n    def make_absolute(self, path):\n        \"\"\"\n        Given a relative file path return it as a POSIX-style\n        absolute filepath, given the context of the current page.\n        \"\"\"\n        return posixpath.normpath(posixpath.join(self.base_path, path))\n\n\nclass Page(object):\n    def __init__(self, title, url, path, url_context):\n        self.title = title\n        self.abs_url = url\n        self.active = False\n        self.url_context = url_context\n\n        # Relative paths to the input markdown file and output html file.\n        self.input_path = path\n        self.output_path = utils.get_html_path(path)\n\n        # Links to related pages\n        self.previous_page = None\n        self.next_page = None\n        self.ancestors = []\n\n    @property\n    def url(self):\n        return self.url_context.make_relative(self.abs_url)\n\n    @property\n    def is_homepage(self):\n        return utils.is_homepage(self.input_path)\n\n    def __str__(self):\n        return self._indent_print()\n\n    def _indent_print(self, depth=0):\n        indent = '    ' * depth\n        active_marker = ' [*]' if self.active else ''\n        title = self.title if (self.title is not None) else '[blank]'\n        return '%s%s - %s%s\\n' % (indent, title, self.abs_url, active_marker)\n\n    def set_active(self, active=True):\n        self.active = active\n        for ancestor in self.ancestors:\n            ancestor.active = active\n\n\nclass Header(object):\n    def __init__(self, title, children):\n        self.title, self.children = title, children\n        self.active = False\n\n    def __str__(self):\n        return self._indent_print()\n\n    def _indent_print(self, depth=0):\n        indent = '    ' * depth\n        active_marker = ' [*]' if self.active else ''\n        ret = '%s%s%s\\n' % (indent, self.title, active_marker)\n        for item in self.children:\n            ret += item._indent_print(depth + 1)\n        return ret\n\n\ndef _generate_site_navigation(pages_config, url_context, use_directory_urls=True):\n    \"\"\"\n    Returns a list of Page and Header instances that represent the\n    top level site navigation.\n    \"\"\"\n    nav_items = []\n    pages = []\n    previous = None\n\n    for config_line in pages_config:\n        if isinstance(config_line, str):\n            path = config_line\n            title, child_title = None, None\n        elif len(config_line) in (1, 2, 3):\n            # Pad any items that don't exist with 'None'\n            padded_config = (list(config_line) + [None, None])[:3]\n            path, title, child_title = padded_config\n        else:\n            msg = (\n                \"Line in 'page' config contained %d items.  \"\n                \"Expected 1, 2 or 3 strings.\" % len(config_line)\n            )\n            assert False, msg\n\n        if title is None:\n            filename = path.split('/')[0]\n            title = filename_to_title(filename)\n        if child_title is None and '/' in path:\n            filename = path.split('/')[1]\n            child_title = filename_to_title(filename)\n\n        url = utils.get_url_path(path, use_directory_urls)\n\n        if not child_title:\n            # New top level page.\n            page = Page(title=title, url=url, path=path, url_context=url_context)\n            if not utils.is_homepage(path):\n                nav_items.append(page)\n        elif not nav_items or (nav_items[-1].title != title):\n            # New second level page.\n            page = Page(title=child_title, url=url, path=path, url_context=url_context)\n            header = Header(title=title, children=[page])\n            nav_items.append(header)\n            page.ancestors = [header]\n        else:\n            # Additional second level page.\n            page = Page(title=child_title, url=url, path=path, url_context=url_context)\n            header = nav_items[-1]\n            header.children.append(page)\n            page.ancestors = [header]\n\n        # Add in previous and next information.\n        if previous:\n            page.previous_page = previous\n            previous.next_page = page\n        previous = page\n\n        pages.append(page)\n\n    return (nav_items, pages)\n", "path": "mkdocs/nav.py"}], "after_files": [{"content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the site-wide navigation.\n\nThis consists of building a set of interlinked page and header objects.\n\"\"\"\n\nfrom mkdocs import utils\nimport posixpath\nimport os\n\n\ndef filename_to_title(filename):\n    \"\"\"\n    Automatically generate a default title, given a filename.\n    \"\"\"\n    if utils.is_homepage(filename):\n        return 'Home'\n\n    title = os.path.splitext(filename)[0]\n    title = title.replace('-', ' ').replace('_', ' ')\n    # Captialize if the filename was all lowercase, otherwise leave it as-is.\n    if title.lower() == title:\n        title = title.capitalize()\n    return title\n\n\nclass SiteNavigation(object):\n    def __init__(self, pages_config, use_directory_urls=True):\n        self.url_context = URLContext()\n        self.file_context = FileContext()\n        self.nav_items, self.pages = \\\n            _generate_site_navigation(pages_config, self.url_context, use_directory_urls)\n        self.homepage = self.pages[0] if self.pages else None\n        self.use_directory_urls = use_directory_urls\n\n    def __str__(self):\n        return str(self.homepage) + ''.join([str(item) for item in self])\n\n    def __iter__(self):\n        return iter(self.nav_items)\n\n    def walk_pages(self):\n        \"\"\"\n        Returns each page in the site in turn.\n\n        Additionally this sets the active status of the pages and headers,\n        in the site navigation, so that the rendered navbar can correctly\n        highlight the currently active page and/or header item.\n        \"\"\"\n        page = self.homepage\n        page.set_active()\n        self.url_context.set_current_url(page.abs_url)\n        self.file_context.set_current_path(page.input_path)\n        yield page\n        while page.next_page:\n            page.set_active(False)\n            page = page.next_page\n            page.set_active()\n            self.url_context.set_current_url(page.abs_url)\n            self.file_context.set_current_path(page.input_path)\n            yield page\n        page.set_active(False)\n\n    @property\n    def source_files(self):\n        if not hasattr(self, '_source_files'):\n            self._source_files = set([page.input_path for page in self.pages])\n        return self._source_files\n\n\nclass URLContext(object):\n    \"\"\"\n    The URLContext is used to ensure that we can generate the appropriate\n    relative URLs to other pages from any given page in the site.\n\n    We use relative URLs so that static sites can be deployed to any location\n    without having to specify what the path component on the host will be\n    if the documentation is not hosted at the root path.\n    \"\"\"\n\n    def __init__(self):\n        self.base_path = '/'\n\n    def set_current_url(self, current_url):\n        self.base_path = posixpath.dirname(current_url)\n\n    def make_relative(self, url):\n        \"\"\"\n        Given a URL path return it as a relative URL,\n        given the context of the current page.\n        \"\"\"\n        suffix = '/' if (url.endswith('/') and len(url) > 1) else ''\n        # Workaround for bug on `posixpath.relpath()` in Python 2.6\n        if self.base_path == '/':\n            if url == '/':\n                # Workaround for static assets\n                return '.'\n            return url.lstrip('/')\n        relative_path = posixpath.relpath(url, start=self.base_path) + suffix\n\n        # Under Python 2.6, relative_path adds an extra '/' at the end.\n        return relative_path.rstrip('/')\n\n\nclass FileContext(object):\n    \"\"\"\n    The FileContext is used to ensure that we can generate the appropriate\n    full path for other pages given their relative path from a particular page.\n\n    This is used when we have relative hyperlinks in the documentation, so that\n    we can ensure that they point to markdown documents that actually exist\n    in the `pages` config.\n    \"\"\"\n    def __init__(self):\n        self.current_file = None\n        self.base_path = ''\n\n    def set_current_path(self, current_path):\n        self.current_file = current_path\n        self.base_path = os.path.dirname(current_path)\n\n    def make_absolute(self, path):\n        \"\"\"\n        Given a relative file path return it as a POSIX-style\n        absolute filepath, given the context of the current page.\n        \"\"\"\n        return posixpath.normpath(posixpath.join(self.base_path, path))\n\n\nclass Page(object):\n    def __init__(self, title, url, path, url_context):\n        self.title = title\n        self.abs_url = url\n        self.active = False\n        self.url_context = url_context\n\n        # Relative paths to the input markdown file and output html file.\n        self.input_path = path\n        self.output_path = utils.get_html_path(path)\n\n        # Links to related pages\n        self.previous_page = None\n        self.next_page = None\n        self.ancestors = []\n\n    @property\n    def url(self):\n        return self.url_context.make_relative(self.abs_url)\n\n    @property\n    def is_homepage(self):\n        return utils.is_homepage(self.input_path)\n\n    def __str__(self):\n        return self._indent_print()\n\n    def _indent_print(self, depth=0):\n        indent = '    ' * depth\n        active_marker = ' [*]' if self.active else ''\n        title = self.title if (self.title is not None) else '[blank]'\n        return '%s%s - %s%s\\n' % (indent, title, self.abs_url, active_marker)\n\n    def set_active(self, active=True):\n        self.active = active\n        for ancestor in self.ancestors:\n            ancestor.active = active\n\n\nclass Header(object):\n    def __init__(self, title, children):\n        self.title, self.children = title, children\n        self.active = False\n\n    def __str__(self):\n        return self._indent_print()\n\n    def _indent_print(self, depth=0):\n        indent = '    ' * depth\n        active_marker = ' [*]' if self.active else ''\n        ret = '%s%s%s\\n' % (indent, self.title, active_marker)\n        for item in self.children:\n            ret += item._indent_print(depth + 1)\n        return ret\n\n\ndef _generate_site_navigation(pages_config, url_context, use_directory_urls=True):\n    \"\"\"\n    Returns a list of Page and Header instances that represent the\n    top level site navigation.\n    \"\"\"\n    nav_items = []\n    pages = []\n    previous = None\n\n    for config_line in pages_config:\n        if isinstance(config_line, str):\n            path = config_line\n            title, child_title = None, None\n        elif len(config_line) in (1, 2, 3):\n            # Pad any items that don't exist with 'None'\n            padded_config = (list(config_line) + [None, None])[:3]\n            path, title, child_title = padded_config\n        else:\n            msg = (\n                \"Line in 'page' config contained %d items.  \"\n                \"Expected 1, 2 or 3 strings.\" % len(config_line)\n            )\n            assert False, msg\n\n        if title is None:\n            filename = path.split(os.path.sep)[0]\n            title = filename_to_title(filename)\n\n        if child_title is None and os.path.sep in path:\n            filename = path.split(os.path.sep)[-1]\n            child_title = filename_to_title(filename)\n\n        url = utils.get_url_path(path, use_directory_urls)\n\n        if not child_title:\n            # New top level page.\n            page = Page(title=title, url=url, path=path, url_context=url_context)\n            if not utils.is_homepage(path):\n                nav_items.append(page)\n        elif not nav_items or (nav_items[-1].title != title):\n            # New second level page.\n            page = Page(title=child_title, url=url, path=path, url_context=url_context)\n            header = Header(title=title, children=[page])\n            nav_items.append(header)\n            page.ancestors = [header]\n        else:\n            # Additional second level page.\n            page = Page(title=child_title, url=url, path=path, url_context=url_context)\n            header = nav_items[-1]\n            header.children.append(page)\n            page.ancestors = [header]\n\n        # Add in previous and next information.\n        if previous:\n            page.previous_page = previous\n            previous.next_page = page\n        previous = page\n\n        pages.append(page)\n\n    return (nav_items, pages)\n", "path": "mkdocs/nav.py"}]}