Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation? #3

Open
ghost opened this issue Apr 8, 2013 · 2 comments
Open

Documentation? #3

ghost opened this issue Apr 8, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 8, 2013

Is there any documentation for this? I've tried countless times to use the PHP filter provided yet HAML still returns "Filter "php" is not defined." even though I have both gems installed.

@mattwildig
Copy link
Contributor

You need to require haml/filters/php as well as have haml-contrib installed. From the command line:

~ $ haml -rhaml/filters/php
:php
  Foo

result:

<?php
  Foo
?>

From a script just add require 'haml/filters/php' after you require 'haml'.

It’s not obvious though, so I agree we could do with some documentation. I added docs for #2 as rdoc in the code, but I’m not sure where the best place would be generally. Perhaps we need a REFERENCE like the main Haml project where the docs for each addition could be added.

@ghost
Copy link
Author

ghost commented Apr 8, 2013

Ah, that makes sense - I was just a few directories short trying to simply require 'haml-contrib'.

Hopefully my issue didn't come across as abrupt - I didn't mean it to sound so but I realise that the wording might have been rough.

Thank you, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant