From b198cb26ba6a5ce0c1dcbe2aee6c83736fe83280 Mon Sep 17 00:00:00 2001 From: spf13 Date: Thu, 15 May 2014 09:57:36 -0400 Subject: [PATCH] Renaming indexes to taxonomies in docs --- .../{indexes => taxonomies}/category.md | 59 +++++----- .../{indexes => taxonomies}/displaying.md | 102 ++++++++---------- docs/content/{indexes => taxonomies}/lists.md | 60 +++++------ .../{indexes => taxonomies}/ordering.md | 29 +++-- .../{indexes => taxonomies}/overview.md | 46 ++++---- .../{indexes => taxonomies}/templates.md | 24 ++--- 6 files changed, 145 insertions(+), 175 deletions(-) rename docs/content/{indexes => taxonomies}/category.md (56%) rename docs/content/{indexes => taxonomies}/displaying.md (52%) rename docs/content/{indexes => taxonomies}/lists.md (59%) rename docs/content/{indexes => taxonomies}/ordering.md (78%) rename docs/content/{indexes => taxonomies}/overview.md (78%) rename docs/content/{indexes => taxonomies}/templates.md (79%) diff --git a/docs/content/indexes/category.md b/docs/content/taxonomies/category.md similarity index 56% rename from docs/content/indexes/category.md rename to docs/content/taxonomies/category.md index 2240e8379..11d8cbdf0 100644 --- a/docs/content/indexes/category.md +++ b/docs/content/taxonomies/category.md @@ -15,50 +15,43 @@ First step is to define the index in your config file. important to provide both here. We require this, rather than using inflection in effort to support as many languages as possible.* -{{% highlight yaml %}} ---- -indexes: -category: "categories" -baseurl: "http://spf13.com/" -title: "Steve Francia is spf13.com" ---- -{{% /highlight %}} + --- + indexes: + category: "categories" + baseurl: "http://spf13.com/" + title: "Steve Francia is spf13.com" + --- ## /layouts/indexes/category.html For each index type a template needs to be provided to render the index page. In the case of categories, this will render the content for /categories/`CATEGORYNAME`/. -{{% highlight html %}} -{{ template "chrome/header.html" . }} -{{ template "chrome/subheader.html" . }} + {{ template "chrome/header.html" . }} + {{ template "chrome/subheader.html" . }} -
-
-

{{ .Title }}

-{{ range .Data.Pages }} -{{ .Render "summary"}} -{{ end }} -
-
- -{{ template "chrome/footer.html" }} -{{% /highlight %}} +
+
+

{{ .Title }}

+ {{ range .Data.Pages }} + {{ .Render "summary"}} + {{ end }} +
+
+ {{ template "chrome/footer.html" }} ## Assigning indexes to content Make sure that the index is set in the front matter: -{{% highlight json %}} -{ - "title": "Hugo: A fast and flexible static site generator", - "categories": [ - "Development", - "Go", - "Blogging" - ], - "slug": "hugo" -} -{{% /highlight %}} + { + "title": "Hugo: A fast and flexible static site generator", + "categories": [ + "Development", + "Go", + "Blogging" + ], + "slug": "hugo" + } diff --git a/docs/content/indexes/displaying.md b/docs/content/taxonomies/displaying.md similarity index 52% rename from docs/content/indexes/displaying.md rename to docs/content/taxonomies/displaying.md index 2d2d2b712..d43020b3a 100644 --- a/docs/content/indexes/displaying.md +++ b/docs/content/taxonomies/displaying.md @@ -21,13 +21,11 @@ each content piece are located in the usual place ### Example -{{% highlight html %}} - -{{% /highlight %}} + ## Rendering a Site's Indexes @@ -40,13 +38,11 @@ The following example displays all tag keys: ### Example -{{% highlight html %}} - -{{% /highlight %}} + ## Creating a menu based on indexes @@ -63,60 +59,54 @@ called menu.html, then include it using the ### Example complete menu.html file This example will list all indexes, each of their keys and all the content assigned to each key. -{{% highlight html %}} - -{{% /highlight %}} + ### menu.html using a single index It is more likely that you would want to use a single index for navigation. In this example we are using the `groups` index for our menu. -{{% highlight html %}} - -{{% /highlight %}} + ### menu.html using a single index ordered by Popularity -{{% highlight html %}} - -{{% /highlight %}} + diff --git a/docs/content/indexes/lists.md b/docs/content/taxonomies/lists.md similarity index 59% rename from docs/content/indexes/lists.md rename to docs/content/taxonomies/lists.md index 4a2607f32..16a855c1f 100644 --- a/docs/content/indexes/lists.md +++ b/docs/content/taxonomies/lists.md @@ -26,44 +26,40 @@ number of content assigned to that key or alphabetically. ## Example indexes.html file (alphabetical) -{{% highlight html %}} -{{ template "chrome/header.html" . }} -{{ template "chrome/subheader.html" . }} + {{ template "chrome/header.html" . }} + {{ template "chrome/subheader.html" . }} -
-
-

{{ .Title }}

-
    - {{ $data := .Data }} - {{ range $key, $value := .Data.Index.Alphabetical }} -
  • {{ $value.Name }} {{ $value.Count }}
  • - {{ end }} -
-
-
-{{ template "chrome/footer.html" }} -{{% /highlight %}} +
+
+

{{ .Title }}

+
    + {{ $data := .Data }} + {{ range $key, $value := .Data.Index.Alphabetical }} +
  • {{ $value.Name }} {{ $value.Count }}
  • + {{ end }} +
+
+
+ {{ template "chrome/footer.html" }} ## Example indexes.html file (ordered) -{{% highlight html %}} -{{ template "chrome/header.html" . }} -{{ template "chrome/subheader.html" . }} + {{ template "chrome/header.html" . }} + {{ template "chrome/subheader.html" . }} -
-
-

{{ .Title }}

-
    - {{ $data := .Data }} - {{ range $key, $value := .Data.Index.ByCount }} -
  • {{ $value.Name }} {{ $value.Count }}
  • - {{ end }} -
-
-
+
+
+

{{ .Title }}

+
    + {{ $data := .Data }} + {{ range $key, $value := .Data.Index.ByCount }} +
  • {{ $value.Name }} {{ $value.Count }}
  • + {{ end }} +
+
+
-{{ template "chrome/footer.html" }} -{{% /highlight %}} + {{ template "chrome/footer.html" }} ## Variables available to list of indexes pages. diff --git a/docs/content/indexes/ordering.md b/docs/content/taxonomies/ordering.md similarity index 78% rename from docs/content/indexes/ordering.md rename to docs/content/taxonomies/ordering.md index 80fae56dd..eaa36936c 100644 --- a/docs/content/indexes/ordering.md +++ b/docs/content/taxonomies/ordering.md @@ -6,6 +6,7 @@ aliases: ["/indexes/ordering/"] weight: 60 menu: main: + identifier: "Ordering Taxonomies" parent: 'taxonomy' --- @@ -20,25 +21,21 @@ Indexes can be ordered by either alphabetical key or by the number of content pi ### Order Alphabetically Example: -{{% highlight html %}} - -{{% /highlight %}} + ### Order by Popularity Example: -{{% highlight html %}} - -{{% /highlight %}} + [See Also Index Lists](/indexes/lists/) diff --git a/docs/content/indexes/overview.md b/docs/content/taxonomies/overview.md similarity index 78% rename from docs/content/indexes/overview.md rename to docs/content/taxonomies/overview.md index 4c579821d..e25917ec1 100644 --- a/docs/content/indexes/overview.md +++ b/docs/content/taxonomies/overview.md @@ -38,15 +38,13 @@ pluralization. ### config.yaml -{{% highlight yaml %}} ---- -indexes: - tag: "tags" - category: "categories" -baseurl: "http://spf13.com/" -title: "Steve Francia is spf13.com" ---- -{{% /highlight %}} + --- + indexes: + tag: "tags" + category: "categories" + baseurl: "http://spf13.com/" + title: "Steve Francia is spf13.com" + --- ## Assigning index values to content @@ -61,20 +59,18 @@ and assign all keys you want this content to match against. ### Example -{{% highlight json %}} -{ - "title": "Hugo: A fast and flexible static site generator", - "tags": [ - "Development", - "Go", - "fast", - "Blogging" - ], - "categories" : [ - "Development" - ] - "slug": "hugo", - "project_url": "http://github.com/spf13/hugo" -} -{{% /highlight %}} + { + "title": "Hugo: A fast and flexible static site generator", + "tags": [ + "Development", + "Go", + "fast", + "Blogging" + ], + "categories" : [ + "Development" + ] + "slug": "hugo", + "project_url": "http://github.com/spf13/hugo" + } diff --git a/docs/content/indexes/templates.md b/docs/content/taxonomies/templates.md similarity index 79% rename from docs/content/indexes/templates.md rename to docs/content/taxonomies/templates.md index ed02b7a95..716b10483 100644 --- a/docs/content/indexes/templates.md +++ b/docs/content/taxonomies/templates.md @@ -41,18 +41,16 @@ The following variables are available to the index template: **.Data.`singular`** The index itself.
## Example -{{% highlight html %}} -{{ template "chrome/header.html" . }} -{{ template "chrome/subheader.html" . }} + {{ template "chrome/header.html" . }} + {{ template "chrome/subheader.html" . }} -
-
-

{{ .Title }}

- {{ range .Data.Pages }} - {{ .Render "summary"}} - {{ end }} -
-
+
+
+

{{ .Title }}

+ {{ range .Data.Pages }} + {{ .Render "summary"}} + {{ end }} +
+
-{{ template "chrome/footer.html" }} -{{% /highlight %}} + {{ template "chrome/footer.html" }}