Site methods
Use these methods with Site objects. A multilingual project will have two or more sites, one for each language.
Use these methods with Site objects. A multilingual project will have two or more sites, one for each language.
SITE.AllPages ⟼ page.PagesReturns a collection of all pages in all languages. Read More »
SITE.BaseURL ⟼ stringReturns the base URL as defined in the site configuration. Read More »
SITE.BuildDrafts ⟼ boolReports whether the current build includes draft pages. Read More »
SITE.Config ⟼ page.SiteConfigReturns a subset of the site configuration. Read More »
SITE.Copyright ⟼ stringReturns the copyright notice as defined in the site configuration. Read More »
SITE.Data ⟼ mapReturns a data structure composed from the files in the data directory. Read More »
SITE.GetPage PATH ⟼ page.PageReturns a Page object from the given path. Read More »
SITE.Home ⟼ page.PageReturns the home Page object for the given site. Read More »
SITE.IsMultiLingual ⟼ boolReports whether there are two or more configured languages. Read More »
SITE.Language ⟼ langs.LanguageReturns the language object for the given site. Read More »
SITE.LanguagePrefix ⟼ stringReturns the URL language prefix, if any, for the given site. Read More »
SITE.Languages ⟼ langs.LanguagesReturns a collection of language objects for all sites, ordered by language weight. Read More »
SITE.LastChange ⟼ time.TimeReturns the last modification date of site content. Read More »
SITE.Lastmod ⟼ time.TimeReturns the last modification date of site content. Read More »
SITE.MainSections ⟼ []stringReturns a slice of the main section names as defined in the site configuration, falling back to the top level section with the most pages. Read More »
SITE.Menus ⟼ navigation.MenusReturns a collection of menu objects for the given site. Read More »
SITE.Pages ⟼ page.PagesReturns a collection of all pages. Read More »
SITE.Param KEY ⟼ anyReturns the site parameter with the given key. Read More »
SITE.Params ⟼ maps.ParamsReturns a map of custom parameters as defined in the site configuration. Read More »
SITE.RegularPages ⟼ page.PagesReturns a collection of all regular pages. Read More »
SITE.Sections ⟼ page.PagesReturns a collection of first level section pages. Read More »
site.Store ⟼ maps.ScratchReturns a persistent “scratch pad” on the given site to store and manipulate data. Read More »
SITE.Sites ⟼ page.SitesReturns a collection of all Site objects, one for each language, ordered by default content language then by language weight. Read More »
SITE.Taxonomies ⟼ page.TaxonomyListReturns a data structure containing the site’s Taxonomy objects, the terms within each Taxonomy object, and the pages to which the terms are assigned. Read More »
SITE.Title ⟼ stringReturns the title as defined in the site configuration. Read More »