UltraBlog.vim v2.3.0 Released With Templates

Posted at — Jun 13, 2011
#Plugin #Python #UltraBlog.vim #Vim #博客 #编程

I released the new version 2.3.0 of UltraBlog.vim last week. The main improvement in this version is that templates are introduced in.

Templates are simply HTML strings, they are used to preview posts/pages in the browser locally. This feature is a reparation for the remote previewing, due to the limit of the API, users cannot send a post to Wordpress as draft and preview it without affecting the post status if the post has been published. With templates, they do not have to send drafts to blogs to preview the final effect, but preview drafts directly in the browser in a pre-defined style. Templates can be created as many as users like and their looks can be customized with CSS, HTML and Javascript.

The following illustrations show the content and final effect of the default template:

Templates should be formatted as valid Python template strings, that is, use the following avaliable placeholders and escape any literal '%' with another '%':

The title of the current post/page.

The content of the current post/page.

A literal '%'.

Users can take the default template whose name is 'default' as an example for writing their own templates. The default template can be changed to another one by setting the name of that template to the option ub_default_template.

Posted via UltraBlog.vim.