Update content management page order

This commit is contained in:
Ryan Watters committed 2017-02-12 14:32:39 -08:00
1 parent 212241b8c5
commit e067e89d3d
23 files changed
+76 -78

No files matched your search

+2 -2
View File
@@ -55,5 +55,5 @@ notes:
See what's coming next in the [Hugo roadmap][].
[Powerful Theming]: /themes
[Hugo roadmap]: /about/roadmap
[Powerful Theming]: /themes/
[Hugo roadmap]: /about-hugo/roadmap
+1 -1
View File
@@ -26,7 +26,7 @@ in a language. I began developing Hugo in Go and fell in love with the
language. I hope you will enjoy using Hugo (and [contributing to it][]) as much
as I have writing it.
—Steve Francia ([@spf13][])
―Steve Francia ([@spf13][])
[contributing to it]: https://github.com/spf13/hugo
[Go language]: https://golang.org/
+3 -7
View File
@@ -1,6 +1,6 @@
---
title: Content Management
linktitle: Content Management
title: "Introduction: Content Organization"
linktitle: "Introduction"
description: Content organization, summaries, archetypes, front matter, and supported formats.
date: 2017-02-01
publishdate: 2017-02-01
@@ -9,10 +9,6 @@ tags: [content, source, organization]
categories: [content]
weight: 01
draft: false
slug:
aliases: []
aliases: [/content/]
notes:
---
+15 -15
View File
@@ -7,16 +7,18 @@ publishdate: 2017-02-01
lastmod: 2017-02-01
tags: [archetypes,generators]
categories: [content]
weight:
weight: 50
draft: false
slug:
aliases: []
notes:
---
**Archetypes** are content (i.e., `.md`) files in the `archetypes` directory of your [project][] that contain pre-configured [front matter][] for your site's [content types][]. Archetypes facilitate more consistent metadata by enabling `hugo new` to populate new instances of a content type.
Hugo uses **archetypes** to facilitate creation of consistent metadata for content types across a website. Archetypes allow authors to easily generate new content files with associated metadata that are new instances of a content type. {{< relref "content-management/front-matter.md" >}}
To create new instances of a content type that pull from an archetype, authors can use the the `hugo new` command combined with the file path from the [content][] downward; e.g.---
To create new instances of a content type that pull from an archetype, authors can use the the `hugo new` command combined with the file path that assumes the present directory is [content][] downward; e.g.---
```bash
hugo new posts/my-first-post.md
@@ -25,10 +27,7 @@ hugo new posts/my-first-post.md
When defining a custom content type, you can use an **archetype** as a way to
define the default metadata for a new post of that type.
**Archetypes** are quite literally archetypal content files with pre-configured
[front matter][]. An archetype will populate each new content file of a given type with any default metadata you've defined whenever you run the `hugo new` command.
## Creating an archetype
## Creating a Default Archetype
In the following example scenario, suppose we have a blog with a single content
type (blog post). Our imaginary blog will use ‘tags’ and ‘categories’ for its
@@ -48,7 +47,7 @@ categories = ["x", "y"]
Some editors (e.g., Sublime, Emacs) do not insert an end-of-line (EOL) character at the end of the file (EOF). If you get a [strange EOF error](/troubleshooting/frequently-asked-questions/#eof-error) when using `hugo new`, open each archetype file and press <kbd>Enter</kbd> to type a carriage return after the closing `+++` or `---` if you're using TOML or YAML front matter, respectively.
{{% /caution %}}
## Using the Archetype
## Using the Default Archetype
Now, with `archetypes/default.md` in place, let's create a new post in the `post` section with the `hugo new` command:
@@ -76,6 +75,14 @@ We see that the `title` and `date` variables have been added in addition to the
Congratulations! We have successfully created an archetype and used it to
quickly scaffold out a new post. But wait, what if we want to create some content that isn't exactly a blog post, like a profile for a musician? Let's see how using **archetypes** can help us out.
### Override the Inferred Content Type in a New File
To override the content type for a new post, include the `--kind` flag during creation.
{{% note "Using a Theme Archetype" %}}
If you wish to use archetypes that ship with a theme, the theme must be specified in your [configuration file](/project-organization/configuration/).
{{% /note %}}
## Creating Custom Archetypes
Previously, we had created a new content type by adding a new subfolder to the content directory. In this case, its name would be `content/musician`. To begin using a `musician` archetype for each new `musician` post, we simply need to create a file named after the content type called `musician.md`, and put it in the `archetypes` directory, similar to the one below.
@@ -146,17 +153,10 @@ Hugo CLI command:
hugo new [my-content-type/post-name]
```
### Override the Inferred Content Type in a New File
To override the content type for a new post, include the `--kind` flag during creation.
{{% note "Using Theme Archetypes" %}}
If you wish to use archetypes that ship with a theme, the theme must be specified in your [configuration file](/project-organization/configuration/).
{{% /note %}}
[`now()`]: http://golang.org/pkg/time/#Now
[configuration file]: /project-organization/configuration/
[content]: /project-organization/directory-structure/
[front matter]: /content-management/front-matter/
[project]:
[RFC 3339 format]: https://www.ietf.org/rfc/rfc3339.txt
@@ -1,14 +1,16 @@
---
title: Site Sections
linktitle:
title: Content Sections
linktitle: Content Sections
description:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
tags: []
weight:
weight: 30
draft: false
slug:
aliases: [/content-management/sections,/content/sections/]
notes:
---
---
@@ -7,7 +7,7 @@ publishdate: 2017-01-10
lastmod: 2017-01-10
tags: []
categories: []
weight:
weight: 60
draft: false
slug:
aliases: []
+1 -1
View File
@@ -7,7 +7,7 @@ publishdate: 2017-02-01
lastmod: 2017-02-01
tags: []
categories: []
weight:
weight: 40
draft: false
slug:
aliases: [/content/types]
@@ -7,7 +7,7 @@ publishdate: 2017-02-01
lastmod: 2017-01-09
categories: [content]
tags: [cross references, anchors]
weight:
weight: 70
draft: false
slug:
aliases: []
+1 -1
View File
@@ -7,7 +7,7 @@ publishdate: 2017-01-09
lastmod: 2017-01-09
categories: [content]
tags: [front matter, yaml, toml, json, metadata]
weight:
weight: 20
draft: false
slug:
aliases: []
@@ -6,13 +6,24 @@ date: 2017-01-10
publishdate: 2017-01-10
lastmod: 2017-01-10
tags: []
weight:
weight: 10
draft: false
slug:
aliases: [/content/markdown-extras/,/content/supported-formats/]
notes:
---
## Markdown
Markdown is the natively supported content format for Hugo and is rendered using the excellent [BlackFriday project][].
{{% caution "Deeply Nested Lists" %}}
Hugo uses [BlackFriday](https://github.com/russross/blackfriday), a markdown processor written in Go. A known issue [(#329)](https://github.com/russross/blackfriday/issues/329) in BlackFriday is the handling of deeply nested lists, but there is a workaround. If you write lists in markdown, be sure to include 4 spaces (i.e., <kbd>tab</kbd>) rather than 2 to delimit nesting of lists.
{{% /caution %}}
{{% /caution %}}
## Additional Resources
* [Markdown Tutorial][]
[BlackFriday project]: https://github.com/russross/blackfriday
[Markdown Tutorial]: http://www.markdowntutorial.com/
@@ -6,7 +6,7 @@ date: 2017-01-10
publishdate: 2017-01-10
lastmod: 2017-01-10
tags: []
weight:
weight: 120
draft: false
slug:
aliases: []
@@ -1,13 +1,13 @@
---
title: Aliases/Redirects
linktitle: Aliases/Redirects
title: Permalinks and Redirects
linktitle: Permalinks and Redirects
description:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
tags: [aliases,redirects]
tags: [aliases,redirects,permalinks, url management,urls]
categories: [content management]
weight:
weight: 80
draft: false
slug:
aliases: []
-14
View File
@@ -1,14 +0,0 @@
---
title: Permalinks
linktitle: Permalinks
description:
date: 2017-01-10
publishdate: 2017-01-10
lastmod: 2017-01-10
tags: [permalinks,url,slug]
weight:
draft: false
slug:
aliases: []
notes:
---
@@ -7,7 +7,7 @@ publishdate: 2017-02-01
lastmod: 2017-02-01
tags: []
categories: []
weight:
weight: 100
draft: false
slug:
aliases: []
@@ -7,7 +7,7 @@ publishdate: 2017-02-01
lastmod: 2017-02-01
tags: []
categories: []
weight:
weight: 90
draft: false
slug:
aliases: []
@@ -317,7 +317,7 @@ ignoreFiles = [ "\\.foo$", "\\.boo$" ]
```
The above is a list of regular expressions. Note that the backslash (`\`) character is escaped in this example to keep TOML happy.
## See Also
## Additional Resources
* [TOML Spec][]
* [YAML Spec][]
+6 -6
View File
@@ -1,15 +1,15 @@
---
title: Troubleshooting
linktitle:
description: FAQs pulled from the Hugo forum, known issues, and workarounds.
title: Issues and FAQs
linktitle: Issues and FAQs
description: Frequently asked questions and known issues pulled from the Hugo Discuss forum.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
layout: singlescroller
weight: 01
layout: sectionlist
weight:
draft: false
slug:
aliases: []
aliases: [/troubleshooting/faqs/,/faqs/]
notes:
---
+1 -13
View File
@@ -1,14 +1,2 @@
---
title:
linktitle:
description:
date:
publishdate: ""
lastmod: ""
tags: []
categories: []
weight: 10
draft: false
slug:
aliases: []
---
---
+7
View File
@@ -0,0 +1,7 @@
---
publishdate: Now()
expirydate: ""
description: ""
tags: [tag1, tag2]
categories: ['base category']
---
@@ -0,0 +1,2 @@
{{ define "main" }}
{{ end }}
@@ -1,6 +1,12 @@
{{ define "main" }}
{{$title := .Title}}
<main class="main">
{{with .Params.testing }}
{{range $ind,$value := . }}
<p>Index: {{$ind}}</p>
<p>Value: {{$value}}</p>
{{end}}
{{end}}
<header class="content-header">
<h1 class="page-title">{{with .LinkTitle}}{{ . | markdownify}}{{else}}{{ .Title | markdownify }}{{end}}</h1>
<div class="content-header-links">
@@ -20,7 +20,7 @@ aside {
ul,
ol {
padding-left: .75em;
margin-left: .25em;
margin-left: .5em;
margin-top: 0px;
padding-top: 0px;
margin-bottom: 1.5em;
+1 -1
View File
@@ -1 +1 @@
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box;border-radius:0px;outline:none}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html,body{margin:0px;padding:0px;outline:none;border:none;font-size:18px;font-family:"muli","Helvetica Neue","Helvetica","Roboto","Arial",sans-serif;color:#222;line-height:1.6;font-weight:300;overflow-x:hidden}body{font-size:90%;overflow-x:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media only screen and (min-width: 760px){body{font-size:95%}}@media only screen and (min-width: 960px){body{font-size:100%}}p{margin-top:0px;margin-bottom:1.5em;line-height:1.6}@font-face{font-family:'fontello';src:url("/fonts/fontello/fontello.eot");src:url("/fonts/fontello/fontello.woff2") format("woff2"),url("/fonts/fontello/fontello.woff") format("woff"),url("/fonts/fontello/fontello.ttf") format("truetype"),url("/fonts/fontello/fontello.svg?78165468#fontello") format("svg");font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-alert:before{content:'\e810'}.icon-angle-double-right:before{content:'\f101'}.icon-attach:before{content:'\e820'}.icon-attention:before{content:'\e80f'}.icon-bell:before{content:'\e80d'}.icon-cancel:before{content:'\e81e'}.icon-caution:before{content:'\e80f'}.icon-chrome:before{content:'\e841'}.icon-clipboard:before{content:'\e817'}.icon-code:before{content:'\f121'}.icon-cog-alt:before{content:'\e814'}.icon-css3:before{content:'\f13c'}.icon-docs:before{content:'\f15c'}.icon-download:before{content:'\e815'}.icon-facebook-official:before{content:'\f230'}.icon-firefox:before{content:'\e840'}.icon-flag:before{content:'\e813'}.icon-forum:before{content:'\f03d';margin-right:.3em}.icon-github:before{content:'\f09b'}.icon-gitter:before{content:'\e819'}.icon-go:before{content:'\e801'}.icon-golang:before{content:'\e801'}.icon-heart:before{content:'\e81d'}.icon-help:before{content:'\e81b'}.icon-home:before{content:'\e812'}.icon-html.input:before{content:'\e81f'}.icon-html5:before{content:'\e800'}.icon-html:before{content:'\e800'}.icon-hugo:before{content:'\e81f'}.icon-ie:before{content:'\e843'}.icon-info:before{content:'\e811'}.icon-instagram:before{content:'\f32d'}.icon-javascript:before{content:'\e802'}.icon-js:before{content:'\e802'}.icon-json:before{content:'\e81c'}.icon-link:before{content:'\e816'}.icon-linkedin:before{content:'\f30c'}.icon-love:before{content:'\e81d'}.icon-mail:before{content:'\e821'}.icon-markdown:before{content:'\e80e'}.icon-md:before{content:'\e80e'}.icon-note:before{content:'\e80d'}.icon-opera:before{content:'\e842'}.icon-pdf:before{content:'\f1c1'}.icon-pencil:before{content:'\e80c'}.icon-picture:before{content:'\e808'}.icon-quote-left:before{content:'\e809'}.icon-quote-right:before{content:'\e80a'}.icon-sasLine truncated
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box;border-radius:0px;outline:none}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html,body{margin:0px;padding:0px;outline:none;border:none;font-size:18px;font-family:"muli","Helvetica Neue","Helvetica","Roboto","Arial",sans-serif;color:#222;line-height:1.6;font-weight:300;overflow-x:hidden}body{font-size:90%;overflow-x:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media only screen and (min-width: 760px){body{font-size:95%}}@media only screen and (min-width: 960px){body{font-size:100%}}p{margin-top:0px;margin-bottom:1.5em;line-height:1.6}@font-face{font-family:'fontello';src:url("/fonts/fontello/fontello.eot");src:url("/fonts/fontello/fontello.woff2") format("woff2"),url("/fonts/fontello/fontello.woff") format("woff"),url("/fonts/fontello/fontello.ttf") format("truetype"),url("/fonts/fontello/fontello.svg?78165468#fontello") format("svg");font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-alert:before{content:'\e810'}.icon-angle-double-right:before{content:'\f101'}.icon-attach:before{content:'\e820'}.icon-attention:before{content:'\e80f'}.icon-bell:before{content:'\e80d'}.icon-cancel:before{content:'\e81e'}.icon-caution:before{content:'\e80f'}.icon-chrome:before{content:'\e841'}.icon-clipboard:before{content:'\e817'}.icon-code:before{content:'\f121'}.icon-cog-alt:before{content:'\e814'}.icon-css3:before{content:'\f13c'}.icon-docs:before{content:'\f15c'}.icon-download:before{content:'\e815'}.icon-facebook-official:before{content:'\f230'}.icon-firefox:before{content:'\e840'}.icon-flag:before{content:'\e813'}.icon-forum:before{content:'\f03d';margin-right:.3em}.icon-github:before{content:'\f09b'}.icon-gitter:before{content:'\e819'}.icon-go:before{content:'\e801'}.icon-golang:before{content:'\e801'}.icon-heart:before{content:'\e81d'}.icon-help:before{content:'\e81b'}.icon-home:before{content:'\e812'}.icon-html.input:before{content:'\e81f'}.icon-html5:before{content:'\e800'}.icon-html:before{content:'\e800'}.icon-hugo:before{content:'\e81f'}.icon-ie:before{content:'\e843'}.icon-info:before{content:'\e811'}.icon-instagram:before{content:'\f32d'}.icon-javascript:before{content:'\e802'}.icon-js:before{content:'\e802'}.icon-json:before{content:'\e81c'}.icon-link:before{content:'\e816'}.icon-linkedin:before{content:'\f30c'}.icon-love:before{content:'\e81d'}.icon-mail:before{content:'\e821'}.icon-markdown:before{content:'\e80e'}.icon-md:before{content:'\e80e'}.icon-note:before{content:'\e80d'}.icon-opera:before{content:'\e842'}.icon-pdf:before{content:'\f1c1'}.icon-pencil:before{content:'\e80c'}.icon-picture:before{content:'\e808'}.icon-quote-left:before{content:'\e809'}.icon-quote-right:before{content:'\e80a'}.icon-sasLine truncated