测试Template中函数/变量的取值
包括:站点变量(.Site)、页面变量(.Page)、简码变量、函数
This is Content!
使用 {{.Name}} 形式调用。
Shortcode
this Shortcode
| code | value |
|---|
| .Name | test/test-template |
| .Ordinal | 0 |
| .Page | see “.Page” |
| .Parent | <nil> |
| .Position | "/home/runner/work/hugo-usage-doc/hugo-usage-doc/content/zh-cn/blog/2023/test-template.md:10:1" |
| .IsNamedParams | true “This is Params!” |
| .Inner | " This is Inner! " |
| .Scratch | {map[] {{0 0} 0 0 {{} 0} {{} 0}}} |
| .InnerDeindent | " This is Inner! " |
Page
This Page
| .Page.AlternativeOutputFormats | [] |
| .Page.Aliases | [] |
| .Page.Ancestors | Pages(2) |
| .Page.BundleType | |
| .Page.Content | "" |
| .Page.Data | map[] |
| .Page.Date | 2023-10-22 07:43:49 +0800 +0800 |
| .Page.Description | "包括:站点变量(.Site)、页面变量(.Page)、简码变量、函数
" |
| .Page.Draft | `false` |
| .Page.ExpiryDate | 0001-01-01 00:00:00 +0000 UTC |
| .Page.File | blog/2023/test-template.md |
| .Page.Fragments | todo |
| .Page.FuzzyWordCount | 0 |
| .Page.IsHome | false |
| .Page.IsNode | false |
| .Page.IsPage | true |
| .Page.IsSection | false |
| .Page.IsTranslated | false |
| .Page.Keywords | [] |
| .Page.Kind | page |
| .Page.Language | zh-cn |
| .Page.Lastmod | 2023-11-04 10:26:54 +0800 +0800 |
| .Page.LinkTitle | 测试Template中函数/变量的取值 |
| .Page.Next | Page(/blog/2023/comparing-blog-frameworks.md) |
| .Page.NextInSection | Page(/blog/2023/comparing-blog-frameworks.md) |
| .Page.OutputFormats | [{canonical {html text/html index canonical false true false false true 10} /hugo-usage-doc/blog/2023/test-template/ https://lawsssscat.github.io/hugo-usage-doc/blog/2023/test-template/}] |
| .Page.Permalink | https://lawsssscat.github.io/hugo-usage-doc/blog/2023/test-template/ |
| .Page.Plain | |
| .Page.PlainWords | [] |
| .Page.Prev | Page(/docs/hugo/language.md) |
| .Page.PrevInSection | Page(/blog/2023/readme.md) |
| .Page.PublishDate | 2023-10-22 07:43:49 +0800 +0800 |
| .Page.RawContent | todo
This is Content! {{% test/test-template param_01="This is Params!" %}} This is Inner! {{% /test/test-template %}} |
| .Page.RenderShortcodes | see "Shortcode" |
| .Page.ReadingTime | 0 |
| .Page.Resources | [] |
| .Page.Ref | todo |
| .Page.RelRef | todo |
| .Page.RelPermalink | /hugo-usage-doc/blog/2023/test-template/ |
| .Page.Site | see "Site" |
| .Page.Sites | todo |
| .Page.Summary | |
| .Page.TableOfContents | |
| .Page.Title | 测试Template中函数/变量的取值 |
| .Page.Translations | Pages(0) |
| .Page.TranslationKey | page/blog/2023/test-template |
| .Page.Truncated | false |
| .Page.Type | blog |
| .Page.Weight | 0 |
| .Page.WordCount | 0 |
“Home” Page
| code | value |
|---|
| Title | 首页(Home) |
| Kind | home |
| Type | page |
Section Page
# ""
| code | value |
|---|
| Title | |
| Kind | section |
| Type | docs |
# “Blog”
| code | value |
|---|
| Title | Blog |
| Kind | section |
| Type | blog |
| code | value |
|---|
| Title | Community |
| Kind | section |
| Type | community |
Site
| code | value |
|---|
| .Site.AllPages | |
| .Site.BaseURL | https://lawsssscat.github.io/hugo-usage-doc/ |
| .Site.BuildDrafts | |
| .Site.Copyright | |
| .Site.Data | |
| .Site.Home | Page(/_index.md) |
| .Site.IsMultiLingual | false |
| .Site.Language.Lang | zh-cn |
| .Site.Language.LanguageName | |
| .Site.Language.Weight | 0 |
| .Site.Language | zh-cn |
| .Site.LanguageCode | zh-Hans |
| .Site.LanguagePrefix | |
| .Site.Languages | [zh-cn] |
| .Site.LastChange | 2023-11-04 10:26:54 +0800 +0800 |
| .Site.Menus | map[main:[0xc00095c380 0xc00095c2a0 0xc00095c1c0]] |
| .Site.Pages | Pages(35) |
| .Site.RegularPages | Pages(19) |
| .Site.Sections | Pages(3) |
| .Site.Taxonomies | TaxonomyList(2) |
| .Site.Title | Hugo 使用手册 |