From 013d99785e62721d9e58059f8e309ded5cb80f2c Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 12 Jun 2023 13:07:05 +0200 Subject: [PATCH] Handle ordering of pages correctly --- README.md | 8 ++++++++ content/_index.md | 3 +++ templates/index.html | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 content/_index.md diff --git a/README.md b/README.md index be2b9fc..7e1f578 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,14 @@ and then enable it in your `config.toml`: theme = "hyde" ``` +You will also need a file at `content/_index.md` with at least the following content: + +``` ++++ +sort_by = "date" ++++ +``` + ## Options ### Sidebar menu diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..8bc0069 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,3 @@ ++++ +sort_by = "date" ++++ diff --git a/templates/index.html b/templates/index.html index 114a38a..0d86228 100644 --- a/templates/index.html +++ b/templates/index.html @@ -51,7 +51,7 @@
{% block content %}
- {% for page in section.pages | reverse %} + {% for page in section.pages %}