From a7657f30abd94a21d6b74105eca0364a06579b62 Mon Sep 17 00:00:00 2001 From: Hannu Hartikainen Date: Wed, 13 May 2020 09:40:06 +0300 Subject: [PATCH] Use {{ page.permalink | safe }} in tutorial (#1024) The `/` urls are confusing to newcomers (at least myself). Use the best practice in the tutorial (see issue #129). --- docs/content/documentation/getting-started/overview.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/content/documentation/getting-started/overview.md b/docs/content/documentation/getting-started/overview.md index b2a20d37..38e54798 100644 --- a/docs/content/documentation/getting-started/overview.md +++ b/docs/content/documentation/getting-started/overview.md @@ -138,13 +138,15 @@ Let's now create some more templates. In the `templates` directory, create a `bl {% endblock content %} ``` -As done by `index.html`, `blog.html` extends `base.html`, but this time we want to list the blog posts. The *title* we set in the `_index.md` file above is available to us as `{{ section.title }}`. In the list below the title, we loop through all the pages in our section (`blog` directory) and output the page title and URL using `{{ page.title }}` and `{{ page.permalink }}`, respectively. If you go to , you will see the section page for `blog`. The list is empty because we don't have any blog posts. Let's fix that now. +As done by `index.html`, `blog.html` extends `base.html`, but this time we want to list the blog posts. The *title* we set in the `_index.md` file above is available to us as `{{ section.title }}`. In the list below the title, we loop through all the pages in our section (`blog` directory) and output the page title and URL using `{{ page.title }}` and `{{ page.permalink | safe }}`, respectively. We use the `| safe` filter because the permalink doesn't need to be HTML escaped (escaping would cause `/` to render as `/`). + +If you go to , you will see the section page for `blog`. The list is empty because we don't have any blog posts. Let's fix that now. ### Markdown Content