Some variables are available when publishing lisp parts of templates. These
variables are defined using defstruct, then any slot (or property) is
available using a
(type-slot variable) form.
Structure used to define a blog:
file: The blog source file (read-only).
buffer: Buffer visiting the blog file (read-only).
publish-dir: Where to publish the blog, defined by the
#+PUBLISH_DIR:header directive or
outin the same directory as the blog source file.
template-dir: Location of the template directory defined by the
#+TEMPLATE_DIR:header directive or the
templatesdirectory of the
style-dir: Path of the css files defined by the
#STYLE_DIR:header directive or
style. This directory is relative to
posts-filter: Default filter for posts defined by the
#POSTS_FILTER:header directive or
static-filter: Default filter for static pages defined by the
#STATIC_FILTER:header directive or
snippet-filterDefault filter for snippets defined by the
#SNIPPET_FILTER:header directive or
title: Blog title defined by the
description: Blog description defined by the
url: Blog base URL defined by the
default-category: Default category for posts defined by the
disqus: The Disqus account (called a forum on Disqus) this o-blog site belongs to. Defined by the
filename-sanitizer: A 1-argument function to be used to sanitize post filenames. Defined by
post-sorter: A 2-argument function to be used to sort the posts. Defined by
;; get the title of the current blog defined in variable BLOG. (ob:blog-title BLOG)
id: The post's numerical id. Posts are sort by reversed chronological order. The most recent post get the id 0.
title: The post title, read from the entry title.
timestamp: The post timestamp given by the
CLOSEDproperty or the current time.
year: Numerical year computed from
month: Numerical month computed from
day: Numerical day computed from
category: Category read from
tags: List of
template: Template to use for current post read from
filepath: Relative path from the blog root directory to the post directory (directory only).
filename: Sanitized filename generated from
htmlfile: Full relative path to the post html file (file and directory).
path-to-root: Relative path from the post html file to the blog root.
content: Raw content of the post (Org-mode format).
content-html: HTML export of the post.
;; Get the HTML content of the post defined in variable POST. (ob:post-content-html POST)
Structure used to define a tag:
name: The string defining the tag name.
safe: Web/URL-safe tag name.
count: How many times the tag is used across posts.
size: The font size in percent.
;; get the name of the tag defined in variable TAG. (ob:tags-name TAG)
The following variables are always available when publishing a blog:
ob:blog): Information about the blog being published.
ob:post): List of all posts of the blog or restricted list of posts (depending on what is exported).
ALL-POSTS: A copy of
POSTSexcept this always contains all the posts from the blog.
ob:post): List of static pages.
ob:post): List of snippets pages.
ob:tags): List of all tags.
Some variables may be defined in some functions:
ob:post): The post (or static page) being currently published.
ob:tags): The tag being currently published.
string): The category being published.
MONTH (=integer): The year and month being published.
string): (internal use only, use
ob:path-to-rootinstead) Path to blog root used by