Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ordering.md « content « content « docs - github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dd70a74175930704ae56c4a5dde94fdeaed06342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
date: 2014-03-06
linktitle: Ordering
menu:
  main:
    parent: content
next: /content/example
prev: /content/archetypes
title: Ordering Content
weight: 60
---

Hugo provides you with all the flexibility you need to organize how your content is ordered.

By default, content is ordered by weight, then by date with the most
recent date first, but alternative sorting (by title and linktitle) is
also available. The order the content will appear will be specified in
the [list template](/templates/list).

_Both the date and weight fields are optional._

Unweighted pages appear at the end of the list. If no weights are provided (or
if weights are the same) date will be used to sort. If neither are provided
content will be ordered based on how it's read off the disk and no order is
guaranteed.

## Assigning Weight to content

    +++
    weight = "4"
    title = "Three"
    date = "2012-04-06"
    +++
    Front Matter with Ordered Pages 3


## Ordering Content Within Taxonomies

Please see the [Taxonomy Ordering Documentation](/taxonomies/ordering/)