Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/timber/sugar

Some bonus functionality for Timber
https://github.com/timber/sugar

php timber twig wordpress

Last synced: 8 days ago
JSON representation

Some bonus functionality for Timber

Awesome Lists containing this project

README

        

# Timber Sugar

[![Build Status](https://img.shields.io/travis/timber/sugar/master.svg?style=flat-square)](https://travis-ci.org/timber/sugar)
[![Coverage Status](https://img.shields.io/coveralls/timber/sugar.svg?style=flat-square)](https://coveralls.io/r/timber/sugar?branch=master)

Some bonus functionality for Timber. Install it in `wp-content/plugins` and activate via the WordPress admin. Featuring...

### `dummy`

Throw some dummy lorem ipsum where you need it...
```html+django

Some title



{{dummy(500)|wpautop}}

```
... this outputs 500 words of random lorem ipsum.

###### Use it as a filter
```html+django

{{post.title|dummy(15)}}


```
... this outputs 15 words of lorem ipsum _if_ post.title is empty

### `twitterify`

Take a string with @handles and #hashTags and make them links:

```html+django


{{tweet.content|twitterify}}

```

Outputs...

```html
You should follow @TimberWP
if you love #wordpress
```