User Tools

Site Tools


docs:theme_development:theme_template_variables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docs:theme_development:theme_template_variables [2025/10/07 20:03] – created - external edit 127.0.0.1docs:theme_development:theme_template_variables [2026/04/12 11:12] (current) – alice
Line 3: Line 3:
 At page render time, a number of variables are exposed to the theme with information relating to the rendering. This is how the theme can know, for example, to render a post list or a post display page or any other combination. At page render time, a number of variables are exposed to the theme with information relating to the rendering. This is how the theme can know, for example, to render a post list or a post display page or any other combination.
  
-=== Variables present on all renders ===+===== Variables present on all renders =====
 ^Name^Type^Description^ ^Name^Type^Description^
 |ssg_site_title|String|Title as defined in [[docs:configuration:site_configuration|site configuration]]| |ssg_site_title|String|Title as defined in [[docs:configuration:site_configuration|site configuration]]|
Line 15: Line 15:
 |ssg_site_posts|Array|Array of all posts on the site. When rendering a postlist for a specific tag or post type, this will only contain the posts for that.| |ssg_site_posts|Array|Array of all posts on the site. When rendering a postlist for a specific tag or post type, this will only contain the posts for that.|
  
-=== Variables only present on post page renders ===+===== Variables only present on post page renders =====
 ^Name^Type^Description^ ^Name^Type^Description^
 |ssg_post_date|String|Date the post was created, pre-transformed into a string.| |ssg_post_date|String|Date the post was created, pre-transformed into a string.|
Line 22: Line 22:
  
  
-=== Custom Post Type variables ===+===== Custom Post Type variables =====
 ^Name^page_type^Type^Description^ ^Name^page_type^Type^Description^
 |ssg_post_type|post|String|Name of the post type being used by the post. Can be used to render the post page differently for custom post types| |ssg_post_type|post|String|Name of the post type being used by the post. Can be used to render the post page differently for custom post types|
 |ssg_post_type|post_list|String|Name of the post type being listed| |ssg_post_type|post_list|String|Name of the post type being listed|
  
docs/theme_development/theme_template_variables.1759867435.txt.gz · Last modified: by 127.0.0.1