From 201c999aed7587d820ac0de7a710bc16c3fdc008 Mon Sep 17 00:00:00 2001 From: Ryan Watters Date: Sun, 12 Mar 2017 20:21:01 -0500 Subject: [PATCH] Update other vars to individual pages Closes rdwatters/hugo-docs-concept#25 --- content/concept.md | 17 ++- content/content-management/menus.md | 40 +++++- content/content-management/shortcodes.md | 2 +- content/content-management/urls.md | 2 +- content/functions/haschildren.md | 5 +- content/functions/hasmenucurrent.md | 7 +- content/functions/ismenucurrent.md | 6 +- .../getting-started/directory-structure.md | 2 +- content/getting-started/installing.md | 2 +- content/getting-started/quick-start.md | 2 +- .../hosting-on-github.md | 4 +- content/themes/creating.md | 2 +- content/variables/git.md | 51 +++++++ content/variables/hugo.md | 34 +++++ content/variables/menus.md | 45 ++++++ content/variables/other.md | 135 ------------------ content/variables/page.md | 2 +- content/variables/shortcodes.md | 31 ++++ content/variables/sitemap.md | 27 ++++ untitled | 0 20 files changed, 257 insertions(+), 159 deletions(-) create mode 100644 content/variables/git.md create mode 100644 content/variables/hugo.md create mode 100644 content/variables/menus.md delete mode 100644 content/variables/other.md create mode 100644 content/variables/shortcodes.md create mode 100644 content/variables/sitemap.md create mode 100644 untitled diff --git a/content/concept.md b/content/concept.md index 4bda8a534..8382c17a8 100644 --- a/content/concept.md +++ b/content/concept.md @@ -213,18 +213,18 @@ Site showcase has stayed more or less as is, including styling, etc. However... ### Press & Articles -* The press and article pages have been moved under "News" along with "Release Notes". Also, this whole section is lower on the navigation because it's less frequently visited---I'm assuming---than just about everything on the site. -* Like everything else, I've kept up with changes to the docs upstream on GitHub, but in this case, I also includes a [half dozen *new* articles as well](/news/press-and-articles/). +* The press and article pages have been moved under "News" along with "Release Notes". This section is lower on the navigation because it's less frequently visited than other areas (my assumption). +* Like everything else, I've kept up with changes to the docs upstream on GitHub, but in this case, I also included a [half dozen *new* articles as well](/news/press-and-articles/). ### About Hugo * Content is more or less the same, but I've cleaned up a lot of the language, and copy edited for consistency throughout. I've also added in some extra frills (e.g. resources that extoll and teach more about the benefits of SSGs on [/about/benefits](/about/benefits/)). -* Release notes are now in the "News" section, although I'm still iffy on this decision. I can gladly move this back into "About" to give it a higher degree of discoverability in the menu. +* Release notes are now in the "News" section, although I'm still unsure on this decision. I can gladly move this back into "About" to give it a higher degree of discoverability in the menu. ### Getting Started * **[[UPDATE 2017-03-12]]** - * The Quick Start need to be completely reworked; this could include a walkthrough of a new default theme (#) + * The Quick Start needs to be completely reworked; this could include a walkthrough of a new default theme (#) * ~~The [Quick Start][] has been completely updated for more consistent heading structure, etc. Also, **I may delete the "deployment" section of the Quick Start** since this a) adds unnecessary length, making the guide less "quick" and b) detracts from the new "hosting and deployment" section, which offers better advice, and c) is redundant with [Hosting on Github](https://hugodocsconcept.netlify.com/hosting-and-deployment/hosting-on-github/). For example, the Quick Start didn't mention that files already written to public are not necessarily erased at build time. This can cause problems with drafts. I think the other options—e.g. Arjen's Wercker tutorial—are more viable and represent better practices for newcomers to Hugo. If future versions of Hugo include baked-in deployment features, I think it's worth reconsidering adding the deployment step back to the Quick Start.~~ ### Content @@ -268,7 +268,7 @@ Themes section organization has only changed slightly in that the 6 content page * Cross-References. Added as its own page under Content Management (`/content-management/cross-references/`) * Custom robots.txt. Incorporated into [/templates/robots/](/templates/robots/) * Data Files and Data-Driven Content. Combined and incorporated into [/templates/data-templates/](/templates/data-templates/) - * GitInfo. Incorporated into [/variables/other/](/variables/other/) + * GitInfo. Incorporated into [/variables/git/](/variables/git/) * LiveReload. This doesn't really merits its own page. It's mentioned in features, usage, about, and elsewhere. * Menus. This is broken into [/content-management/menus/](/content-management/menus/) and [/templates/menu-templates/](/templates/menu-templates/) * Pagination. Now in [/templates/pagination/](/templates/pagination/) @@ -278,7 +278,7 @@ Themes section organization has only changed slightly in that the 6 content page * URLS. Now combined with permalinks and others as a heading/subsection of [/content-management/urls/](/content-management/urls/) * Syntax Highlighting. The shortcode is featured and explained with usage examples at [/content-management/shortcodes/](/content-management/shortcodes/), as well as expaned upon in it's own page under [/tools/syntax-highlighting/](/tools/syntax-highlighting/). I did this under the assumption that *developers* are most interested in adding code blocks to their content. * Table of Contents. This is now it's own page under [/content-management/toc](/content-management/toc/) and referenced in [/variables/page-variables](/variables/page/). - * Traversing Local Files. This is now split into [/templates/files/](/templates/files/) and variables delimited at [/variables/other/](/variables/other/). + * Traversing Local Files. This is now split into [/templates/files/](/templates/files/) and variables delimited at [/variables/files/](/variables/files/). ### Community @@ -416,7 +416,10 @@ Apache License - 60 * Page Variables - 20 * Taxonomy Variables - 30 * File Variables - 40 -* Other (Shortcode, Git, Menu, and Hugo vars) - 50 +* Menu Variables - 50 +* Hugo Variables - 60 +* Git Variables - 70 +* Sitemap Variables - 80 ### "themes" Ordering (`.OrderByWeight`) diff --git a/content/content-management/menus.md b/content/content-management/menus.md index 2f0a258c1..e59791cd1 100644 --- a/content/content-management/menus.md +++ b/content/content-management/menus.md @@ -36,7 +36,45 @@ If you make use of the [multilingual feature](/content-management/multilingual/) A menu entry has the following properties (i.e., variables) available to it: -{{< readfile file="content/readfiles/menuvars.md" markdown="true" >}} +`.URL` +: string + +`.Name` +: string + +`.Menu` +: string + +`.Identifier` +: string + +`.Pre` +: template.HTML + +`.Post` +: template.HTML + +`.Weight` +: int + +`.Parent` +: string + +`.Children` +: Menu + +Note that menus also have the following functions available as well: + +`.HasChildren` +: boolean + +Additionally, there are some relevant functions available to menus on a page: + +`.IsMenuCurrent` +: (menu string, menuEntry *MenuEntry ) boolean + +`.HasMenuCurrent` +: (menu string, menuEntry *MenuEntry) boolean ## Adding content to menus diff --git a/content/content-management/shortcodes.md b/content/content-management/shortcodes.md index 4d93e073c..8d3e4906d 100644 --- a/content/content-management/shortcodes.md +++ b/content/content-management/shortcodes.md @@ -46,7 +46,7 @@ The examples above use two different delimiters, the difference being the `%` ch ### Shortcodes with Markdown -The `%` character indicates that the shortcode's inner content---called in the [shortcode template](/templates/shortcode-templates/) with the [`.Inner` variable](/variables/other/)---needs further processing by the page's rendering processor (i.e. Markdown via Blackfriday). In the following example, Blackfriday would convert `**World**` to `World`: +The `%` character indicates that the shortcode's inner content---called in the [shortcode template](/templates/shortcode-templates/) with the [`.Inner` variable](/variables/shortcodes/)---needs further processing by the page's rendering processor (i.e. Markdown via Blackfriday). In the following example, Blackfriday would convert `**World**` to `World`: ```golang {{%/* myshortcode */%}}Hello **World!**{{%/* /myshortcode */%}} diff --git a/content/content-management/urls.md b/content/content-management/urls.md index 12646bb50..bf61b31e4 100644 --- a/content/content-management/urls.md +++ b/content/content-management/urls.md @@ -194,7 +194,7 @@ content/posts/post-1.md ## Ugly URLs -If you would like to have are often referred to as "ugly URLs" (e.g., http://example.com/extras/urls.html), set `uglyurls = true` or `uglyurls: true` to your site's `config.toml` or `config.yaml`, respectively. You can also use the `--uglyURLs=true` [flag from the command line][usage] with `hugo` or `hugo server`.. +If you would like to have are often referred to as "ugly URLs" (e.g., yoursite.com/urls.html), set `uglyurls = true` or `uglyurls: true` in your site's `config.toml` or `config.yaml`, respectively. You can also use the `--uglyURLs=true` [flag from the command line][usage] with `hugo` or `hugo server`.. If you want a specific piece of content to have an exact URL, you can specify this in the [front matter][] under the `url` key. The following are examples of the same content directory and what the eventual URL structure will be when Hugo runs with its default behavior. diff --git a/content/functions/haschildren.md b/content/functions/haschildren.md index ea48cb55e..82e8ce0a9 100644 --- a/content/functions/haschildren.md +++ b/content/functions/haschildren.md @@ -14,8 +14,9 @@ workson: [] hugoversion: relatedfuncs: [] deprecated: false -draft: true +draft: false aliases: [] +needsexamples: true --- -Use in [menu templates](/templates/menu-templates/). \ No newline at end of file +Used in [menu templates](/templates/menu-templates/). \ No newline at end of file diff --git a/content/functions/hasmenucurrent.md b/content/functions/hasmenucurrent.md index 51269140f..799704faf 100644 --- a/content/functions/hasmenucurrent.md +++ b/content/functions/hasmenucurrent.md @@ -8,14 +8,15 @@ publishdate: 2017-02-01 lastmod: 2017-02-01 categories: [functions] tags: [menus] -toc: signature: workson: [] hugoversion: relatedfuncs: [] deprecated: false -draft: true +toc: false +draft: false aliases: [] +needsexamples: true --- -**Needs examples?** \ No newline at end of file +Used in [menu templates](/templates/menu-templates/). diff --git a/content/functions/ismenucurrent.md b/content/functions/ismenucurrent.md index 9b2ea3d1a..b75928a43 100644 --- a/content/functions/ismenucurrent.md +++ b/content/functions/ismenucurrent.md @@ -13,6 +13,8 @@ workson: [] hugoversion: relatedfuncs: [] deprecated: false -draft: true +draft: false aliases: [] ---- \ No newline at end of file +--- + +Used in [menu templates](/templates/menu-templates/). \ No newline at end of file diff --git a/content/getting-started/directory-structure.md b/content/getting-started/directory-structure.md index cc87bb3ad..2c2a5db06 100644 --- a/content/getting-started/directory-structure.md +++ b/content/getting-started/directory-structure.md @@ -40,7 +40,7 @@ You can learn more about each component of a newly scaffolded site in its respec * [archetypes](/content-management/archetypes/) * [content](/content-management/organization/) * [layouts](/templates/) -* [static](/themes/creating-a-theme/) +* [static](/themes/creating/) * [themes](/themes/) diff --git a/content/getting-started/installing.md b/content/getting-started/installing.md index 9ecbb21e3..6500c6b72 100644 --- a/content/getting-started/installing.md +++ b/content/getting-started/installing.md @@ -461,7 +461,7 @@ Now that you've installed Hugo, read the [Quick Start guide][quickstart] and exp [Chocolatey]: https://chocolatey.org/ [highlight shortcode]: /content-management/shortcodes/#highlight [forum]: https://discuss.gohugo.io -[installgit]: (http://git-scm.com/) +[installgit]: http://git-scm.com/ [installgo]: https://golang.org/dl/ [Path Editor]: https://patheditor2.codeplex.com/ [pygments]: http://pygments.org diff --git a/content/getting-started/quick-start.md b/content/getting-started/quick-start.md index db57fd09b..072d4bac9 100644 --- a/content/getting-started/quick-start.md +++ b/content/getting-started/quick-start.md @@ -559,7 +559,7 @@ Here's what you should look into next: [bookurl]: https://www.amazon.com/Good-Great-Some-Companies-Others/dp/0066620996/ [bleaktheme]: http://themes.gohugo.io/bleak/ [configuration]: /getting-started/configuration/ -[createtheme]: /themes/creating-a-theme/ +[createtheme]: /themes/creating/ [datatemplates]: /templates/data-templates/ [forum]: https://discuss.gohugo.io [fm]: /content-management/front-matter/ diff --git a/content/hosting-and-deployment/hosting-on-github.md b/content/hosting-and-deployment/hosting-on-github.md index 7a8b331f8..b7f6adb2d 100644 --- a/content/hosting-and-deployment/hosting-on-github.md +++ b/content/hosting-and-deployment/hosting-on-github.md @@ -149,7 +149,7 @@ The other steps are the same as with the worktree approach. As mentioned [in this GitHub Help article](https://help.github.com/articles/user-organization-and-project-pages/), you can host a user/organization page in addition to project pages. Here are the key differences in GitHub Pages websites for Users and Organizations: -1. You must use the `username.github.io` naming scheme. +1. You must use the `.github.io` naming scheme. 2. Content from the `master` branch will be used to build and publish your GitHub Pages site. It becomes much simpler in this case: we'll create two separate repos, one for Hugo's content, and a git submodule with the `public` folder's content in it. @@ -192,7 +192,7 @@ cd .. ``` 7. `./deploy.sh "Your optional commit message"` to send changes to `.github.io` (careful, you may also want to commit changes on the `-hugo` repo). -That's it! Your personal page is running at [http://username.github.io/](http://username.github.io/)(after up to 10 minutes delay). +That's it! Your personal page is running (after up to 10 minutes delay). ## Using a Custom Domain diff --git a/content/themes/creating.md b/content/themes/creating.md index 46fb926dd..4126484c7 100644 --- a/content/themes/creating.md +++ b/content/themes/creating.md @@ -30,7 +30,7 @@ A theme consists of templates and static assets such as javascript and css files {{% note "Use the Hugo Generator Tag" %}} -The [`.Hugo.Generator`](/variables/other/) tag is included in all themes featured in the [Hugo Themes Showcase](http://themes.gohugo.io). We ask that you include the generator tag in all sites and themes you create with Hugo to help the core team track Hugo's usage and popularity. +The [`.Hugo.Generator`](/variables/hugo/) tag is included in all themes featured in the [Hugo Themes Showcase](http://themes.gohugo.io). We ask that you include the generator tag in all sites and themes you create with Hugo to help the core team track Hugo's usage and popularity. {{% /note %}} ## Layouts diff --git a/content/variables/git.md b/content/variables/git.md new file mode 100644 index 000000000..2707e8d2f --- /dev/null +++ b/content/variables/git.md @@ -0,0 +1,51 @@ +--- +title: Git Info Variables +linktitle: Git Variables +description: +date: 2017-03-12 +publishdate: 2017-03-12 +lastmod: 2017-03-12 +categories: [variables and params] +tags: [git] +draft: false +weight: 70 +aliases: [/extras/gitinfo/] +toc: false +wip: false +--- + +Hugo provides a way to integrate Git data into your website. + +{{% note "`.GitInfo` Performance Considerations" %}} +Hugo's Git integrations should be fairly performant but *can* increase your build time. This will depend on the size of your Git history. +{{% /note %}} + +## `.GitInfo` Prerequisites + +1. The Hugo site must be in a Git-enabled directory. +2. The Git executable must be installed and in your system `PATH`. +3. The `.GitInfo` feature must be enabled in your Hugo project by passing `--enableGitInfo` flag on the command line or by setting `enableGitInfo` to `true` in your [site's configuration file][configuration]. + +## The `.GitInfo` Object + +The `GitInfo` object contains the following fields: + +`.AbbreviatedHash` +: the abbreviated commit hash (e.g., `866cbcc`) + +`.AuthorName` +: the author's name, respecting `.mailmap` + +`.AuthorEmail` +: the author's email address, respecting `.mailmap` + +`.AuthorDate` +: the author date + +`.Hash` +: the commit hash (e.g., `866cbccdab588b9908887ffd3b4f2667e94090c3`) + +`.Subject` +: commit message subject (e.g., `tpl: Add custom index function`) + +[configuration]: /getting-started/configuration/ diff --git a/content/variables/hugo.md b/content/variables/hugo.md new file mode 100644 index 000000000..596c37b1f --- /dev/null +++ b/content/variables/hugo.md @@ -0,0 +1,34 @@ +--- +title: Hugo-specific Variables +linktitle: Hugo Variables +description: Hugo variables can be used in your templates to show metadata such as Hugo version and commit hashes. +date: 2017-03-12 +publishdate: 2017-03-12 +lastmod: 2017-03-12 +categories: [variables and params] +tags: [hugo,generator] +draft: false +weight: 60 +aliases: [] +toc: false +wip: false +--- + +The `.Hugo` variable provides easy access to Hugo-related data and contains the following fields: + +`.Hugo.Generator` +: ``` tag for the version of Hugo that generated the site. `.Hugo.Generator` outputs a *complete* HTML tag; e.g. `` + +`.Hugo.Version` +: the current version of the Hugo binary you are using e.g. `0.13-DEV`
+ +`.Hugo.CommitHash` +: the git commit hash of the current Hugo binary e.g. `0e8bed9ccffba0df554728b46c5bbf6d78ae5247` + +`.Hugo.BuildDate` +: the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00`
+ +{{% note "Use the Hugo Generator Tag" %}} +We highly recommend using `.Hugo.Generator` in your website's ``. `.Hugo.Generator` is included by default in all themes hosted on [themes.gohugo.io](http://themes.gohugo.io). The generator tag allows the Hugo team to track the usage and popularity of Hugo. +{{% /note %}} + diff --git a/content/variables/menus.md b/content/variables/menus.md new file mode 100644 index 000000000..73e9e2103 --- /dev/null +++ b/content/variables/menus.md @@ -0,0 +1,45 @@ +--- +title: Menu Variables +linktitle: Menu Variables +description: A menu entry in a menu template has specific variables and functions to make menu management easier. +date: 2017-03-12 +publishdate: 2017-03-12 +lastmod: 2017-03-12 +categories: [variables and params] +tags: [menus] +draft: false +weight: 50 +aliases: [/variables/menu/] +toc: false +--- + +A menu entry in a [menu template][] has the following properties: + +`.URL` +: string + +`.Name` +: string + +`.Menu` +: string + +`.Identifier` +: string + +`.Pre` +: template.HTML + +`.Post` +: template.HTML + +`.Weight` +: int + +`.Parent` +: string + +`.Children` +: Menu + +[menu template]: /templates/menu-templates/ \ No newline at end of file diff --git a/content/variables/other.md b/content/variables/other.md deleted file mode 100644 index 587c534b8..000000000 --- a/content/variables/other.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Shortcode, Git, Menu, and Hugo Variables -linktitle: Shortcode, Git, and Hugo Variables -description: Many of Hugo's additional features come with their own pre-packaged variables to keep your templating lightweight. -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 -categories: [variables and params] -tags: [shortcodes,git] -draft: false -weight: 50 -aliases: [/extras/gitinfo/,/variables/other-variables/] -toc: true -wip: false ---- - -## Shortcode Variables - -[Shortcodes][shortcodes] have access to parameters delimited in the shortcode declaration via [`.Get`][getfunction], page- and site-level variables, and also the following shortcode-specific fields: - -`.Parent` -: provides access to the parent shortcode context in nested shortcodes. This can be very useful for inheritance of common shortcode parameters from the root. - -`.IsNamedParams` -: boolean that returns `true` when the shortcode in question uses [named rather than positional parameters][shortcodes] - -`.Inner` -: represents the content between the opening and closing shortcode tags when a [closing shortcode][markdownshortcode] is used - -## Git Variables - -Hugo provides a way to integrate Git data into your website. - -{{% note "`.GitInfo` Performance Considerations" %}} -Hugo's Git integrations should be fairly performant but *can* increase your build time. This will depend on the size of your Git history. -{{% /note %}} - -### `.GitInfo` Prerequisites - -1. The Hugo site must be in a Git-enabled directory. -2. The Git executable must be installed and in your system `PATH`. -3. The `.GitInfo` feature must be enabled in your Hugo project by passing `--enableGitInfo` flag on the command line or by setting `enableGitInfo` to `true` in your [site's configuration file][configuration]. - -### The `.GitInfo` Object - -The `GitInfo` object contains the following fields: - -`.AbbreviatedHash` -: the abbreviated commit hash (e.g., `866cbcc`) - -`.AuthorName` -: the author's name, respecting `.mailmap` - -`.AuthorEmail` -: the author's email address, respecting `.mailmap` - -`.AuthorDate` -: the author date - -`.Hash` -: the commit hash (e.g., `866cbccdab588b9908887ffd3b4f2667e94090c3`) - -`.Subject` -: commit message subject (e.g., `tpl: Add custom index function`) - -## Hugo Variables - -The `.Hugo` variable provides easy access to Hugo-related data and contains the following fields: - -`.Hugo.Generator` -: ``` tag for the version of Hugo that generated the site. `.Hugo.Generator` outputs a *complete* HTML tag; e.g. `` - -`.Hugo.Version` -: the current version of the Hugo binary you are using e.g. `0.13-DEV`
- -`.Hugo.CommitHash` -: the git commit hash of the current Hugo binary e.g. `0e8bed9ccffba0df554728b46c5bbf6d78ae5247` - -`.Hugo.BuildDate` -: the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00`
- -{{% note "Use the Hugo Generator Tag" %}} -We highly recommend using `.Hugo.Generator` in your website's ``. `.Hugo.Generator` is included by default in all themes hosted on [themes.gohugo.io](http://themes.gohugo.io). The generator tag allows the Hugo team to track the usage and popularity of Hugo. -{{% /note %}} - -## Menu Variables - -A menu entry in a [menu template][] has the following properties: - -`.URL` -: string - -`.Name` -: string - -`.Menu` -: string - -`.Identifier` -: string - -`.Pre` -: template.HTML - -`.Post` -: template.HTML - -`.Weight` -: int - -`.Parent` -: string - -`.Children` -: Menu - -## Sitemap Variable - -A sitemap is a `Page` and therefore has all the [page variables][pagevars] available to use sitemap templates. They also have the following sitemap-specific variables available to them: - -`.Sitemap.ChangeFreq` -: the page change frequency - -`.Sitemap.Priority` -: the priority of the page - -`.Sitemap.Filename` -: the sitemap filename - - -[configuration]: /getting-started/configuration/ -[getfunction]: /functions/get/ -[markdownshortcode]: /content-management/shortcodes/#shortcodes-with-markdown -[menu template]: /templates/menu-templates/ -[shortcodes]: /templates/shortcode-templates/ \ No newline at end of file diff --git a/content/variables/page.md b/content/variables/page.md index 3620d5160..a6d449041 100644 --- a/content/variables/page.md +++ b/content/variables/page.md @@ -43,7 +43,7 @@ See [`.Scratch`](/functions/scratch/) for page-scoped, writable variables. : the approximate number of words in the content. `.Hugo` -: see [Hugo Variables](/variables/other/). +: see [Hugo Variables](/variables/hugo/). `.IsHome` : `true` in the context of the [home page](/templates/homepage/). diff --git a/content/variables/shortcodes.md b/content/variables/shortcodes.md new file mode 100644 index 000000000..ddea7d7e9 --- /dev/null +++ b/content/variables/shortcodes.md @@ -0,0 +1,31 @@ +--- +title: Shortcode Variables +linktitle: Shortcode Variables +description: Shortcodes can access page variables and also have their own specific built-in variables. +date: 2017-03-12 +publishdate: 2017-03-12 +lastmod: 2017-03-12 +categories: [variables and params] +tags: [shortcodes] +draft: false +weight: 20 +aliases: [] +toc: false +--- + +[Shortcodes][shortcodes] have access to parameters delimited in the shortcode declaration via [`.Get`][getfunction], page- and site-level variables, and also the following shortcode-specific fields: + +`.Parent` +: provides access to the parent shortcode context in nested shortcodes. This can be very useful for inheritance of common shortcode parameters from the root. + +`.IsNamedParams` +: boolean that returns `true` when the shortcode in question uses [named rather than positional parameters][shortcodes] + +`.Inner` +: represents the content between the opening and closing shortcode tags when a [closing shortcode][markdownshortcode] is used + +[getfunction]: /functions/get/ +[markdownshortcode]: /content-management/shortcodes/#shortcodes-with-markdown +[shortcodes]: /templates/shortcode-templates/ + + diff --git a/content/variables/sitemap.md b/content/variables/sitemap.md new file mode 100644 index 000000000..a3ae001e6 --- /dev/null +++ b/content/variables/sitemap.md @@ -0,0 +1,27 @@ +--- +title: Sitemap Variables +linktitle: Sitemap Variables +description: +date: 2017-03-12 +publishdate: 2017-03-12 +lastmod: 2017-03-12 +categories: [variables and params] +tags: [sitemap] +draft: false +weight: 80 +aliases: [] +toc: false +--- + +A sitemap is a `Page` and therefore has all the [page variables][pagevars] available to use sitemap templates. They also have the following sitemap-specific variables available to them: + +`.Sitemap.ChangeFreq` +: the page change frequency + +`.Sitemap.Priority` +: the priority of the page + +`.Sitemap.Filename` +: the sitemap filename + +[pagevars]: /variables/page/ \ No newline at end of file diff --git a/untitled b/untitled new file mode 100644 index 000000000..e69de29bb