Documentation
¶
Index ¶
- func ContainsLiquidTags(s string) bool
- func DefaultFromPath(relPath string) string
- func Resolve(pattern string, page *content.Page) (string, error)
- func ResolveAliases(page *content.Page) ([]string, error)
- func ResolveForSection(page *content.Page, permalinkCfg map[string]string) (string, error)
- func ResolveFromCascade(page *content.Page, cascadeData map[string]interface{}) (string, error)
- func ResolveTokens(pattern string, page *content.Page) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsLiquidTags ¶
ContainsLiquidTags returns true if the string contains {{ }} Liquid expressions.
func DefaultFromPath ¶
DefaultFromPath computes the default URL from a content file's relative path.
func Resolve ¶
Resolve computes the output URL for a page using config patterns and front matter overrides.
func ResolveAliases ¶
ResolveAliases returns all alias output paths for a page, as specified in the page's front matter "aliases" list. These are additional output locations for the same rendered content — not redirects.
func ResolveForSection ¶
ResolveForSection computes the output URL for a page using section-to-pattern mapping from config. The lookup order is:
- Front matter permalink (static or Liquid)
- Section-specific pattern from permalinkCfg
- "default" pattern from permalinkCfg
- File path default (DefaultFromPath)
func ResolveFromCascade ¶
ResolveFromCascade computes the output URL for a page using permalink patterns from the _data.yaml cascade. The lookup order is:
- Front matter permalink (static or Liquid)
- Cascade "permalink" pattern from _data.yaml
- File path default (DefaultFromPath)
Types ¶
This section is empty.