mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 14:40:43 +03:00
Merge commit 'eb16165694
'
This commit is contained in:
commit
b17a61a605
199 changed files with 10860 additions and 22630 deletions
|
@ -33,9 +33,13 @@ The `.File` object contains the following fields:
|
|||
.File.TranslationBaseName
|
||||
: the filename without extension or optional language identifier (e.g., `foo`)
|
||||
|
||||
.File.ContentBaseName
|
||||
: is a either TranslationBaseName or name of containing folder if file is a leaf bundle.
|
||||
|
||||
.File.BaseFileName
|
||||
: the filename without extension (e.g., `foo.en`)
|
||||
|
||||
|
||||
.File.Ext
|
||||
: the file extension of the content file (e.g., `md`); this can also be called using `.File.Extension` as well. Note that it is *only* the extension without `.`.
|
||||
|
||||
|
@ -45,4 +49,4 @@ The `.File` object contains the following fields:
|
|||
.File.Dir
|
||||
: given the path `content/posts/dir1/dir2/`, the relative directory path of the content file will be returned (e.g., `posts/dir1/dir2/`)
|
||||
|
||||
[Multilingual]: /content-management/multilingual/
|
||||
[Multilingual]: /content-management/multilingual/
|
||||
|
|
|
@ -156,6 +156,12 @@ http://remarkjs.com)
|
|||
.Site
|
||||
: see [Site Variables](/variables/site/).
|
||||
|
||||
.Sites
|
||||
: returns all sites (languages). A typical use case would be to link back to the main language: `<a href="{{ .Sites.First.Home.RelPermalink }}">...</a>`.
|
||||
|
||||
.Sites.First
|
||||
: returns the site for the first language. If this is not a multilingual setup, it will return itself.
|
||||
|
||||
.Summary
|
||||
: a generated summary of the content for easily showing a snippet in a summary view. The breakpoint can be set manually by inserting <code><!--more--></code> at the appropriate place in the content page. See [Content Summaries](/content-management/summaries/) for more details.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue