Values in state dictionary
The state dictionary can hold the following values, though not at all points of plugin callback:
- blog_title
- The title of the blog
- blog_description
- The description of the blog
- blog_language
- The language of the blog, as a RFC 4646 language tag.
- datadir
- The directory where blog data files are kept
- url
- The URL where the blog is located. This is generally an absolute URL, and is not followed by a slash, such as "http://www.flooey.org".
- depth
- The maximum depth the entry finder should search, or 0 for unlimited depth.
- num_entries
- The maximum number of entries to display on a page.
- file_extension
- The extension of files containing entries.
- default_flavor
- The flavor to produce if no flavor is requested.
- show_future_entries
- Whether to show entries that have modification dates in the future.
- plugin_dir
- The directory to load plugins from, or the empty string if no plugins should be loaded.
- plugin_state_dir
- The directory plugins should store their state in.
- static_dir
- The directory that static files should be produced to.
- static_password
- The password to be provided at the command line to generate static entries. Must be non-empty to enable static entry generation.
- static_flavors
- The list of flavors to generate when generating static entries.
- static_entries
- Whether to generate static files for single entries or only for date- and category-based pages.
- plugins
- The list of loaded plugins
- templates
- A dictionary of built-in templates, typically containing "html", "rss", and "error" templates.
- static
- Whether the script is running in static mode
- -all
- Whether all static entries should be generated or only those that have been modified recently. Has no effect in dynamic mode.
- path_year, path_month, path_day
- The year, month, or day that was included as part of the path. This is an integer if the item was present or the empty string if it was not.
- flavor
- The flavor being rendered.
- category
- A list of the path elements of the item being rendered, including the item itself if this is a single-item page reference, but not including any element if it is an index page.
- files
- A dictionary of entry files to modification times.
- indexes
- A dictionary of index entries to either True or their own entry. If True, this indicates a category index. If itself, indicates a date-based index.
- others
- Items found while processing that are not either a file or an index.
- content_type
- The content_type of the output being generated.
- header
- The HTTP header string that will be sent.
- output
- The output being built up during page generation. This is a list which is joined at the end.
- head_template
- The template used for the header.
- path
- The string path of the current story being processed.
- file
- The string filename, minus any extension, of the current story being processed.
- year, month, day, hour, min, sec, wday, yday, isdst, month_name, wday_name
- The year, month, day, hour, minute, second, day of week, day of year, Daylight Savings Time state, month name, and day of week name of the current story being processed.
- date_template
- The template used for the date.
- title
- The title of the current story being processed.
- body
- The body of the current story being processed.
- story_template
- The template used for a story.
- foot_template
- The template used for the footer.