mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Revert to manually defining the Pages so we can order them
This commit is contained in:
16
mkdocs.yml
16
mkdocs.yml
@@ -4,10 +4,22 @@ site_description: Project documentation with Markdown.
|
||||
|
||||
repo_url: https://github.com/mkdocs/mkdocs/
|
||||
|
||||
pages:
|
||||
- Home: index.md
|
||||
- User Guide:
|
||||
- Writing Your Docs: user-guide/writing-your-docs.md
|
||||
- Styling Your Docs: user-guide/styling-your-docs.md
|
||||
- Configuration: user-guide/configuration.md
|
||||
- Deploying your docs: user-guide/deploying-your-docs.md
|
||||
- About:
|
||||
- Release Notes: about/release-notes.md
|
||||
- Contributing: about/contributing.md
|
||||
- License: about/license.md
|
||||
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
permalink: ""
|
||||
permalink:
|
||||
- admonition:
|
||||
|
||||
copyright: Copyright © 2014, <a href="https://twitter.com/_tomchristie">Tom Christie</a>. Maintenance and development by <a href="http://www.dougalmatthews.com/">Dougal Matthews</a>
|
||||
copyright: Copyright © 2014 <a href="https://twitter.com/_tomchristie">Tom Christie</a>, <a href="http://www.dougalmatthews.com/">Dougal Matthews</a>.
|
||||
google_analytics: ['UA-27795084-5', 'mkdocs.org']
|
||||
|
||||
@@ -35,8 +35,11 @@ tutorial/install.md | tutorial/install/ | ../img/initial-layout.png |
|
||||
tutorial/intro.md | tutorial/intro/ | ../../img/initial-layout.png |
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
from markdown.extensions import Extension
|
||||
from markdown.treeprocessors import Treeprocessor
|
||||
@@ -69,7 +72,7 @@ def path_to_url(url, nav, strict):
|
||||
# the internal hyperlink, making sure the target actually exists.
|
||||
target_file = nav.file_context.make_absolute(path)
|
||||
|
||||
if target_file.startswith('/'):
|
||||
if target_file.startswith(os.path.sep):
|
||||
target_file = target_file[1:]
|
||||
|
||||
if target_file not in nav.source_files:
|
||||
|
||||
@@ -345,12 +345,12 @@ class BuildTests(unittest.TestCase):
|
||||
def test_absolute_link(self):
|
||||
pages = [
|
||||
'index.md',
|
||||
'sub/index.md',
|
||||
]
|
||||
site_nav = nav.SiteNavigation(pages)
|
||||
|
||||
markdown = "[test](/index.md)"
|
||||
markdown = "[test 1](/index.md) [test 2](/sub/index.md)"
|
||||
cfg = load_config({'strict': True})
|
||||
|
||||
build.convert_markdown(markdown, cfg, site_nav)
|
||||
|
||||
def test_extension_config(self):
|
||||
|
||||
Reference in New Issue
Block a user