Rename 'index' in the config to 'pages'

This commit is contained in:
Tom Christie
2014-01-14 09:27:22 +00:00
parent b83d22c263
commit 321fda3a7c
2 changed files with 4 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
project_name: 'Django Vanilla Views'
index:
pages:
- ['index.md', 'Home']
- ['api/base-views.md', 'API Guide / Base Views']
- ['api/model-views.md', 'API Guide / Model Views']

View File

@@ -62,7 +62,7 @@ def build_html(config):
template_path = os.path.join(config['theme_dir'], 'base.html')
template = jinja2.Template(open(template_path, 'r').read())
for path, title in config['index']:
for path, title in config['pages']:
set_nav_active(path, config, nav)
homepage_url = path_to_url('index.md', config)
url = path_to_url(path, config)
@@ -139,7 +139,7 @@ def parse_toc(toc):
def build_nav(config):
# TODO: Allow more than two levels of nav.
ret = []
for path, title in config['index']:
for path, title in config['pages']:
url = path_to_url(path, config)
title, sep, child_title = title.partition('/')
title = title.strip()
@@ -184,7 +184,7 @@ def path_to_url(path, config):
def path_to_previous_and_next_urls(path, config):
paths = [path_item for path_item, title in config['index']]
paths = [path_item for path_item, title in config['pages']]
idx = paths.index(path)
if idx == 0: