Writing content in Textile format instead of HTML

People,

I have a simple rails web site and I have been creating some of the content files with HTML but thought I should be able to write them using Textile instead. eg I have an index file:

  index.html.erb

that has links in it of the form:

<a href= "http://domain_name.com.au/rails_project_name/mvc_name/file_name"> Description</a>

I have been looking around for hours but can't find anything that helps - I can do textilize with fields retrieved from database records but can't see how to do it with content of URL files.

I presume it is possible? How?

Thanks,

Phil.

Philip Rhoades wrote:

<a href= "http://domain_name.com.au/rails_project_name/mvc_name/file_name"> Description</a>

This link will return the page/file directly to the browser. It will not involve your Rails application at all (unless, of course, this URL is routed to a controller action). Web browsers do not understand Textile. They are designed to render HTML.

I have been looking around for hours but can't find anything that helps - I can do textilize with fields retrieved from database records but can't see how to do it with content of URL files.

I presume it is possible? How?

Of course, you can textilize fields from a database and return the resulting HTML to the browser, which will render the HTML it receives.

Textile is designed to simplify formatting from end users. The Textile strings must be converted into HTML before the browser can render them.

I suppose you could write some content in Textile. Then run the content through a conversion to HTML. At that point you can store the HTML on your server and link to that. But. that gains you nothing really. You might as well write the content in HTML and be done with it. If you know Textile it's not a big step to get the same thing in HTML.

Textile < HTML. This makes learning, and writing, the HTML trivial.