Gravatamatic

This blog now runs on Statamic – a fine CMS which takes a nodb approach to storage.

It’s a young CMS, so unlike #eecms or #wordpress there aren’t a whole sea of extensions out there. You have to scratch your own itch a lot. That’s part of the fun. At the moment (October 2012) there isn’t any developer documentation for add ons to speak of, so it’s a case of scouring github for examples and working from there to figure out the shape a plugin takes.

I came across my first need to build an addon tonight while playing with the template for this site. I needed an avatar. So I needed a gravatar. So I needed to calculate an md5 from an email address. So I needed an add on. A quick Google for ‘gravatar statamic’ found nothing.

About 15 minutes later and bingo, this little snippet…

{ { gravatamatic:quicky email="{ { contact_email }}" }}

… is producing a perfect gravatar:

" }}

It’s a trivially simple addon – but it shows the simplicity of the Statamic approach that you can go from zero to working implementation in just a few minutes. Relatively little scaffolding nonsense to contend with, and intuitive structure, straight to the point.

The source is up on github, along with the docs if you might find it handy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.