Creating a homepage

Once you have the Archive system figured out, you can author your home page. First you create a template file in the Archive blog. That creates a sub-directory and file, all based on the date and month, such as Archive/2011-05/2011-05.htmI.
Using the Movable Type engine in the Archive blog, I clone the existing stylesheet and create a 2011-05.css and 2011-05-print.css stylesheet. With a special print stylesheet and the proper call-out in the header of the 2011-05.html file you can suppress search boxes and navigation bars in a printouts of your home page. The forth file you want in the sub-directory is the big bold image file that will be the "cover art" of this month's homepage. I find a nice image and size it to 1920x1080 so that if someone looks at the page in full-screen mode on a TV, it will fit perfectly.

To edit the html I load the web location into Komposer. The only problem I have been having with Komposer is that when I put a full path to the stylesheet, http://www.rako.com/Archive/2011-05/2011-05.css, the Komposer evil help-you-when-you-don't-want-it programmers make it a short link 2011-05.css. That's OK since Komposer also makes crappy html with stupid indenting. So once you get the page close to perfect, you need to open it in tidyUI and clean up the code. At that time you can put in the absolute paths to the stylesheet.

It is important to use the absolute path to the CSS and absolute paths to all the links in the home page. This is because you will be copying it from rako.com/Archive/2011-05 to rako.com and changing the file-name to index.html. That makes it the homepage of your site.
 
It also fairly straightforward to open the Archive/2011-05.html in Stylizer. Be sure that you change the css paths in the html file before you load it into Stylizer or you may and up changing some style sheet from the last month or wherever you got the them from. Also make sure that both Komposer and Stylizer are publishing and saving respectively, to the exact right perfect locations or you will also clobber existent pages.When you go to see how the page looks in you browser be sure to hit reload or you won't see the last changes.

Once you get the Archive/2011-05/2011-05.html and both stylesheets right, you can publish them in Movable Type, but only if you have linked the template file and stylesheet files in the template output section. That way Movable Type will see your changes to the files in an outside application and just grab the new files and store them in Movable Type.

When everything is hunky dory and backed up via Movable Type's database, you can copy the html file over to the root directory and change it's name to index.html. There is no need to copy the style sheet, since the index.html has an absolute path to it.

So there you have it, as the emperor said in Amadeus. You first create a new homepage in a new sub-directory in the Archive sub-directory. Then copy it to the root of your site and change the name to index.html. When you publish the next one, just overwrite the last index.html.

Since every month (or yearly or whatever) homepage you create has its own location and its own stylesheet, it will always look the same, even if you change all the Movable Type blog stylesheets and other things on the site.

About this Entry

This page contains a single entry by Paul Rako published on May 16, 2011 2:03 AM.

Creating back issues in the Archive was the previous entry in this blog.

Creating the table-of-contents is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.