Skip to content

Document template variable replacements - #26

Draft
bsstahl with Copilot wants to merge 2 commits into
masterfrom
copilot/document-variable-replacements
Draft

Document template variable replacements#26
bsstahl with Copilot wants to merge 2 commits into
masterfrom
copilot/document-variable-replacements

Conversation

Copilot AI commented May 4, 2026

Copy link
Copy Markdown

No documentation existed for PPTail's token substitution system, leaving template authors to reverse-engineer available variables from source code.

Adds a comprehensive variable replacements reference to README.md covering:

  • Template types — maps each template file to its purpose
  • Content item variables — all 18 substitution tokens available in item-level templates ({Title}, {Content}, {Author}, {ByLine}, {Description}, {Teaser}, {TeaserOrDescription}, dates, {Link}, {Permalink}, {PermalinkUrl}, {Tags}, {Hashtags}, {Categories}) with notes on XML encoding and format specifier behavior in syndication contexts
  • Page-level variables{Content}, {NavigationMenu}, {Sidebar}, {Title}
  • Site settings variables{SiteTitle}, {SiteDescription}, {ContactEmail}, {Copyright}, plus user-defined variables from SiteSettings.Variables
  • Path variables{PathToRoot} / {PathToSiteRoot} including URL-encoded variants (%7BPathToRoot%7D) for editor compatibility
  • Page link variables — all link-generating tokens with their optional parameters:
    • Simple links ({HomePageLink}, {ArchivePageLink}, {ContactPageLink}, {FeedLink}) with custom link text via {HomePageLink:my text}
    • Content item links: {PageLink:slug|link text}, {PostLink:slug|link text}
    • Tag/search links: {SearchLink:tag|link text}
    • File/image embeds: {FileLink:filename|link text}, {ImageLink:path|alt text} with configurable folder paths via FilesFolder/ImagesFolder site variables
  • Redirect variable{Url} (Redirect template only)
  • Full availability matrix — 35-variable × 12-template grid showing exactly where each token is substituted, derived directly from the processing paths in TemplateProcessor and StringExtensions

Copilot AI linked an issue May 4, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/bsstahl/PPTail/sessions/d2b0dbe3-31cc-442b-855f-c096e59065bb

Co-authored-by: bsstahl <8053235+bsstahl@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation for variable replacements Document template variable replacements May 4, 2026
Copilot AI requested a review from bsstahl May 4, 2026 14:31
Copilot finished work on behalf of bsstahl May 4, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Variable Replacements

2 participants