# Create my own template engine?

**URL:** <https://www.ruby-forum.com/t/create-my-own-template-engine/128614>\
**Category:** Rails\
**Created:** [February 9, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/create-my-own-template-engine/128614 "2008-02-09T12:05:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [February 9, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/create-my-own-template-engine/128614/1 "2008-02-09T12:05:00Z")

</div>

Hi all

I’m trying to create my own template engine, but sadly I couldn’t find  
much information on how to start.

Where can I find such informations? I need infos on…

- How to “register” a file extension for being parsed with my template  
engine
- What are the basics of template engines?
- What is a “best practice” for parsing code with my own rules?

Thanks a lot for informations,  
Josh

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [February 9, 2008, 2:05pm UTC](https://www.ruby-forum.com/t/create-my-own-template-engine/128614/2 "2008-02-09T14:05:06Z")

</div>

On 9 Feb 2008, at 11:05, Joshua M. wrote:

> - What are the basics of template engines?
> - What is a “best practice” for parsing code with my own rules?

Maybe look at the haml plugin? They’ll have needed most of that.

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [February 9, 2008, 2:36pm UTC](https://www.ruby-forum.com/t/create-my-own-template-engine/128614/3 "2008-02-09T14:36:51Z")

</div>

Why not download Liquid and just look at the source?

On Feb 9, 2008 3:05 AM, Joshua M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> - What are the basics of template engines?
> - What is a “best practice” for parsing code with my own rules?
> 
> ## Thanks a lot for informations, Josh
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

## –

## seth at subimage interactive

## [http://sublog.subimage.com](http://sublog.subimage.com)

## Cashboard - Estimates, invoices, and time tracking software - for free! [http://www.getcashboard.com](http://www.getcashboard.com)

Substruct - Open source RoR e-commerce software.  
[http://code.google.com/p/substruct/](http://code.google.com/p/substruct/)
