Add first exFile shortcode

This commit is contained in:
Ryan Watters committed 2017-02-17 13:14:55 -06:00
1 parent 9d68eb723c
commit bf7399fe2f
608 files changed
+131 -59

No files matched your search

+2 -3
View File
@@ -75,11 +75,10 @@ watch = true
removefromexternalsearch = true removefromexternalsearch = true
## This is used when the BaseURL does not need to modified (eg, in share links) ## This is used when the BaseURL does not need to modified (eg, in share links)
siteaddress = "https://gohugo.io" siteaddress = "https://gohugo.io"
## Gh repo for site footer ## Gh repo for site footer (include trailing slash)
ghrepo = "https://github.com/spf13/hugo/" ghrepo = "https://github.com/spf13/hugo/"
## GitHub Docs Repository Base URL (include trailing slash) ## GitHub Docs Repository Base URL (include trailing slash)
# ghdocsrepo = "https://github.com/rdwatters/hugo-docs-concept/" ghdocsrepo = "https://github.com/rdwatters/hugo-docs-concept/"
ghdocsrepo = ""
## Github Wiki for Documentation ## Github Wiki for Documentation
ghdocswiki = "" ghdocswiki = ""
## Github Wiki for Development ## Github Wiki for Development
+1 -1
View File
@@ -12,4 +12,4 @@ draft: false
aliases: [/content/] aliases: [/content/]
toc: false toc: false
notes: notes:
--- ---
+26 -13
View File
@@ -1,6 +1,6 @@
--- ---
title: Archetypes title: Archetypes
linktitle: linktitle: Archetypes
description: Archetypes allow you to create and set default parameters from the command line according to the content section. description: Archetypes allow you to create and set default parameters from the command line according to the content section.
date: 2017-02-01 date: 2017-02-01
publishdate: 2017-02-01 publishdate: 2017-02-01
@@ -73,10 +73,12 @@ By default, `hugo new` content files include front matter in the TOML format reg
You can specify a different default format in your site [configuration file][] file using the `metaDataFormat` directive. Possible values are `toml`, `yaml`, and `json`. You can specify a different default format in your site [configuration file][] file using the `metaDataFormat` directive. Possible values are `toml`, `yaml`, and `json`.
## Creating a Default Archetype ## Default Archetypes
Default archetypes are convenient if your content's front matter stays consistent across multiple [content sections][]. Default archetypes are convenient if your content's front matter stays consistent across multiple [content sections][].
### Creating the Default Archetype
The [example site][] includes `tags` and `categories` as [taxonomies][]. If we assume that all content files will require these two key-values, we can create a `default.md` archetype that *extends* Hugo's base archetype. In this example, we are including "golang" and "hugo" as tags and "web development" as a category. The [example site][] includes `tags` and `categories` as [taxonomies][]. If we assume that all content files will require these two key-values, we can create a `default.md` archetype that *extends* Hugo's base archetype. In this example, we are including "golang" and "hugo" as tags and "web development" as a category.
{{% input "archetypes/default.md" %}} {{% input "archetypes/default.md" %}}
@@ -92,7 +94,7 @@ categories = ["web development"]
If you get an `EOF error` when using `hugo new`, add a carriage return after the closing `+++` or `---` for your TOML or YAML front matter, respectively. (See [troubleshooting](/troubleshooting/eof-error/).) If you get an `EOF error` when using `hugo new`, add a carriage return after the closing `+++` or `---` for your TOML or YAML front matter, respectively. (See [troubleshooting](/troubleshooting/eof-error/).)
{{% /caution %}} {{% /caution %}}
## Using the Default Archetype ### Using the Default Archetype
With an `archetypes/default.md` in place, we can use the CLI to create a new post in the `posts` content section: With an `archetypes/default.md` in place, we can use the CLI to create a new post in the `posts` content section:
@@ -118,19 +120,24 @@ title = "my new post"
We see that the `title` and `date` key-values have been added in addition to the `tags` and `categories` key-values from `archetypes/default.md`. We see that the `title` and `date` key-values have been added in addition to the `tags` and `categories` key-values from `archetypes/default.md`.
{{% note "Ordering of Front Matter" %}} {{% note "Ordering of Front Matter" %}}
You may notice that content files created with `hugo new` do not observe the order of the key-values specified in your archetype files and instead list your front matter alphabetically. This is a known issue ({{< issue 452 >}}). You may notice that content files created with `hugo new` do not observe the order of the key-values specified in your archetype files and instead list your front matter alphabetically. This is a known issue ({{< gh 452 >}}).
{{% /note %}} {{% /note %}}
## Creating Custom Archetypes ### Example Site Default Archetype
The following is the default archetype used in the [example site][].
{{< exfile "static/example/archetypes/default.md" "yaml">}}
## Custom Archetypes
Suppose the example site's `posts` section requires more sophisticated front matter than what has been specified in `archetypes/default.md`. We can create a custom archetype for our posts at `archetypes/posts.md` that includes the full set of front matter. Suppose the example site's `posts` section requires more sophisticated front matter than what has been specified in `archetypes/default.md`. We can create a custom archetype for our posts at `archetypes/posts.md` that includes the full set of front matter.
### Creating a Custom Archetype
{{% input "archetypes/posts.md"%}} {{% input "archetypes/posts.md"%}}
```toml ```toml
+++ +++
subtitle = ""
author = ""
publishdate = ""
description = "" description = ""
tags = "" tags = ""
categories = "" categories = ""
@@ -138,7 +145,7 @@ categories = ""
``` ```
{{% /input %}} {{% /input %}}
## Using Custom Archetypes ### Using a Custom Archetype
With an `archetypes/posts.md` in place, we can use the CLI to create a new posts with custom `posts` metadata in the `posts` content section: With an `archetypes/posts.md` in place, we can use the CLI to create a new posts with custom `posts` metadata in the `posts` content section:
@@ -153,24 +160,30 @@ This time, Hugo recognizes our custom `archetypes/posts.md` archetype and uses i
{{% output "content/posts/post-from-custom.md" %}} {{% output "content/posts/post-from-custom.md" %}}
```toml ```toml
+++ +++
author = ""
categories = "" categories = ""
date = 2017-02-13T17:24:43-08:00 date = 2017-02-13T17:24:43-08:00
description = "" description = ""
publishdate = ""
subtitle = ""
tags = "" tags = ""
title = post from custom title = post from custom
+++ +++
``` ```
{{% /output %}} {{% /output %}}
### Example Site Custom Archetype
`musicians` in the [example site] require more sophisticated front matter than what has been specified in `archetypes/default.md`. We can create a custom archetype for musicians at `archetypes/musicians.md` that includes the full set of front matter.
The following is the `musicians` archetype from the [example site][]:
{{< exfile "static/example/archetypes/musicians.md" "yaml" >}}
[archetypes directory]: /project-organization/directory-structure/ [archetypes directory]: /project-organization/directory-structure/
[`now()`]: http://golang.org/pkg/time/#Now [`now()`]: http://golang.org/pkg/time/#Now
[configuration file]: /project-organization/configuration/ [configuration file]: /project-organization/configuration/
[content sections]: /content-sections/ [content sections]: /content-sections/
[content types]: /content-management/content-types/ [content types]: /content-management/content-types/
[example site]: /getting-started/ [example site]: /getting-started/using-the-hugo-docs/#example-site
[front matter]: /content-management/front-matter/ [front matter]: /content-management/front-matter/
[RFC 3339 format]: https://www.ietf.org/rfc/rfc3339.txt [RFC 3339 format]: https://www.ietf.org/rfc/rfc3339.txt
[taxonomies]: /content-management/taxonomies/ [taxonomies]: /content-management/taxonomies/
@@ -6,7 +6,7 @@ date: 2017-02-01
publishdate: 2017-02-01 publishdate: 2017-02-01
lastmod: 2017-02-01 lastmod: 2017-02-01
categories: [contribute to hugo] categories: [contribute to hugo]
tags: [docs,documentation] tags: [docs,documentation,community]
weight: weight:
draft: false draft: false
slug: slug:
+2 -2
View File
@@ -6,8 +6,8 @@ date: 2017-02-01
publishdate: 2017-02-01 publishdate: 2017-02-01
lastmod: 2017-02-01 lastmod: 2017-02-01
categories: [getting started] categories: [getting started]
tags: [] tags: [quick start,usage]
weight: weight: 20
draft: false draft: false
slug: slug:
aliases: [] aliases: []
@@ -0,0 +1,23 @@
---
title: Using the Hugo Docs
linktitle: Using the Hugo Docs
description:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [getting started]
tags: []
weight: 10
draft: false
slug:
aliases: [/getting-started/using-the-docs/]
toc: false
notes:
---
## Example Site
## Reading the Code Samples
## Contribute to the Docs
+12
View File
@@ -0,0 +1,12 @@
{{ $file := .Get 0}}
{{ $filepath := replace $file "static/example" ""}}
{{ $syntax := index (split $file ".") 1 }}
{{ $syntaxoverride := eq (len .Params) 2 }}
<div class="code-copy" id="{{$file | urlize}}">
<div class="code-copy-header"><div class="action-buttons"></div><span title="" class="filename">{{$filepath}}</span><i class="icon-{{$syntax}} input"></i></div>
<button class="copy-button" title="Copy to clipboard" data-clipboard-snippet>
<div class="copy-text"><i class="icon-clipboard"></i> COPY</div>
</button>
<pre><code class="language-{{if $syntaxoverride}}{{.Get 1}}{{else}}{{$syntax}}{{end}}">{{- readFile $file -}}</code></pre>
<a role="button" target="_blank" href="{{$.Site.Params.ghdocsrepo}}{{$file}}" class="see-on-github">See on <i class="icon-github"></i></a>
</div>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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 !important;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:'\e80aLine 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 !important;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:'\e80aLine truncated
+5
View File
@@ -0,0 +1,5 @@
---
publishdate: ""
description: ""
musician: ""
---
+12
View File
@@ -0,0 +1,12 @@
---
namefirst: ""
namelast: ""
nickname: ""
tags: []
categories: []
instruments: []
genres: []
birthyear: ""
death: ""
---
File renamed without changes.
Whitespace-only changes.
Loaded 100 of 608 files, more files were not shown because too many files have changed in this diff. Show more