Conversions

Converting an existing site

It is always thrilling to be handed an existing web site, whether you are being asked simply to maintain it going forward, recode it (so it looks the same, but has a better code base), or even redesign it. Try to hang onto that thrill as long as you can, because you are going to need that excitement and energy as you discover all the problems you have inherited.

The first step is to save a copy of the site as-is in a separate folder. I even made a ZIP copy of that as-is folder, just in case. This allows you to go back and see not only the original code but also the original look and feel of the site if you accidentally eliminate some element that later turns out to be desirable.

Next, get to a base set-up on all files. To do this, start by creating (or reusing) a Textfactory that optimizes all HTML files in the project, and then applies the Pretty Print formatting. You are going to be doing a lot of Find and Replace operations, and having common formatting for common elements is really going to help.

Sometimes you will run into situations where common elements have been coded differently, or appear at different indent levels. It helps in these cases to use a Text Factory to MarkupUtilitiesOptimize the entire site to reduce the number of variables when you are doing your replacements. After you finish, you can then use another Text Factory to MarkupUtilitiesFormat the entire site for further editing.

Converting text files

As much work as it can be converting an existing site, it can sometimes be a bigger task to convert plain text files into web pages, not because of any shortcoming in BBEdit (it is a text editor, after all), but because of the astonishing variety of formats you might encounter in any given text file.

Fortunately, BBEdit has tools that allow you to whip almost any text file into shape.