For the past few weeks, Iâve been using a tool called Webby for static html pages.Â Webby is a Ruby-based tool which produces static html pages based on templates you create.Â Think of it as using master pages in ASP.Net, except that the final product is files with a .html extension instead of .aspx (and you donât get the asp.net processor kicking in each time this static page is called).
Itâs a great tool, because most of my sites need to have a consistent look and feel.Â I donât want to copy html from one file to another and I can use a master page-like concept.Â And it gives me the chance to toy around with Ruby a little bit (but not much).
In Webby, you create a layout page and the other pages as .txt files with html.Â Run the command âwebby autobuildâ in a command window and each time you make a change to any of the files, it will create a folder called output with all of your processed html pages.
A problem I did have with the tool is that it was adding <br /> tags into my html where the line breaks where in my files.Â I absolutely hate it when something tries to inject html into my code.Â This is why I didnât use Frontpage and wonât use tools like Dreamweaver.Â I know html is a lost art but . . .
So, in my files, I would type
<p>I would type a paragraph that might be lengthy, so I use multiple lines in the code but don't expect the browser to interpret these. I just want it to look for the tags.</p>
What I got back in return was
<p>I would type a paragraph that might be <br /> lengthy, so I use multiple lines in the code<br /> but don't expect the browser to interpret these.<br /> I just want it to look for the tags.</p><br />
It took me a few hours to figure out why this was happening (I couldnât find anything on Google with a âBR tags in Webbyâ search).
The problem is not with Webby, but with a tool called RedCloth, which Webby uses.Â Redcloth does the html processing with something called Textile.Â This is not a problem, but a feature in Redcloth from very 4 onwards.
After searching for hours (and contemplating whether to just transfer everything to aspx pages), I found that Webby was automatically adding a â- textileâ filter to all of the pages:
--- title: <%= title %> created_at: <%= Time.now.to_y %> filter: - erb - textile ---
The simple solution, was the remove the textfile flag from all pages.Â Remove the flag from the âtemplates/page.erbâ file in the project and you should remove it from all pages in the project.Â Then you are master of all your html, my son.
I hope this