Squashed 'docs/' changes from a4fa0d1d6..81847981f

81847981f Add notes for installing "extended" Sass/SCSS version
02da3bb58 Include usage of disqus internal template
9b53380c4 Update sitemap-template.md
f3417dd52 Update sitemap-template.md
aae33d9a8 Update sitemap-template.md
834edc205 Release 0.45.1
fb93ab905 Merge branch 'temp451'
79f350906 releaser: Prepare repository for 0.46-DEV
25cd2352c releaser: Add release notes to /docs for release of 0.45.1
e60377c71 releaser: Bump versions for release of 0.45.1
873f6dce2 Update features.md
ecc116642 Update link for Azure
cb88c3185 Added .Site.Home to Site Variiables (#541)
975a88791 Document includePaths
56c4e332f Release Hugo 0.45
c22b25210 Merge branch 'temp45'
0ffad3ada releaser: Prepare repository for 0.46-DEV
08d494cc3 releaser: Add release notes to /docs for release of 0.45
ad546ba45 releaser: Bump versions for release of 0.45
971c46bb2 Fixed "Sratch" to become "Scratch" on line 44
a28255bf3 Clarify the meaning of .Pages vs .Site.Pages
127aeee09 docs: Update ref, relref, GetPage docs
350d674ec resources.Concat doesn't have an alias
1fd1219b0 docs: Document refLinksErrorLevel and refLinksNotFoundURL
af2252ff6 Merge commit 'a3535c8486b2ce762b1a8a9c30b03985c3e02cee'
a11486805 Merge commit 'b6b37a1f00f808f3c0d2715f65ca2d3091f36495'
1c8896cb1 Fix addkit link to account for i18n
468aef3fc releaser: Prepare repository for 0.45-DEV
c6f4b97a2 releaser: Add release notes to /docs for release of 0.44
d3985afb7 releaser: Bump versions for release of 0.44
2c59a330c Adjust release notes
83966769a releaser: Prepare repository for 0.44-DEV
e539613f7 releaser: Add release notes to /docs for release of 0.43
2bf648944 releaser: Bump versions for release of 0.43
d9d6e4bf7 Fix typos
d6798afda Merge commit '98293eaa1570b5aff4452021c8b6d6c8560b3f06'
37cc52261 Add a newScratch template func
1f7f09613 Merge branch 'release-0.42.2'
857b0b26a releaser: Prepare repository for 0.43-DEV

git-subtree-dir: docs
git-subtree-split: 81847981f1f2cb1ebc83d42d275a2afb2bb22df1
This commit is contained in:
Bjørn Erik Pedersen 2018-08-01 10:01:05 +02:00
parent a3535c8486
commit 766085c2dc
43 changed files with 334 additions and 159 deletions

View file

@ -69,7 +69,7 @@ twitter = "GoHugoIO"
[params]
description = "The worlds fastest framework for building websites"
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
release = "0.44"
release = "0.45.1"
## Setting this to true will add a "noindex" to *EVERY* page on the site
removefromexternalsearch = false
## Gh repo for site footer (include trailing slash)

View file

@ -53,12 +53,13 @@ toc: true
* Integrated [Google Analytics][] support
* Automatic [RSS][] creation
* Support for [Go][], [Amber], and [Ace][] HTML templates
* [Syntax highlighting][] powered by [Pygments][]
* [Syntax highlighting][] powered by [Chroma][] (partly compatible with Pygments)
[Ace]: /templates/alternatives/
[aliases]: /content-management/urls/#aliases
[Amber]: https://github.com/eknkc/amber
[Chroma]: https://github.com/alecthomas/chroma
[content summaries]: /content-management/summaries/
[content types]: /content-management/types/
[Disqus]: https://disqus.com/
@ -77,7 +78,6 @@ toc: true
[Permalink]: /content-management/urls/#permalinks
[Powerful theming]: /themes/
[Pretty URLs]: /content-management/urls/
[Pygments]: http://pygments.org/
[RSS]: /templates/rss/
[Shortcodes]: /content-management/shortcodes/
[sort content]: /templates/

View file

@ -44,7 +44,7 @@ Hugo is for people building a blog, a company site, a portfolio site, documentat
[@spf13]: https://twitter.com/@spf13
[Aerobatic]: https://www.aerobatic.com/
[Amazon S3]: https://aws.amazon.com/s3/
[Azure]: https://blogs.msdn.microsoft.com/acoat/2016/01/28/publish-a-static-web-site-using-azure-web-apps/
[Azure]: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website
[CloudFront]: https://aws.amazon.com/cloudfront/ "Amazon CloudFront"
[DreamHost]: https://www.dreamhost.com/
[Firebase]: https://firebase.google.com/docs/hosting/ "Firebase static hosting"

View file

@ -41,7 +41,11 @@ For many websites, this is enough configuration. However, you also have the opti
### Render Hugo's Built-in Disqus Partial Template
See [Partial Templates][partials] to learn how to add the Disqus partial to your Hugo website's templates.
Disqus has its own [internal template](https://gohugo.io/templates/internal/#disqus) available, to render it add the following code where you want comments to appear:
```
{{ template "_internal/disqus.html" . }}
```
## Comments Alternatives

View file

@ -1,6 +1,6 @@
---
title: Links and Cross References
description: Hugo makes it easy to link documents together.
description: Shortcodes for creating links to documents.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-03-31
@ -16,114 +16,72 @@ toc: true
---
The `ref` and `relref` shortcodes link documents together, both of which are [built-in Hugo shortcodes][]. These shortcodes are also used to provide links to headings inside of your content, whether across documents or within a document. The only difference between `ref` and `relref` is whether the resulting URL is absolute (`http://1.com/about/`) or relative (`/about/`), respectively.
The `ref` and `relref` shortcode resolves the absolute or relative permalink given a path to a document.
## Use `ref` and `relref`
```
```go-html-template
{{</* ref "document.md" */>}}
{{</* ref "#anchor" */>}}
{{</* ref "document.md#anchor" */>}}
{{</* ref "/blog/my-post" */>}}
{{</* ref "/blog/my-post.md" */>}}
{{</* relref "document.md" */>}}
{{</* relref "#anchor" */>}}
{{</* relref "document.md#anchor" */>}}
```
The single parameter to `ref` is a string with a content `documentname` (e.g., `about.md`) with or without an appended in-document `anchor` (`#who`) without spaces.
The single parameter to `ref` is a string with a content `documentname` (e.g., `about.md`) with or without an appended in-document `anchor` (`#who`) without spaces. Hugo is flexible in how we search for documents, so the file suffix may be omitted.
### Document Names
**Paths without a leading `/` will first be tried resolved relative to the current page.**
The `documentname` is the name of a document, including the format extension; this may be just the filename, or the relative path from the `content/` directory. With a document `content/blog/post.md`, either format will produce the same result:
You will get an error if you document could not be uniquely resolved. The error behaviour can be configured, see below.
```
{{</* relref "blog/post.md" */>}} => `/blog/post/`
{{</* relref "post.md" */>}} => `/blog/post/`
### Link to another language version
Link to another language version of a document, you need to use this syntax:
```go-html-template
{{</* relref path="document.md" lang="jp" */>}}
```
If you have the same filename used across multiple sections, you should only use the relative path format; otherwise, the behavior will be `undefined`. This is best illustrated with an example `content` directory:
### Get another Output Format
```
.
└── content
├── events
│   └── my-birthday.md
├── galleries
│   └── my-birthday.md
├── meta
│   └── my-article.md
└── posts
└── my-birthday.md
```
To link to a given Output Format of a document, you can use this syntax:
To be sure to get the correct reference in this case, use the full path:
{{< code file="content/meta/my-article.md" copy="false" >}}
{{</* relref "events/my-birthday.md" */>}} => /events/my-birthday/
{{< /code >}}
### With Multiple Output Formats
If the page exists in multiple [output formats][], `ref` or `relref` can be used with a output format name:
```
[Neat]({{</* ref "blog/neat.md" "amp" */>}})
```go-html-template
{{</* relref path="document.md" outputFormat="rss" */>}}
```
### Anchors
When an `anchor` is provided by itself, the current pages unique identifier will be appended; when an `anchor` is provided appended to `documentname`, the found page's unique identifier will be appended:
```
```go-html-template
{{</* relref "#anchors" */>}} => #anchors:9decaf7
{{</* relref "about-hugo/hugo-features.md#content" */>}} => /blog/post/#who:badcafe
```
The above examples render as follows for this very page as well as a reference to the "Content" heading in the Hugo docs features pageyoursite
```
```go-html-template
{{</* relref "#who" */>}} => #who:9decaf7
{{</* relref "blog/post.md#who" */>}} => /blog/post/#who:badcafe
{{</* relref "/blog/post.md#who" */>}} => /blog/post/#who:badcafe
```
More information about document unique identifiers and headings can be found [below]({{< ref "#hugo-heading-anchors" >}}).
### Examples
* `{{</* ref "blog/post.md" */>}}` => `https://example.com/blog/post/`
* `{{</* ref "post.md#tldr" */>}}` => `https://example.com/blog/post/#tldr:caffebad`
* `{{</* relref "post.md" */>}}` => `/blog/post/`
* `{{</* relref "blog/post.md#tldr" */>}}` => `/blog/post/#tldr:caffebad`
* `{{</* ref "#tldr" */>}}` => `#tldr:badcaffe`
* `{{</* relref "#tldr" */>}}` => `#tldr:badcaffe`
## Ref and RelRef Configuration
## Hugo Heading Anchors
The behaviour can, since Hugo 0.45, be configured in `config.toml`:
When using Markdown document types, Hugo generates heading anchors automatically. The generated anchor for this section is `hugo-heading-anchors`. Because the heading anchors are generated automatically, Hugo takes some effort to ensure that heading anchors are unique both inside a document and across the entire site.
refLinksErrorLevel ("ERROR")
: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this logg level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
Ensuring heading uniqueness across the site is accomplished with a unique identifier for each document based on its path. Unless a document is renamed or moved between sections *in the filesystem*, the unique identifier for the document will not change: `blog/post.md` will always have a unique identifier of `81df004c333b392d34a49fd3a91ba720`.
refLinksNotFoundURL
: URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
`ref` and `relref` were added so you can make these reference links without having to know the documents unique identifier. (The links in document tables of contents are automatically up-to-date with this value.)
```
{{</* relref "content-management/cross-references.md#hugo-heading-anchors" */>}}
/content-management/cross-references/#hugo-heading-anchors:77cd9ea530577debf4ce0f28c8dca242
```
### Manually Specifying Anchors
For Markdown content files, if the `headerIds` [Blackfriday extension][bfext] is
enabled (which it is by default), user can manually specify the anchor for any
heading.
Few examples:
```
## Alpha 101 {#alpha}
## Version 1.0 {#version-1-dot-0}
```
[built-in Hugo shortcodes]: /content-management/shortcodes/#using-the-built-in-shortcodes
[lists]: /templates/lists/
[output formats]: /templates/output-formats/
[shortcode]: /content-management/shortcodes/

View file

@ -17,10 +17,10 @@ menu:
## The Image Page Resource
The `image` is a [Page Resource]({{< relref "content-management/page-resources" >}}), and the processing methods listed below does not work on images inside your `/static` folder.
The `image` is a [Page Resource]({{< relref "/content-management/page-resources" >}}), and the processing methods listed below does not work on images inside your `/static` folder.
To get all images in a [Page Bundle]({{< relref "content-management/organization#page-bundles" >}}):
To get all images in a [Page Bundle]({{< relref "/content-management/organization#page-bundles" >}}):
```go-html-template

View file

@ -231,7 +231,7 @@ By setting the `translationKey` front matter param to `about` in all three pages
Because paths and filenames are used to handle linking, all translated pages, except for the language part, will be sharing the same url.
To localize the URLs, the [`slug`]({{< ref "content-management/organization/index.md#slug" >}}) or [`url`]({{< ref "content-management/organization/index.md#url" >}}) front matter param can be set in any of the non-default language file.
To localize the URLs, the [`slug`]({{< ref "/content-management/organization/index.md#slug" >}}) or [`url`]({{< ref "/content-management/organization/index.md#url" >}}) front matter param can be set in any of the non-default language file.
For example, a french translation (`content/about.fr.md`) can have its own localized slug.

View file

@ -21,7 +21,7 @@ toc: true
Hugo `0.32` announced page-relative images and other resources packaged into `Page Bundles`.
These terms are connected, and you also need to read about [Page Resources]({{< relref "content-management/page-resources" >}}) and [Image Processing]({{< relref "content-management/image-processing" >}}) to get the full picture.
These terms are connected, and you also need to read about [Page Resources]({{< relref "/content-management/page-resources" >}}) and [Image Processing]({{< relref "/content-management/image-processing" >}}) to get the full picture.
{{% imgproc 1-featured Resize "300x" %}}
The illustration shows 3 bundles. Note that the home page bundle cannot contain other content pages, but other files (images etc.) are fine.

View file

@ -97,7 +97,7 @@ anywhere:
But you can get it by `.Site.GetPage`. Here is an example:
```go-html-template
{{ $headless := .Site.GetPage "page" "some-headless-bundle" }}
{{ $headless := .Site.GetPage "/some-headless-bundle" }}
{{ $reusablePages := $headless.Resources.Match "author*" }}
<h2>Authors</h2>
{{ range $reusablePages }}

View file

@ -1,6 +1,6 @@
---
title: .GetPage
description: "Gets a `Page` of a given `Kind` and `path`."
description: "Gets a `Page` of a given `path`."
godocref:
date: 2017-02-01
publishdate: 2017-02-01
@ -10,7 +10,7 @@ menu:
docs:
parent: "functions"
keywords: [sections,lists,indexes]
signature: [".GetPage KIND PATH"]
signature: [".GetPage PATH"]
workson: []
hugoversion:
relatedfuncs: []
@ -18,35 +18,42 @@ deprecated: false
aliases: []
---
Every `Page` has a [`Kind` attribute][page_kinds] that shows what kind of page it is. While this attribute can be used to list pages of a certain `kind` using `where`, often it can be useful to fetch a single page by its path.
`.GetPage` returns a page of a given `Kind` and `path`.
`.GetPage` returns a page of a given `path`. Both `Site` and `Page` implements this method. The `Page` variant will, if given a relative path -- i.e. a path without a leading `/` -- try look for the page relative to the current page.
{{% note %}}
If the `path` is `"foo/bar.md"`, it can be written as exactly that, or broken up
into multiple strings as `"foo" "bar.md"`.
**Note:** We overhauled and simplified the `.GetPage` API in Hugo 0.45. Before that you needed to provide a `Kind` attribute in addition to the path, e.g. `{{ .Site.GetPage "section" "blog" }}`. This will still work, but is now superflous.
{{% /note %}}
```
{{ with .Site.GetPage "section" "blog" }}{{ .Title }}{{ end }}
```go-html-template
{{ with .Site.GetPage "/blog" }}{{ .Title }}{{ end }}
```
This method wil return `nil` when no page could be found, so the above will not print anything if the blog section is not found.
For a regular page (whose `Kind` is `page`):
To fund a regular page in the blog section::
```
{{ with .Site.GetPage "page" "blog/my-post.md" }}{{ .Title }}{{ end }}
```go-html-template
{{ with .Site.GetPage "/blog/my-post.md" }}{{ .Title }}{{ end }}
```
Note that the `path` can also be supplied like this, where the slash-separated
path elements are added as separate strings:
And since `Page` also provides a `.GetPage` method, the above is the same as:
```
{{ with .Site.GetPage "page" "blog" "my-post.md" }}{{ .Title }}{{ end }}
```go-html-template
{{ with .Site.GetPage "/blog" }}
{{ with .GetPage "my-post.md" }}{{ .Title }}{{ end }}
{{ end }}
```
## `.GetPage` Example
## .GetPage and Multilingual Sites
The previous examples have used the full content filename to lookup the post. Depending on how you have organized your content (whether you have the language code in the file name or not, e.g. `my-post.en.md`), you may want to do the lookup without extension. This will get you the current language's version of the page:
```go-html-template
{{ with .Site.GetPage "/blog/my-post" }}{{ .Title }}{{ end }}
```
## .GetPage Example
This code snippet---in the form of a [partial template][partials]---allows you to do the following:
@ -57,7 +64,7 @@ This code snippet---in the form of a [partial template][partials]---allows you t
{{< code file="grab-top-two-tags.html" >}}
<ul class="most-popular-tags">
{{ $t := .Site.GetPage "taxonomyTerm" "tags" }}
{{ $t := .Site.GetPage "/tags" }}
{{ range first 2 $t.Data.Terms.ByCount }}
<li>{{ . }}</li>
{{ end }}

View file

@ -22,6 +22,9 @@ aliases: [/extras/scratch/,/doc/scratch/]
In most cases you can do okay without `Scratch`, but due to scoping issues, there are many use cases that aren't solvable in Go Templates without `Scratch`'s help.
`.Scratch` is available as methods on `Page` and `Shortcode`. Since Hugo 0.43 you can also create a locally scoped `Scratch` using the template func `newScratch`.
{{% note %}}
See [this Go issue](https://github.com/golang/go/issues/10608) for the main motivation behind Scratch.
{{% /note %}}
@ -39,7 +42,7 @@ $scratch := newScratch
$scratch.Set "greeting" "Hello"
```
A `Scratch` is also added to both `Page` and `Shortcode`. `Sratch` have the following methods:
A `Scratch` is also added to both `Page` and `Shortcode`. `Scratch` has the following methods:
#### .Set

View file

@ -183,6 +183,12 @@ related
relativeURLs (false)
: Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.
refLinksErrorLevel ("ERROR")
: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this logg level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
refLinksNotFoundURL
: URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
rssLimit (unlimited)
: Maximum number of items in the RSS feed.

View file

@ -34,7 +34,7 @@ Hugo currently provides pre-built binaries for the following:
* OpenBSD
* FreeBSD
Hugo may also be compiled from source wherever the Go compiler tool chain can run; e.g., on other operating systems such as DragonFly BSD, OpenBSD, Plan&nbsp;9, Solaris, and others. See <https://golang.org/doc/install/source> for the full set of supported combinations of target operating systems and compilation architectures.
Hugo may also be compiled from source wherever the Go toolchain can run; e.g., on other operating systems such as DragonFly BSD, OpenBSD, Plan&nbsp;9, Solaris, and others. See <https://golang.org/doc/install/source> for the full set of supported combinations of target operating systems and compilation architectures.
## Quick Install
@ -82,9 +82,11 @@ go get github.com/magefile/mage
go get -d github.com/gohugoio/hugo
cd ${GOPATH:-$HOME/go}/src/github.com/gohugoio/hugo
mage vendor
mage install
HUGO_BUILD_TAGS=extended mage install
{{< /code >}}
Remove `HUGO_BUILD_TAGS=extended` if you do not want Sass/SCSS support.
{{% note %}}
If you are a Windows user, substitute the `$HOME` environment variable above with `%USERPROFILE%`.
{{% /note %}}
@ -420,50 +422,43 @@ Directory of C:\hugo\sites\example.com
### Snap Package
In any of the [Linux distributions that support snaps][snaps]:
In any of the [Linux distributions that support snaps][snaps], you may install install the "extended" Sass/SCSS version with this command:
```
snap install hugo
```
snap install hugo --channel=extended
### Debian and Ubuntu
To install the non-extended version without Sass/SCSS support:
Debian and Ubuntu provide a `hugo` version via `apt-get`:
snap install hugo
```
sudo apt-get install hugo
```
#### Pros
* Native Debian/Ubuntu package maintained by Debian Developers
* Pre-installed bash completion script and `man` pages
#### Cons
* Might not be the latest version, especially if you are using an older, stable version (e.g., Ubuntu 16.04 LTS). Until backports and PPA are available, you may consider installing the Hugo snap package to get the latest version of Hugo.
To switch between the two, use either `snap refresh hugo --channel=extended` or `snap refresh hugo --channel=stable`.
{{% note %}}
Hugo-as-a-snap can write only inside the users `$HOME` directory---and gvfs-mounted directories owned by the user---because of Snaps confinement and security model. More information is also available [in this related GitHub issue](https://github.com/gohugoio/hugo/issues/3143). Use ```sudo snap install hugo --classic``` to disable the default security model if you want hugo to be able to have write access in other paths besides the users `$HOME` directory.
{{% /note %}}
### Debian and Ubuntu
[@anthonyfok](https://github.com/anthonyfok) and friends in the [Debian Go Packaging Team](https://go-team.pages.debian.net/) maintains an official hugo [Debian package](https://packages.debian.org/hugo) which is shared with [Ubuntu](https://packages.ubuntu.com/hugo) and is installable via `apt-get`:
sudo apt-get install hugo
This installs the "extended" Sass/SCSS version.
### Arch Linux
You can also install Hugo from the Arch Linux [community](https://www.archlinux.org/packages/community/x86_64/hugo/) repository. Applies also for derivatives such as Manjaro.
You can also install Hugo from the Arch Linux [community](https://www.archlinux.org/packages/community/x86_64/hugo/) repository. Applies also to derivatives such as Manjaro.
```
sudo pacman -Syu hugo
```
### Fedora
### Fedora, Red Hat and CentOS
Fedora provides a package for Hugo. The installation is done with the command :
Fedora maintains an [official package for Hugo](https://apps.fedoraproject.org/packages/hugo) which may be installed with:
```
sudo dnf install hugo
```
sudo dnf install hugo
### CentOS, and Red Hat
For the latest version, the Hugo package maintained by [@daftaupe](https://github.com/daftaupe) at Fedora Copr is recommended:
* <https://copr.fedorainfracloud.org/coprs/daftaupe/hugo/>
@ -471,11 +466,10 @@ See the [related discussion in the Hugo forums][redhatforum].
## OpenBSD
OpenBSD provides a package for Hugo via `pkg_add`:
OpenBSD provides a package for Hugo via `pkg_add`:
doas pkg_add hugo
```
doas pkg_add hugo
```
## Upgrade Hugo

View file

@ -43,7 +43,7 @@ For improved readability, the Hugo Pipes examples of this documentation will be
### Method aliases
Each Hugo Pipes `resources` transformation method uses a __camelCased__ alias (`toCSS` for `resources.ToCSS`).
Non-transformation methods deprived of such aliases are `resources.Get`, `resources.FromString` and `resources.ExecuteAsTemplate`.
Non-transformation methods deprived of such aliases are `resources.Get`, `resources.FromString`, `resources.ExecuteAsTemplate` and `resources.Concat`.
The example above can therefore also be written as follows:
```go-html-template

View file

@ -36,7 +36,10 @@ precision [int]
enableSourceMap [bool]
: When enabled, a source map will be generated.
includePaths [string slice]
: Additional SCSS/SASS include paths. Paths must be relative to the project directory.
```go-html-template
{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "node_modules/myscss")) }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}
```
```

View file

@ -82,7 +82,7 @@ Hugo now has:
* Add a `GetPage` to the site benchmarks [a1956391](https://github.com/gohugoio/hugo/commit/a19563910eec5fed08f3b02563b9a7b38026183d) [@bep](https://github.com/bep)
* Add headless bundle support [0432c64d](https://github.com/gohugoio/hugo/commit/0432c64dd22e4610302162678bb93661ba68d758) [@bep](https://github.com/bep) [#4311](https://github.com/gohugoio/hugo/issues/4311)
* Merge matching resources params maps [5a0819b9](https://github.com/gohugoio/hugo/commit/5a0819b9b5eb9e79826cfa0a65f235d9821b1ac4) [@bep](https://github.com/bep) [#4315](https://github.com/gohugoio/hugo/issues/4315)
* Add some general code contribution criterias [78c86330](https://github.com/gohugoio/hugo/commit/78c863305f337ed4faf3cf0a23675f28b0ae5641) [@bep](https://github.com/bep)
* Add some general code contribution criteria [78c86330](https://github.com/gohugoio/hugo/commit/78c863305f337ed4faf3cf0a23675f28b0ae5641) [@bep](https://github.com/bep)
* Tighten page kind logic, introduce tests [8125b4b0](https://github.com/gohugoio/hugo/commit/8125b4b03d10eb73f8aea3f9ea41172aba8df082) [@vassudanagunta](https://github.com/vassudanagunta)
## Fixes

View file

@ -25,7 +25,7 @@ You would experience errors of type:
png: invalid format: not enough pixel data
```
This commit fixes that by adding a mutex per image. This should also improve the performance, sligthly, as it avoids duplicate work.
This commit fixes that by adding a mutex per image. This should also improve the performance, slightly, as it avoids duplicate work.
The current workaround before this fix is to always operate on the original:

View file

@ -9,6 +9,8 @@ images:
---
This is a bug-fix release with two fixes:
* Reset the global pages cache on server rebuilds [128f14ef](https://github.com/gohugoio/hugo/commit/128f14efad90886ffef37c01ac1e20436a732f97) [@bep](https://github.com/bep) [#4845](https://github.com/gohugoio/hugo/issues/4845)

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View file

@ -0,0 +1,107 @@
---
date: 2018-07-22
title: "Hugo 0.45: Revival of ref, relref and GetPage"
description: "Hugo 0.45 adds relative page lookups, language support in ref/relref and several Hugo Pipes improvements."
categories: ["Releases"]
---
Hugo `0.45` is the **revival of ref, relref and GetPage**. [@vassudanagunta](https://github.com/vassudanagunta) and [@bep](https://github.com/bep) have done some great work improving the API and implementation for the helper functions used to **get one page**. Before this release, the API was a little bit clumsy and the result potentially ambiguous in some situations.
Now you can simply do:
```go-html-template
{{ with .Site.GetPage "/blog/my-post.md" }}{{ .Title }}{{ end }}
```
Or to get a section page:
```go-html-template
{{ with .Site.GetPage "/blog" }}{{ .Title }}{{ end }}
```
We have also added a `.GetPage` method on `Page` and added support for page-relative linking. This means that the leading slash (`/`) now has a meaning. For `.Site.GetPage`, all lookups will start at the content root. But for lookups with a `Page` context, paths without a leading slash will be treated as relative to the page.
This means that the following example will find the page in the current section:
```go-html-template
{{</* ref "my-post.md" */>}}
```
You can also use the `..` to refer to a page one level up etc.:
```go-html-template
{{</* ref "../my-post.md" */>}}
```
We have now also added language support to `ref` and `relref`, so you can link to a page in another language:
```go-html-template
{{</* relref path="document.md" lang="jp" */>}}
```
To link to a given Output Format of a document, you can use this syntax:
```go-html-template
{{</* relref path="document.md" outputFormat="rss" */>}}
```
To make working with these reflinks on bigger sites easier to work with, we have also improved the error logging, and added two new configuration settings:
* refLinksErrorLevel: ERROR (default, will fail the build when a reflink cannot be resolved) or WARNING.
* refLinksNotFoundURL: Set this to an URL placeholder used when no reference could be resolved.
Visit the [Hugo Docs](https://gohugo.io/content-management/cross-references) for more information.
We have also done some important improvements and fixes in **Hugo Pipes** in this release: SCSS source maps on Windows now works, we now support project-local `PostCSS` installation, and we have added `IncludePaths` to `SCSS` options, making it possible to include, say, a path below `node_modules` in the SASS/SCSS build.
This release represents **31 contributions by 4 contributors** to the main Hugo code base.
[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@vassudanagunta](https://github.com/vassudanagunta), [@hairmare](https://github.com/hairmare), and [@garrmcnu](https://github.com/garrmcnu) for their ongoing contributions.
And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the themes site in pristine condition and to [@kaushalmodi](https://github.com/kaushalmodi) for his great work on the documentation site.
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
which has received **10 contributions by 8 contributors**. A special thanks to [@kaushalmodi](https://github.com/kaushalmodi), [@Hanzei](https://github.com/Hanzei), [@KurtTrowbridge](https://github.com/KurtTrowbridge), and [@regisphilibert](https://github.com/regisphilibert) for their work on the documentation site.
Hugo now has:
* 27334+ [stars](https://github.com/gohugoio/hugo/stargazers)
* 443+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
* 238+ [themes](http://themes.gohugo.io/)
## Notes
* `.Site.GetPage` with more than 2 arguments will not work anymore. This means that `{{ .Site.GetPage "page" "blog" "my-post.md" }}` will fail. `{{ .Site.GetPage "page" "blog/my-post.md" }}` will work, but we recommend you use the simpler `{{ .Site.GetPage "/blog/my-post.md" }}`
* Relative paths in `relref` or `ref` that finds its match not relative to the page itself will work, but we now print a warning saying that you should correct it to an absolute path. E.g. `{{</* ref "blog/my-post.md" */>}}` => `{{</* ref "/blog/my-post.md" */>}}`.
## Enhancements
* Print a WARNING about relative non-relative ref/relref matches [a451c49f](https://github.com/gohugoio/hugo/commit/a451c49fde1da6e2cc436a2b7d383ee772b1f893) [@bep](https://github.com/bep) [#4973](https://github.com/gohugoio/hugo/issues/4973)
* Allow untyped nil to be merged in lang.Merge [ff16c42e](https://github.com/gohugoio/hugo/commit/ff16c42ed0965e1c8acf6e6a6dcda3ea50c107f2) [@bep](https://github.com/bep) [#4977](https://github.com/gohugoio/hugo/issues/4977)
* Get rid of the utils package [062510cf](https://github.com/gohugoio/hugo/commit/062510cf1f7b79aed2efe88c5b9340d009bdec0e) [@bep](https://github.com/bep)
* Update hugo_windows.go [4e1d0cd9](https://github.com/gohugoio/hugo/commit/4e1d0cd9f1d43d133d669a019a84117cadd41955) [@bep](https://github.com/bep)
* Add IncludePaths config option [166483fe](https://github.com/gohugoio/hugo/commit/166483fe1227b0c59c6b4d88cfdfaf7d7b0d79c5) [@bep](https://github.com/bep) [#4921](https://github.com/gohugoio/hugo/issues/4921)
* Increase refLinker test coverage [8278384b](https://github.com/gohugoio/hugo/commit/8278384b9680cfdcecef9c668638ad483012857f) [@vassudanagunta](https://github.com/vassudanagunta)
* Add test coverage for recent ref overhaul [2bac3715](https://github.com/gohugoio/hugo/commit/2bac3715448e90e197ada7cc73c87f696c19def6) [@vassudanagunta](https://github.com/vassudanagunta) [#4969](https://github.com/gohugoio/hugo/issues/4969)
* Update ref, relref, GetPage docs [1eb8b36b](https://github.com/gohugoio/hugo/commit/1eb8b36b3802e72bc2c16965461ef1899bb073b3) [@bep](https://github.com/bep)
* Document refLinksErrorLevel and refLinksNotFoundURL [00c74ee7](https://github.com/gohugoio/hugo/commit/00c74ee7ffae71fd5f47d555160354a775e26151) [@bep](https://github.com/bep) [#4964](https://github.com/gohugoio/hugo/issues/4964)
* Add configurable ref/relref error handling and notFoundURL [e25aa655](https://github.com/gohugoio/hugo/commit/e25aa655f4227ac064be5fe770d517a80acd46b2) [@bep](https://github.com/bep) [#4964](https://github.com/gohugoio/hugo/issues/4964)
* Try node_modules/postcss-cli/bin/postcss first [ebe4d39f](https://github.com/gohugoio/hugo/commit/ebe4d39f175f73e4f130972cb3d74ef0af5d5761) [@bep](https://github.com/bep) [#4952](https://github.com/gohugoio/hugo/issues/4952)
* Add optional lang as argument to rel/relref [d741064b](https://github.com/gohugoio/hugo/commit/d741064bebe2f4663a7ba12556dccc3dffe08629) [@bep](https://github.com/bep) [#4956](https://github.com/gohugoio/hugo/issues/4956)
* Simplify .Site.GetPage etc. [3eb313fe](https://github.com/gohugoio/hugo/commit/3eb313fef495a39731dafa6bddbf77760090230d) [@bep](https://github.com/bep) [#4147](https://github.com/gohugoio/hugo/issues/4147)[#4727](https://github.com/gohugoio/hugo/issues/4727)[#4728](https://github.com/gohugoio/hugo/issues/4728)[#4728](https://github.com/gohugoio/hugo/issues/4728)[#4726](https://github.com/gohugoio/hugo/issues/4726)[#4652](https://github.com/gohugoio/hugo/issues/4652)
* Unify page lookups [b93417aa](https://github.com/gohugoio/hugo/commit/b93417aa1d3d38a9e56bad25937e0e638a113faf) [@vassudanagunta](https://github.com/vassudanagunta) [#4147](https://github.com/gohugoio/hugo/issues/4147)[#4727](https://github.com/gohugoio/hugo/issues/4727)[#4728](https://github.com/gohugoio/hugo/issues/4728)[#4728](https://github.com/gohugoio/hugo/issues/4728)[#4726](https://github.com/gohugoio/hugo/issues/4726)[#4652](https://github.com/gohugoio/hugo/issues/4652)
* Improve error message [4c240800](https://github.com/gohugoio/hugo/commit/4c240800a4275244c9e0847cd6707383180f1ac3) [@bep](https://github.com/bep)
* Remove unused code [2f2bc7ff](https://github.com/gohugoio/hugo/commit/2f2bc7ff70b90fb11580cc092ef3883bf68d8ad7) [@bep](https://github.com/bep)
## Fixes
* Avoid server panic on TOML mistake in i18n [75acff5f](https://github.com/gohugoio/hugo/commit/75acff5f20d0d41ffa1ae20402001c7a82f077cb) [@bep](https://github.com/bep) [#4942](https://github.com/gohugoio/hugo/issues/4942)
* Only set 'allThemes' if there are themes in the config file [38204c4a](https://github.com/gohugoio/hugo/commit/38204c4ab6fa2aa2ab8bd06ddb3e07b66e5f9646) [@garrmcnu](https://github.com/garrmcnu) [#4851](https://github.com/gohugoio/hugo/issues/4851)
* Fix potential server panic with drafts/future enabled [1ab4658c](https://github.com/gohugoio/hugo/commit/1ab4658c0d5ea2927f04bd748206e5b139a6326e) [@bep](https://github.com/bep) [#4965](https://github.com/gohugoio/hugo/issues/4965)
* Mark shortcode changes as content changes in server mode [12679b40](https://github.com/gohugoio/hugo/commit/12679b408362a93a3c6159588d6291a3b7ed5548) [@bep](https://github.com/bep) [#4965](https://github.com/gohugoio/hugo/issues/4965)
* Fix source maps on Windows [f01505c9](https://github.com/gohugoio/hugo/commit/f01505c910a325acc18742ac6b3637aa01975e37) [@bep](https://github.com/bep) [#4968](https://github.com/gohugoio/hugo/issues/4968)
* Fix typo-logic bug in GetPage [b56d9a12](https://github.com/gohugoio/hugo/commit/b56d9a1294e692d096bff442e0b1fec61a8c2b0f) [@vassudanagunta](https://github.com/vassudanagunta)
* Enable test case fixed by commit 501543d4 [d6fde8fa](https://github.com/gohugoio/hugo/commit/d6fde8fa131f3852fa98a8ec5c360e736486cf54) [@vassudanagunta](https://github.com/vassudanagunta)
* Fix theme config for Work Fs [5c9d5413](https://github.com/gohugoio/hugo/commit/5c9d5413a4e2cc8d44a8b2d7dff04e6523ba2a29) [@bep](https://github.com/bep) [#4951](https://github.com/gohugoio/hugo/issues/4951)
* Fix addkit link to account for i18n [fd1f4a78](https://github.com/gohugoio/hugo/commit/fd1f4a7860c4b989865b47c727239cf924a52fa4) [@hairmare](https://github.com/hairmare)

View file

@ -0,0 +1,26 @@
---
date: 2018-07-25
title: "Hugo 0.45.1: Two Bug Fixes"
description: "Hugo 0.45.1 comes with two bug fixes ... and one enhancement."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
---
This is a bug-fix release with a couple of important fixes (and one enhancement).
## Enhancements
* Add Page.FirstSection [016dd4a6](https://github.com/gohugoio/hugo/commit/016dd4a69a765061bb3da8490d3cac6ec47a91eb) [@bep](https://github.com/bep)
## Fixes
* Fix .Site.GetPage regression [04d4c08d](https://github.com/gohugoio/hugo/commit/04d4c08dbcac08ff7feeb88863e91799fed0937b) [@bep](https://github.com/bep) [#4989](https://github.com/gohugoio/hugo/issues/4989)
* Fix "borrow content from another language" issue [c6b599a0](https://github.com/gohugoio/hugo/commit/c6b599a06d66b8e3c92343d25bb8043eb4f291f1) [@bep](https://github.com/bep) [#4986](https://github.com/gohugoio/hugo/issues/4986)

View file

@ -0,0 +1,9 @@
| Variable | Current context | Pages included |
|----------------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `.Site.Pages` | **any** page | ALL pages of the site: content, sections, taxonomies, etc. -- Superset of everything! |
| `.Site.RegularPages` | **any** page | Only regular (content) pages -- Subset of `.Site.Pages` |
| `.Pages` | _List_ page | Regular pages under that _list_ page representing the homepage, section, taxonomy term (`/tags`) or taxonomy (`/tags/foo`) page -- Subset of `.Site.Pages` or `.Site.RegularPages`, depending on context. |
| `.Pages` | _Single_ page | empty slice |
Note
: In the **home** context (`index.html`), `.Pages` is the same as `.Site.RegularPages`.

View file

@ -35,18 +35,35 @@ A sitemap is a `Page` and therefore has all the [page variables][pagevars] avail
If provided, Hugo will use `/layouts/sitemap.xml` instead of the internal `sitemap.xml` template that ships with Hugo.
## Sitemap Templates
Hugo has built-on Sitemap templates, but you can provide your own if needed, in either `layouts/sitemap.xml` or `layouts/_default/sitemap.xml`.
For multilingual sites, we also create a Sitemap index. You can provide a custom layout for that in either `layouts/sitemapindex.xml` or `layouts/_default/sitemapindex.xml`.
## Hugos sitemap.xml
This template respects the version 0.9 of the [Sitemap Protocol](http://www.sitemaps.org/protocol.html).
```
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ range .Pages }}
```xml
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
<xhtml:link
rel="alternate"
hreflang="{{ .Lang }}"
href="{{ .Permalink }}"
/>{{ end }}
<xhtml:link
rel="alternate"
hreflang="{{ .Lang }}"
href="{{ .Permalink }}"
/>{{ end }}
</url>
{{ end }}
</urlset>
@ -59,6 +76,23 @@ on render. Please don't include this in the template as it's not valid HTML.
`<?xml version="1.0" encoding="utf-8" standalone="yes" ?>`
{{% /note %}}
## Hugo's sitemapindex.xml
This is used to create a Sitemap index in multilingual mode:
```xml
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ range . }}
<sitemap>
<loc>{{ .SitemapAbsURL }}</loc>
{{ if not .LastChange.IsZero }}
<lastmod>{{ .LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod>
{{ end }}
</sitemap>
{{ end }}
</sitemapindex>
```
## Configure `sitemap.xml`
Defaults for `<changefreq>`, `<priority>` and `filename` values can be set in the site's config file, e.g.:
@ -72,4 +106,6 @@ Defaults for `<changefreq>`, `<priority>` and `filename` values can be set in th
The same fields can be specified in an individual content file's front matter in order to override the value assigned to that piece of content at render time.
[pagevars]: /variables/page/

View file

@ -30,11 +30,11 @@ The following starter kits are developed by active members of the Hugo community
* [Atlas][]. Atlas is a Hugo boilerplate designed to speed up development with support for Netlify, Netlify CMS, Gulp, Linting, SCSS, ES6 & more. It's actively maintained and contributions are always welcome.
[addkit]: https://github.com/gohugoio/hugo/edit/master/docs/content/tools/starter-kits.md
[addkit]: https://github.com/gohugoio/hugo/edit/master/docs/content/en/tools/starter-kits.md
[amp]: https://www.ampproject.org/
[Blaupause]: https://github.com/fspoettel/blaupause
[GOHUGO AMP]: https://github.com/wildhaber/gohugo-amp
[gohugodocs]: https://gohugo-amp.gohugohq.com/
[hugulp]: https://github.com/jbrodriguez/hugulp
[Victor Hugo]: https://github.com/netlify/victor-hugo
[Atlas]: https://github.com/indigotree/atlas
[Atlas]: https://github.com/indigotree/atlas

View file

@ -108,4 +108,4 @@ the memory usage per step, and the total memory allocations per step.
To enable *step analysis*, use the `--stepAnalysis` option when running Hugo.
[partialCached]:{{< ref "functions/partialCached.md" >}}
[partialCached]:{{< ref "/functions/partialCached.md" >}}

View file

@ -106,9 +106,8 @@ See also `.ExpiryDate`, `.Date`, `.PublishDate`, and [`.GitInfo`][gitinfo].
: contains all formats, including the current format, for a given page. Can be combined the with [`.Get` function](/functions/get/) to grab a specific format. (See [Output Formats](/templates/output-formats/).)
.Pages
: a collection of associated pages. `.Pages` is an alias for
`.Data.Pages`. This value will be `nil` within the context of
regular content pages.
: a collection of associated pages. This value will be `nil` within
the context of regular content pages. See [`.Pages`](#pages).
.Permalink
: the Permanent link for this page; see [Permalinks](/content-management/urls/)
@ -187,6 +186,15 @@ Also see [Sections](/content-management/sections/).
{{< readfile file="/content/en/readfiles/sectionvars.md" markdown="true" >}}
## The `.Pages` Variable {#pages}
`.Pages` is an alias to `.Data.Pages`. It is conventional to use the
aliased form `.Pages`.
### `.Pages` compared to `.Site.Pages`
{{< readfile file="/content/en/readfiles/pages-vs-site-pages.md" markdown="true" >}}
## Page-level Params
Any other value defined in the front matter in a content file, including taxonomies, will be made available as part of the `.Params` variable.

View file

@ -49,6 +49,9 @@ The following is a list of site-level (aka "global") variables. Many of these va
.Site.GoogleAnalytics
: a string representing your tracking code for Google Analytics as defined in the site configuration.
.Site.Home
: reference to the homepage's [page object](https://gohugo.io/variables/page/)
.Site.IsMultiLingual
: whether there are more than one language in this site. See [Multilingual](/content-management/multilingual/) for more information.
@ -83,13 +86,13 @@ The following is a list of site-level (aka "global") variables. Many of these va
: all of the menus in the site.
.Site.Pages
: array of all content ordered by Date with the newest first. This array contains only the pages in the current language.
: array of all content ordered by Date with the newest first. This array contains only the pages in the current language. See [`.Site.Pages`](#site-pages).
.Site.Permalinks
: a string to override the default [permalink](/content-management/urls/) format as defined in the site configuration.
.Site.RegularPages
: a shortcut to the *regular* page collection. `.Site.RegularPages` is equivalent to `where .Site.Pages "Kind" "page"`.
: a shortcut to the *regular* page collection. `.Site.RegularPages` is equivalent to `where .Site.Pages "Kind" "page"`. See [`.Site.Pages`](#site-pages).
.Site.RSSLink
: the URL for the site RSS.
@ -125,4 +128,13 @@ You can use `.Site.Params` in a [partial template](/templates/partials/) to call
<meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
{{< /code >}}
## The `.Site.Pages` Variable {#site-pages}
### `.Site.Pages` compared to `.Pages`
{{< readfile file="/content/en/readfiles/pages-vs-site-pages.md" markdown="true" >}}
[config]: /getting-started/configuration/

View file

@ -107,7 +107,7 @@
date = "2016-10-22"
[[article]]
title = "通过 Gitlab-cl 将 Hugo blog 自动部署至 GitHub <small>(Chinese, Continious integration)</small>"
title = "通过 Gitlab-cl 将 Hugo blog 自动部署至 GitHub <small>(Chinese, Continuous integration)</small>"
url = "https://zetaoyang.github.io/post/2016/10/17/gitlab-cl.html"
author = "Zetao Yang"
date = "2016-10-17"

View file

@ -3,7 +3,7 @@ publish = "public"
command = "hugo"
[context.production.environment]
HUGO_VERSION = "0.44"
HUGO_VERSION = "0.45.1"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --enableGitInfo"
[context.split1.environment]
HUGO_VERSION = "0.44"
HUGO_VERSION = "0.45.1"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_VERSION = "0.44"
HUGO_VERSION = "0.45.1"
[context.branch-deploy]
command = "hugo -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
HUGO_VERSION = "0.44"
HUGO_VERSION = "0.45.1"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"

View file

@ -399,7 +399,7 @@ function toggleTabs(event) {
for (i = 0; i < allTabs.length; i++) {
allTabs[i].addEventListener("click", toggleTabs);
}
// Upon page load, if user has a prefered language in its localStorage, tabs are set to it.
// Upon page load, if user has a preferred language in its localStorage, tabs are set to it.
if (window.localStorage.getItem('configLangPref')) {
toggleTabs(window.localStorage.getItem('configLangPref'));
}
@ -2083,7 +2083,7 @@ function defaultClearTimeout () {
} ())
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
//normal environments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
@ -2108,7 +2108,7 @@ function runTimeout(fun) {
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
//normal environments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
@ -2190,7 +2190,7 @@ process.nextTick = function (fun) {
}
};
// v8 likes predictible objects
// v8 likes predictable objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
@ -4181,7 +4181,7 @@ AlgoliaSearchCore.prototype._jsonRequest = function(initialOpts) {
return client._promise.reject(err);
}
// When a timeout occured, retry by raising timeout
// When a timeout occurred, retry by raising timeout
if (err instanceof errors.RequestTimeout) {
return retryRequestWithHigherTimeout();
}
@ -4892,7 +4892,7 @@ IndexCore.prototype._search = function(params, url, callback, additionalUA) {
* @param attrs (optional) if set, contains the array of attribute names to retrieve
* @param callback (optional) the result callback called with two arguments
* error: null or Error('message')
* content: the object to retrieve or the error message if a failure occured
* content: the object to retrieve or the error message if a failure occurred
*/
IndexCore.prototype.getObject = function(objectID, attrs, callback) {
var indexObj = this;
@ -6701,7 +6701,7 @@ function Typeahead(o) {
if (_.isMsie() && ($menu[0] === active || $menu[0].contains(active))) {
$e.preventDefault();
// stop immediate in order to prevent Input#_onBlur from
// getting exectued
// getting executed
$e.stopImmediatePropagation();
_.defer(function() { $input.focus(); });
}
@ -10431,7 +10431,7 @@ while (++i < len) {
break;
}
}
// v8 likes predictible objects
// v8 likes predictable objects
function Item(fun, array) {
this.fun = fun;
this.array = array;