mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 18:51:02 +00:00
Merge commit 'efc0b1bb6c6564f54d596467dbc6a18cb206954e'
This commit is contained in:
commit
79355043e8
22 changed files with 59 additions and 39 deletions
|
@ -15,9 +15,9 @@
|
|||
{{ hugo.Generator }}
|
||||
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
||||
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
|
||||
<meta name="robots" content="index, follow">
|
||||
{{ else }}
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
{{ end }}
|
||||
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
|
|
|
@ -1 +1 @@
|
|||
# github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b
|
||||
# github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d
|
||||
|
|
|
@ -107,7 +107,7 @@ You can find a list of all template variables to access the profile information
|
|||
|
||||
### Link Social Network Accounts
|
||||
|
||||
As aforementioned, Hugo is able to generate links to profiles of the most popular social networks. The following social networks with their corrersponding identifiers are supported: `github`, `facebook`, `twitter`, `pinterest`, `instagram`, `youtube` and `linkedin`.
|
||||
As aforementioned, Hugo is able to generate links to profiles of the most popular social networks. The following social networks with their corresponding identifiers are supported: `github`, `facebook`, `twitter`, `pinterest`, `instagram`, `youtube` and `linkedin`.
|
||||
|
||||
This is can be done with the `.Social.URL` function. Its only parameter is the name of the social network as they are defined in the profile (e.g. `facebook`, `twitter`). Custom variables like `website` remain as they are.
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ Returns a collection of pages related to a given one restricted to a list of ind
|
|||
#### .RelatedTo KEYVALS [KEYVALS2 ...]
|
||||
Returns a collection of pages related together by a set of indices and their match.
|
||||
|
||||
In order to build those set and pass them as argument, one must use the `keyVals` function where the first argument would be the `indice` and the consective ones its potential `matches`.
|
||||
In order to build those set and pass them as argument, one must use the `keyVals` function where the first argument would be the `indice` and the consecutive ones its potential `matches`.
|
||||
|
||||
```
|
||||
{{ $related := .Site.RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }}
|
||||
|
|
|
@ -5,7 +5,7 @@ description: Shortcodes are simple snippets inside your content files calling bu
|
|||
godocref:
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-03-31
|
||||
lastmod: 2019-11-07
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
|
@ -103,7 +103,7 @@ title
|
|||
: Image title.
|
||||
|
||||
caption
|
||||
: Image caption.
|
||||
: Image caption. Markdown within the value of `caption` will be rendered.
|
||||
|
||||
class
|
||||
: `class` attribute of the HTML `figure` tag.
|
||||
|
@ -115,7 +115,7 @@ width
|
|||
: `width` attribute of the image.
|
||||
|
||||
attr
|
||||
: Image attribution text.
|
||||
: Image attribution text. Markdown within the value of `attr` will be rendered.
|
||||
|
||||
attrlink
|
||||
: If the attribution text needs to be hyperlinked, URL of the destination.
|
||||
|
|
|
@ -404,7 +404,7 @@ Last but not least you should accept the contributor license agreement (CLA). A
|
|||
|
||||
We use the [Travis CI loop](https://travis-ci.org/gohugoio/hugo) (Linux and OS X) and [AppVeyor](https://ci.appveyor.com/project/gohugoio/hugo/branch/master) (Windows) to compile Hugo with your additions. This should ensure that everything works as expected before merging your pull request. This in most cases only relevant if you made changes to the codebase of Hugo.
|
||||
|
||||
![Automic builds and their status](/images/contribute/development/ci-errors.png)
|
||||
![Automatic builds and their status](/images/contribute/development/ci-errors.png)
|
||||
|
||||
Above you can see that Travis wasn't able to compile the changes in this pull request. Click on "Details" and try to investigate why the build failed. But it doesn't have to be your fault. Mostly, the `master` branch that we used as foundation for your pull request should build without problems.
|
||||
|
||||
|
|
|
@ -20,13 +20,13 @@ wip: true
|
|||
toc: true
|
||||
---
|
||||
|
||||
A collection of all themes created by the Hugo community, including screenshots and demos, can be found at [www.themes.gohugo.io]. Every theme in this list will automatically be added to the theme site.
|
||||
A collection of all themes created by the Hugo community, including screenshots and demos, can be found at [themes.gohugo.io]. Every theme in this list will automatically be added to the theme site.
|
||||
|
||||
Another great site for Hugo themes is [jamstackthemes.dev/](https://jamstackthemes.dev/ssg/hugo/).
|
||||
|
||||
|
||||
### Add Your Theme to the Repo
|
||||
|
||||
In order to add your Hugo theme to [www.themes.gohugo.io] please [open up a new issue in the theme repository](https://github.com/gohugoio/hugoThemes/issues/new?template=theme-submission.md). **Please make sure that you've read the theme submission guidelines in the [README](https://github.com/gohugoio/hugoThemes/blob/master/README.md#adding-a-theme-to-the-list) of the hugoThemes repository.**
|
||||
In order to add your Hugo theme to [themes.gohugo.io] please [open up a new issue in the theme repository](https://github.com/gohugoio/hugoThemes/issues/new?template=theme-submission.md). **Please make sure that you've read the theme submission guidelines in the [README](https://github.com/gohugoio/hugoThemes/blob/master/README.md#adding-a-theme-to-the-list) of the hugoThemes repository.**
|
||||
|
||||
[www.themes.gohugo.io]: https://themes.gohugo.io/
|
||||
[themes.gohugo.io]: https://themes.gohugo.io/
|
||||
|
|
|
@ -11,7 +11,7 @@ menu:
|
|||
docs:
|
||||
parent: "functions"
|
||||
keywords: []
|
||||
signature: ["index COLLECTION INDEX", "index COLLECTION KEY"]
|
||||
signature: ["index COLLECTION INDEXES", "index COLLECTION KEYS"]
|
||||
workson: []
|
||||
hugoversion:
|
||||
relatedfuncs: []
|
||||
|
@ -20,13 +20,25 @@ aliases: [/functions/index/]
|
|||
needsexample: true
|
||||
---
|
||||
|
||||
From the Godocs:
|
||||
The `index` functions returns the result of indexing its first argument by the following arguments. Each indexed item must be a map or a slice, e.g.:
|
||||
|
||||
> Returns the result of indexing its first argument by the following arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each indexed item must be a map, slice, or array.
|
||||
```go-text-template
|
||||
{{ $slice := slice "a" "b" "c" }}
|
||||
{{ index $slice 1 }} => b
|
||||
{{ $map := dict "a" 100 "b" 200 }}
|
||||
{{ index $map "b" }} => 200
|
||||
```
|
||||
|
||||
The function takes multiple indices as arguments, and this can be used to get nested values, e.g.:
|
||||
|
||||
```go-text-template
|
||||
{{ $map := dict "a" 100 "b" 200 "c" (slice 10 20 30) }}
|
||||
{{ index $map "c" 1 }} => 20
|
||||
{{ $map := dict "a" 100 "b" 200 "c" (dict "d" 10 "e" 20) }}
|
||||
{{ index $map "c" "e" }} => 20
|
||||
```
|
||||
|
||||
In Go templates, you can't access array, slice, or map elements directly the same way you would in Go. For example, `$.Site.Data.authors[.Params.authorkey]` isn't supported syntax.
|
||||
|
||||
Instead, you have to use `index`, a function that handles the lookup for you.
|
||||
|
||||
## Example: Load Data from a Path Based on Front Matter Params
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: print
|
||||
linktitle: print
|
||||
description: Prints the default representation of the given argument using the standard `fmt.Print` function.
|
||||
description: Prints the default representation of the given arguments using the standard `fmt.Print` function.
|
||||
godocref: https://golang.org/pkg/fmt/
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
|
@ -22,5 +22,6 @@ See [the go doc](https://golang.org/pkg/fmt/) for additional information.
|
|||
|
||||
```
|
||||
{{ print "foo" }} → "foo"
|
||||
{{ print "foo" "bar" }} → "foobar"
|
||||
{{ print (slice 1 2 3) }} → [1 2 3]
|
||||
```
|
||||
|
|
|
@ -72,6 +72,12 @@ If you are on a Windows machine and use [Chocolatey][] for package management, y
|
|||
choco install hugo -confirm
|
||||
{{< /code >}}
|
||||
|
||||
Or if you need the “extended” Sass/SCSS version:
|
||||
|
||||
{{< code file="install-extended-with-chocolatey.ps1" >}}
|
||||
choco install hugo-extended -confirm
|
||||
{{< /code >}}
|
||||
|
||||
### Scoop (Windows)
|
||||
|
||||
If you are on a Windows machine and use [Scoop][] for package management, you can install Hugo with the following one-liner:
|
||||
|
|
|
@ -176,7 +176,7 @@ For theme specific configuration options, see the [theme site](https://github.co
|
|||
It is simple. Just call:
|
||||
|
||||
```
|
||||
hugo
|
||||
hugo -D
|
||||
```
|
||||
|
||||
Output will be in `./public/` directory by default (`-d`/`--destination` flag to change it, or set `publishdir` in the config file).
|
||||
|
|
|
@ -32,7 +32,7 @@ noProxy
|
|||
private
|
||||
: Comma separated glob list matching paths that should be treated as private.
|
||||
|
||||
Note that the above terms maps directly to their counterparts in Go Modules. Some of these setting may be natural to set as OS environvent variables. To set the proxy server to use, as an example:
|
||||
Note that the above terms maps directly to their counterparts in Go Modules. Some of these setting may be natural to set as OS environment variables. To set the proxy server to use, as an example:
|
||||
|
||||
```
|
||||
env HUGO_MODULE_PROXY=https://proxy.example.org hugo
|
||||
|
|
BIN
docs/content/en/news/0.59.0-relnotes/hugo-59-poster-featured.png
Normal file
BIN
docs/content/en/news/0.59.0-relnotes/hugo-59-poster-featured.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
|
@ -1,12 +1,12 @@
|
|||
|
||||
---
|
||||
date: 2019-10-21
|
||||
title: "0.59.0"
|
||||
description: "0.59.0"
|
||||
title: "Hugo 0.59.0"
|
||||
description: "Set image target format and background color, and more ..."
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
The timing of this release is motivated by getting the copies of the docs repositories in synch, now fully "Hugo Modularized". But it also comes with some very nice additions:
|
||||
The timing of this release is motivated by getting the copies of the docs repositories in synch, now fully "Hugo Modularized". But it also comes with some very nice additions:
|
||||
|
||||
It is now possible to set the target format and the background fill color when processing images, e.g.:
|
||||
|
||||
|
@ -22,6 +22,12 @@ Another useful addon is the `$pages.Next` and `$pages.Prev` methods on the core
|
|||
{{with .Site.RegularPages.Next . }}{{.RelPermalink}}{{end}}
|
||||
```
|
||||
|
||||
The above is a functionally equivalent (but slightly slower) variant of:
|
||||
|
||||
```
|
||||
{{with .Next }}{{.RelPermalink}}{{end}}
|
||||
```
|
||||
|
||||
See [Pages Methods](https://gohugo.io/variables/pages/) for more information.
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ A [media type][] (also known as *MIME type* and *content type*) is a two-part id
|
|||
|
||||
This is the full set of built-in media types in Hugo:
|
||||
|
||||
{{< datatable "media" "types" "type" "suffix" >}}
|
||||
{{< datatable "media" "types" "type" "suffixes" >}}
|
||||
|
||||
**Note:**
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ toc: true
|
|||
|
||||
A static website with a dynamic search function? Yes. As alternatives to embeddable scripts from Google or other search engines, you can provide your visitors a custom search by indexing your content files directly.
|
||||
|
||||
* [GitHub Gist for Hugo Workflow](https://gist.github.com/sebz/efddfc8fdcb6b480f567). This gist contains a simple workflow to create a search index for your static website. It uses a simple Grunt script to index all your content files and [lunr.js](http://lunrjs.com/) to serve the search results.
|
||||
* [GitHub Gist for Hugo Workflow](https://gist.github.com/sebz/efddfc8fdcb6b480f567). This gist contains a simple workflow to create a search index for your static website. It uses a simple Grunt script to index all your content files and [lunr.js](https://lunrjs.com/) to serve the search results.
|
||||
* [hugo-elasticsearch](https://www.npmjs.com/package/hugo-elasticsearch). Generate [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html) indexes for Hugo static sites by parsing front matter. Hugo-Elasticsearch will generate a newline delimited JSON (NDJSON) file that can be bulk uploaded into Elasticsearch using any one of the available [clients](https://www.elastic.co/guide/en/elasticsearch/client/index.html).
|
||||
* [hugo-lunr](https://www.npmjs.com/package/hugo-lunr). A simple way to add site search to your static Hugo site using [lunr.js](http://lunrjs.com/). Hugo-lunr will create an index file of any html and markdown documents in your Hugo project.
|
||||
* [hugo-lunr](https://www.npmjs.com/package/hugo-lunr). A simple way to add site search to your static Hugo site using [lunr.js](https://lunrjs.com/). Hugo-lunr will create an index file of any html and markdown documents in your Hugo project.
|
||||
* [hugo-lunr-zh](https://www.npmjs.com/package/hugo-lunr-zh). A bit like Hugo-lunr, but Hugo-lunr-zh can help you separate the Chinese keywords.
|
||||
* [Github Gist for Fuse.js integration](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae). This gist demonstrates how to leverage Hugo's existing build time processing to generate a searchable JSON index used by [Fuse.js](http://fusejs.io/) on the client side. Although this gist uses Fuse.js for fuzzy matching, any client side search tool capable of reading JSON indexes will work. Does not require npm, grunt or other build-time tools except Hugo!
|
||||
* [Github Gist for Fuse.js integration](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae). This gist demonstrates how to leverage Hugo's existing build time processing to generate a searchable JSON index used by [Fuse.js](https://fusejs.io/) on the client side. Although this gist uses Fuse.js for fuzzy matching, any client side search tool capable of reading JSON indexes will work. Does not require npm, grunt or other build-time tools except Hugo!
|
||||
* [hugo-search-index](https://www.npmjs.com/package/hugo-search-index). A library containing Gulp tasks and a prebuilt browser script that implements search. Gulp generates a search index from project markdown files.
|
||||
|
||||
## Commercial Search Services
|
||||
|
|
|
@ -12,13 +12,6 @@ quote = "Hugo is really, really incredible... Now does resizing/resampling of im
|
|||
link = "https://twitter.com/jensamunch/status/948533063537086464"
|
||||
date = 2018-01-03T04:00:00Z
|
||||
|
||||
[[tweet]]
|
||||
name = "carriecoxwell"
|
||||
twitter_handle = "@carriecoxwell"
|
||||
quote = "Having a lot of fun with <a href='https://twitter.com/gohugoio' target='_blank'>@GoHugoIO</a>! It's exactly what I didn't even know I wanted."
|
||||
link = "https://twitter.com/carriecoxwell/status/948402470144872448"
|
||||
date = 2018-01-03T03:00:00Z
|
||||
|
||||
[[tweet]]
|
||||
name = "STOQE"
|
||||
twitter_handle = "@STOQE"
|
||||
|
|
|
@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs
|
|||
|
||||
go 1.12
|
||||
|
||||
require github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b // indirect
|
||||
require github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d // indirect
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
github.com/gohugoio/gohugoioTheme v0.0.0-20190808163145-07b3c0f73b02/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
|
||||
github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b h1:PWNjl46fvtz54PKO0BdiXOF6/4L/uCP0F3gtcCxGrJs=
|
||||
github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
|
||||
github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d h1:D3DcaYkuJbotdWNNAQpQl37txX4HQ6R5uMHoxVmTw0w=
|
||||
github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
|
||||
|
|
|
@ -3,7 +3,7 @@ publish = "public"
|
|||
command = "hugo --gc --minify"
|
||||
|
||||
[context.production.environment]
|
||||
HUGO_VERSION = "0.58.3"
|
||||
HUGO_VERSION = "0.59.1"
|
||||
HUGO_ENV = "production"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
|
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
|
|||
command = "hugo --gc --minify --enableGitInfo"
|
||||
|
||||
[context.split1.environment]
|
||||
HUGO_VERSION = "0.58.3"
|
||||
HUGO_VERSION = "0.59.1"
|
||||
HUGO_ENV = "production"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.deploy-preview.environment]
|
||||
HUGO_VERSION = "0.58.3"
|
||||
HUGO_VERSION = "0.59.1"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.branch-deploy.environment]
|
||||
HUGO_VERSION = "ç"
|
||||
HUGO_VERSION = "0.59.1"
|
||||
|
||||
[context.next.environment]
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
Loading…
Reference in a new issue