From e4f531af010cce09db0b27f5a923a7fce18822d9 Mon Sep 17 00:00:00 2001 From: Valere JEANTET Date: Wed, 9 Sep 2020 00:49:46 +0200 Subject: =?UTF-8?q?Update=20Page=20=E2=80=9Ccontent-and-customization/00-a?= =?UTF-8?q?dding-content/=5Findex=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../00-adding-content/_index.md | 31 +++++++++------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/exampleSite/content/content-and-customization/00-adding-content/_index.md b/exampleSite/content/content-and-customization/00-adding-content/_index.md index 9dc895a..6333824 100644 --- a/exampleSite/content/content-and-customization/00-adding-content/_index.md +++ b/exampleSite/content/content-and-customization/00-adding-content/_index.md @@ -1,38 +1,36 @@ --- lastmodifierdisplayname: Valere JEANTET title: Adding content -description: This page tells you how to use the theme to add and structure your site content. - -date: 2017-04-24T18:36:24+02:00 -layout: "" -hidden: false +description: This page tells you how to use the theme to add and structure your + site content. +date: 2020-09-08T22:49:36.481Z head: "" creatordisplayname: Valere JEANTET +weight: 1 +hidden: false pre: "" +layout: "" lastmodifieremail: valere.jeantet@gmail.com creatoremail: valere.jeantet@gmail.com -weight: 1 - tags: - tag1 - tag2 --- - {{% notice %}}This page tells you how to use the theme to add and structure your site content.{{% /notice %}} - ## Content root directory + You add content for your site under the `content` root directory of your Hugo site project. The files in your content root directory are typically grouped in subdirectories corresponding to your site’s sections. We’ll look at in the following chapter. ## Content sections + With docport, **Each content page composes the site and navigation structure**, they shape the structure of your website. Create a folder for each section and their sub sections, and a `_index.md` in each folder which will act as the section's content. -{{%notice%}}You can add any other page.md in section folder, they will be treated as "[subpages]({{< ref "#subpages" >}})"{{%/notice%}} - +{{%notice%}}You can add any other page.md in section folder, they will be treated as "\[subpages]({{< ref "#subpages" >}})"{{%/notice%}} To link pages to each other, place them in a folders hierarchy. @@ -48,18 +46,18 @@ To link pages to each other, place them in a folders hierarchy. ├── _index.md <-- section's page ├── pageA.md <-- "subpages" └── pageB.md <-- "subpages" - ``` ## Subpages + Subpages are contents which belong to the section, and are displayed bellow section's title in the page. \ Subpages are not displayed in left menu. If you look at the current page title, you will see 3 links which reference its 3 subpages. ![](subpages.png?height=60px&classes=border,shadow) - ## Page frontmatter + Each page file in a Hugo site has metadata frontmatter that tells Hugo about the page. You specify page frontmatter in TOML, YAML, or JSON. \ Use the frontmatter to specify the page title, description, creation date, link title, template, menu weighting, and even any resources such as images used by the page. You can see a complete list of possible page frontmatter in [Front Matter](https://gohugo.io/content-management/front-matter/). @@ -73,7 +71,7 @@ On top of the [existing ones](https://gohugo.io/content-management/front-matter/ weight=10 # Hide some page components - hide: header, nav, breadcrumb, toc, footer, nextpage + hide= header, nav, breadcrumb, toc, footer, nextpage # subpage subpage = false # usefull when you want to force a sub section to be considered as a subpage @@ -89,7 +87,4 @@ On top of the [existing ones](https://gohugo.io/content-management/front-matter/ +++ ``` -{{%alert success%}}More frontmatter params exists to control how to display you content in the navigation, see [Navigation & Search]({{%relref "02-navigation-search" %}}) in the left menu.{{%/alert%}} - - - +{{%alert success%}}More frontmatter params exists to control how to display you content in the navigation, see \[Navigation & Search]({{%relref "02-navigation-search" %}}) in the left menu.{{%/alert%}} \ No newline at end of file -- cgit v1.2.3