New Message: Static rendering of your site
webmaster at userland.com
webmaster at userland.com
Mon May 26 12:37:29 PDT 2003
A new message was posted:
Address: http://frontier.userland.com/discuss/msgReader$11835
By: Lawrence Lee (lawrence at userland.com)
<rules><!-- 1.5 spacing -->
<rule><outlineSpacing>1.5</outlineSpacing></rule>
</rules>
<br><br>Static rendering means creating .html files from your Manila website and saving them to disk. This creates a traditional website, the kind that can be served by non-Manila servers such as Apache, WebSTAR, and IIS, servers that are optimized for serving static files from disk. Your static server doesn't know about Manila -- it doesn't need to.
Manila does the static rendering for you. It's a feature you can turn on and configure.
What you end up with is two websites: the Manila site where you work on your site, and the static site that exists as files on disk.
<rules><!-- internalLink, bold headings -->
<rule level="1" to="1"><internalLink/><textStyle>bold</textStyle></rule>
</rules>
Why static rendering?
There are two main reasons to use the feature. One or both may apply to you -- or you may have other reasons.
1. Performance
There is a simple reason why a site that's been rendered to disk will often load faster than the Manila version. In a static site, the pages have been pre-built. In Manila, pages are built on the fly, for every request. This means a static server is doing much less work than a Manila server: all it has to do is read a file and return the contents to the browser. Latency -- the time it takes before the server starts returning data to the browser -- is thus lower.
2. Staging
You may want a private and a public site. You can use the Manila site as your private site and the static site as your public site. When a page is ready to "go live" -- when it's ready to be rendered to the static server -- you can tell Manila to render the page.
This allows you to iterate over your copy without making all your edits public. You can create a new page and edit it until it's the way you want it, then render it. Later you can edit again, and re-render it once you're finished editing.
What gets rendered
The Manila version of your site may or may not be public. So rather than talk about public and private sections of your site, this document refers to the render-able sections of your site.
There are three types of pages that can be rendered: home pages, former home pages (back issues) available through the home page calendar, and pages defined in your site structure.
Other pages -- your discussion group, your prefs pages, and so on -- are not rendered. Some of these don't make sense on a static server, some are highly dynamic and can't be rendered.
This division between render-able pages and non-render-able pages allows you to define what goes onto the static server and what doesn't. Remember that any piece of content can be added to the site structure, so you have control over what gets rendered to the static server.
Static rendering preferences
Static rendering is a feature the server manager can enable or disable for the entire server. If static rendering is enabled on the server, then you the managing editor of a Manila site can choose whether or not to use it.
In the site prefs section of your site is a new link called Rendering. Click it to go to the prefs page for static rendering.
There are three questions on that page. The first asks if you want to enable static rendering for your site.
The second question asks if you want pages rendered when they're new or changed. If you're using this feature for performance reasons, then choose Yes. This way the static version of your site will always be in synch with the Manila version.
The third question asks if you want a Render this Page button on render-able pages. If you're using Manila as a staging server, then this is your best choice. This way you control when pages are rendered -- you can edit pages without triggering a static rendering. Pages get rendered only when you click the Render this Page button.
You can choose Yes for both options: you may want pages to be automatically rendered, but also have the option to re-render a page at will.
Rendering an entire site
When you first turn on static rendering, you will probably want to render your entire site at once.
To do so, go to the Admin page. The top item in the page is labelled Static Rendering: click the Render this Site button.
The next page is a confirmation page, which makes sure you really want to render the entire site. The confirmation page also reminds you of the URL of your static site.
Depending on the size of your site, it may take from a few seconds to a few minutes to render the entire site. The page doesn't return until the entire site has been rendered. It's much like sending bulletins -- if you have lots of subscribers, it may take a little while before the page returns telling you who bulletins went to. In this case, the returned page is a report listing all the pages that were rendered to disk. You can click on any URL to visit the static version of the page.
You of course want to render your entire site when you first set up static rendering. But there are other times, too -- such as when you make a major change to your template. The static version of your site will need to be re-rendered to use the edited template.
Workflow
You've got two versions of your site. The Manila site has Edit this Page buttons, the static version does not.
You also have two URLs -- perhaps the static version is at www.mysite.com and the Manila version is at editorial.mysite.com.
It's a good idea to bookmark both sites.
There's a new feature in your Manila site designed to make it easier to work on the home page -- the editHomePage page.
In your Manila site is a new /editHomePage page -- at http:\//editorial.mysite.com/editHomePage, for instance. When you go to this page you have your standard editing box. It's the same thing you see when you click Edit this Page.
This page always allows you to edit the current home page. It's another good page to bookmark -- or put in your browser's toolbar, so it's always one click away.
When you click the Post Changes button, one of two things happen, depending on your prefs. Either the Manila version only of your home page is updated, or the Manila version and the static version are both updated.
If you have automatic rendering turned on, then the static version is updated. The next page you see is the static version of your home page.
If you don't have automatic rendering turned on, the next page you see is the Manila version of your home page.
Render this Page
If you're using Manila as a staging server, then you want pages rendered only at your command. That's what the Render this Page button is for.
It appears only on pages that are render-able. (Home pages, old home pages, site structure pages.)
When you click the Render this Page button, the static version of the page gets rendered, and the next page you see in your browser is the static version. You can use the back button to get back to the Manila version of the page.
More about automatic rendering
Automatic rendering has some additional features designed to ensure that the static version of your site is in synch.
When you update your home page, the calendar version of your home page is also re-rendered.
Even when you use Manila Express your home page is automatically re-rendered.
More information about the Frontier-Server
mailing list