Creating and managing Web sites


his chapter describes how to use Site Manager, a visual site-management tool for creating and managing Web sites with drag-and-drop ease. Site Manager is the main graphical interface for Web site managers and LiveWire application developers.

About Site Manager

Experienced Web masters know the difficulties of creating and maintaining a large Web site with many pages, images, media types, and links. A single page can contain dozens of links to other pages and files. Links between pages and content can be broken easily. URLs can be changed without the Web master's knowledge, often leading into "dead ends" and "cul-de-sacs" when they link to a page that no longer exists.

Site Manager assists with Web site maintenance tasks such as relocating files and documents. When you move or rename files or documents, Site Manager alerts you to hypertext links referencing URLs that no longer exist and automatically maintains existing links within the site.

Here are a few of the things you can do with Site Manager:

Getting the big picture

Maintaining the integrity of information and hypertext links in a rapidly changing Web site environment can be time consuming and complicated. Site Manager provides tools that reduce the time and complexity to enable effective Web site management.

As illustrated in Figure 2.1, the basic site-management process is

  1. Create a new site or work with an existing one.
  2. Add, delete, move, or edit documents and image files.
  3. Fix broken links to locations inside or outside the site.
  4. Move site to a server connected to the Web (deploy) so others can access it.
Managing a site: a bird's eye view

Your local file system serves as the "staging area" where you develop and test the site. Once you're satisfied with the changes you've made, you can make the site available to others on the Web or on an intranet within your own company or department.

Managing a site with Site Manager means that you can easily perform general housekeeping chores on the files that make up the site. For example, you can add, delete, and edit files in the site, check the integrity of links and fix those that are broken, and then transfer (deploy) the site to a location where users can access its information.

Note: Newly created sites are automatically under management.

Some terms

If you are an experienced Web site manager, you are probably familiar with many of the following terms. However, some of the terms are unique to the Site Manager application. Understanding these terms should prove useful to novice and "Webmeister" alike.

Term

What It Means

Build

Compile source files (JavaScript embedded in HTML or JavaScript only) with the LiveWire compiler to create an executable (.web) file--LiveWire application.

Deploy

Transfer a managed site to a location where others can access it. The location can be on your local file system or a remote server connected to the Web.

External link

A link in an HTML page that points to a location outside the managed site, of the form http://server.domain/.

Invalid internal link

A link in an HTML page that points to another page within the managed site but that no longer works.

Manage

Select a directory and then choose Site|Manage to create a site database that tracks all files and hypertext links. You can then easily perform file-management tasks and check link integrity.

Site

A collection of hyperlinked HTML, JavaScript, and image files that are under management by Site Manager.

Site root directory

The top-most managed directory in a site.

Unmanage

Select a currently managed site and then choose Site|Unmanage to delete the site database files. Site Manager will no longer be able to automatically perform site-management tasks.

Getting started

If you're running Windows NT, double-click the Site Manager icon in the LiveWire program group. For Unix platforms, type sitemgr at the command prompt.

Site Manager window

The Site Manager window is composed of two panes. The left pane displays your file system in much the same way as the Windows File Manager. Because no site is currently selected, the Site drop-down list and the default Properties tab are blank.

Managing an existing site

If you already have a site for which you want to verify links and perform file-management tasks, you can place it "under management." When a site is managed, Site Manager creates a database (one NewSite.site file and a .site directory for every subdirectory) to keep track of files and links. In this section, you're going to place the LiveWire samples directory under management.

  1. Select the drive on which you installed LiveWire from the Drive drop-down list.
  2. In the file-management pane (left side), scroll down to the samples directory. For example, if you installed LiveWire in c:/server/livewire, the path is /c:/server/livewire/samples.

    Note: Site Manager follows the Unix convention of displaying pathnames with slashes.

  3. Select the samples directory and choose Site|Manage.
Site Manager creates the database files and displays the newly managed site in the file list. Red triangles in the lower-left corner of the site's directory and file icons indicate that the site is under management.

Important: Site Manager creates .smg files in the .site directories--one .smg file for every HTML file--that it uses to track links. If you accidentally delete a .smg file, you'll need to remove the site from management, and then remanage it by choosing Site|Manage for Site Manager to work properly again.

What do all those icons mean?

Site Manager uses distinct icons to represent the various types of files under management. For example:

Creating a site

Site Manager provides three ways to create a site:

The Site Manager wizard takes you step-by-step through the process of creating the type of site that's appropriate for your needs. The wizard is a software module that solicits answers from you. In response to those answers, it creates one or more Web pages, images, and/or other document types, and places them in the location you specify.

Once the pages have been created, you can customize, add, delete, and modify them. Thus, a wizard provides a useful and sophisticated starting point for further Web site development.

Use the Next and Back buttons to move through the wizard dialog boxes. When you are satisfied with the selections you have made in each dialog box, click Next to continue. Use the Back button to retrace your steps. Click Cancel to end the session. If you end the session before Site Manager has created the new site, the selections you have made, and any information you have entered, are discarded.

When you have completed all the steps to create a site, click Finish to create the site based on the information you've provided.

Creating a site from a template

Creating a new site from a template is one of the quickest ways to get up and running with Site Manager. Templates are time-saving individual pages, sub-Webs, or entire Webs that you can customize. Templates can also be used within your organization to encourage consistency of style and content, much like style sheets in a word processor. When you use a template, your newly created site automatically contains links to other pages, images, navigational tools, and forms---all of which you can modify for your particular needs.

  1. Choose Site|New Site.

  2. Select the "Create a new site from a template" option, and click Next.

  3. Click Next to accept the default directory as the location for your new site files, or click Browse to specify a directory other than the default, and then click Next. If you specify a directory that does not exist, Site Manager prompts you to create it.

    Site

    Manager provides eight categories (containing twenty-four individual templates) of representative Web site templates for you to choose from. These templates are for personal, organizational, or business use.
    Template

    Select For

    Company Department

    Internal office business. Includes pages and links for a calendar, client information, employee handbook, and meeting minutes.

    Company Product

    Product promotion. Includes pages and links for product information, information request and feedback, and product index.

    Company Sales

    A store or reseller. Includes pages and links for an online catalog, store information, store map, feedback, sales, and promotions.

    Company Service

    A store or person who provides a service. Includes pages and links for information request, customer testimonials, feedback, and service information.

    Personal

    You! Includes pages and links for personal interest, resume, daily journal, expressions, and multimedia.

    Family

    A family or household. Includes pages and links for each family member, shared activities, scheduling, and a bulletin board.

    Neighborhood, Community Center

    A group of people. Includes pages and links for resources, calendar of daily events, community history, discussion center, and feedback.

    Topical or Special Interest Group

    A specific topic of interest. Includes pages and links for sponsors, schedule of events, reservations, references, and feedback.

  4. Select a template category for your new site, and click Next. A dialog box appears containing three options that usually include a single-page template with no links, a multiple-page template containing some links, and a more advanced template with many pages and links. The types of pages and links depend on the template category you selected.

  5. Select one of the three template options, and click Next.

    A dialog box appears asking you to define the site information:

  6. Type your name or office name, email address, and the title you want to use for the site.
  7. Click Finish.
Site Manager creates the new site based on the template choices you've made. The newly created site might look something like this:

The files in the new site are displayed in the Site Manager file list. Red triangles in the lower-left corner of the site's directory and file icons indicate that the site is managed.

Note: You can use the Site drop-down list to switch between sites you've created.

Creating a site based on an existing one

Another quick way to get started with Site Manager is to create a site that uses files from an existing Web site on any server connected to the network. Think of this as the "Hoover effect" or "site sucking." Selecting this option means that Site Manager will download all directories and files that are linked to one another from the site you specify to your local file system.

  1. Choose Site|New Site.
  2. Select the "Create a site based on a remote site" option, and click Next.
  3. Click Next to accept the default directory as the location for the downloaded site files, or click Browse to specify a directory other than the default, and then click Next. If you specify a directory that does not exist, Site Manager prompts you to create it.
  4. Type the URL for the site that you want Site Manager to download to your local file system, and then click Next. Site Manager copies all linked directories and files from the specified remote site to the working directory you've indicated.

    Note: This process might take a while depending on the size of the site you're downloading and the type of network you're on. Specifying the actual root directory and ending the URL with a slash `/' might speed up the operation.

The files in the new site are displayed in the Site Manager file list. And just like sites created from templates, the site's directory and file icons have red triangles in the lower-left corner to indicate that the site is managed.

Creating an empty site

An empty site is one that does not contain any subdirectories or files (except those that Site Manager uses for site-management tasks) under the working directory. Since you're starting from scratch, an empty site allows for complete customization of your site.

  1. Choose Site|New Site.
  2. Select the "Create an empty site" option, and click Next.
  3. Click Next to accept the default directory as the location for the site, or click Browse to specify a directory other than the default, and then click Next. If you specify a directory that does not exist, Site Manager prompts you to create it.

    Site Manager creates an empty directory for the site with a red triangle in the lower-left corner of the icon to indicate that the site is managed.

Working with files and directories

If you're a Web site manager, you probably spend the bulk of your time performing basic file-management tasks. This section describes how Site Manager can help make those tasks easier.

Creating a new directory

  1. Select a directory in the file list under which you want to create a subdirectory.
  2. Choose File|New Directory.
  3. Type the new directory name, and click OK to create the directory. The new directory is displayed in the file list.

    Note: Directories you create are automatically under management if the parent directory is under management.

    Renaming a file or directory

    1. Select the file or directory that you want to rename.
    2. Choose File|Rename.
    3. Type the new name, and click OK to make the change. Site Manager automatically updates links in HTML pages within the site to reflect the change in file and directory names.

    Important: Do not use other file-management tools, such as Windows File Manager, to rename files or directories that are being managed by Site Manager. If you do, links will not be updated automatically. You will need to update the site manually by choosing Site|Check Internal Links, and then place the changed files or directories under management again.

    Note: Although Site Manager can keep all of the documents in your local site up-to-date, if someone else has linked to your Web pages from another Web site, their links become invalid when you move or rename the HTML file. If you know which external pages have links to your pages, it is good etiquette to inform their owners when you move or rename files.

Deleting a file or directory

  1. Choose File|Delete.
  2. Click OK to delete.
Important: Deleting a file or directory removes it from your hard disk, not just management.

Note: Under Windows NT, you must delete any subdirectories and files in the directory first.

Configuring editor and browser location

With Site Manager you can specify which browser and HTML editor to use when making changes to files or viewing files in your site.

  1. Choose Options|Browser/Editor Configuration.

  2. Select the browser you want as the default. If you select a browser other than the default, enter the full path of the browser location.
  3. Select the editor you want as the default. If you select an editor other than the default, enter the full path of the editor location.
  4. Specify whether you want the browser or editor to start when you double-click a managed file.
  5. Click OK to save the new settings.

Editing a file

Note: For information about editing HTML files, see the Netscape Navigator Gold Authoring Guide.
  1. Select the file that you want to edit.
  2. Choose File|Edit. The editor you specified in the Browser/Editor Configuration dialog box opens displaying the selected file. The default editor location is the directory in which Netscape Navigator Gold is installed, unless otherwise specified.
  3. Edit the file, and then save your changes.

    Tip: Double-clicking an HTML file is the same as choosing File|Edit if you've specified to start an editor by default. If you double-click an HTML file that's not part of a managed site, the browser will start instead.

Browsing a file

Note: For information on browsing, see the Netscape Navigator Handbook.
  1. Select the file that you want to browse.
  2. Choose File|Browse. The browser you specified in the Browser/Editor Configuration dialog box opens displaying the selected file. The default browser location is the directory in which Netscape Navigator (or Navigator Gold) is installed, unless otherwise specified.
  3. View the file, and then exit.

    Tip: Double-clicking a file is the same as choosing File|Browse if you've specified to start a browser by default.

Creating a new page

  1. Select the managed directory in which you want the new page to reside.
  2. Choose Site|New Page.
  3. Enter a filename, and click OK to create the file.

    The HTML file icon is displayed if the directory in which the file was created is under management. The new page contains the text "empty document" and can be edited.

Note: If you add a file or directory to a managed site using the Windows File Manager (or any utility outside Site Manager), you need to first choose Site|Check Internal Links to update the file list, and then select it within Site Manager, and choose Site|Manage.

Managing links

An HTML document has three types of links--links within a page, links between pages, and external links that point to locations outside the managed site. External links can be to directories or files on other file systems or FTP or HTTP servers; "Mail to" links; or any URL that is not part of the managed site.

Site Manager tries to automatically keep all document links in your site up-to-date; however, links do sometimes become invalid--a URL request returns a "no response"--and need to be fixed. Also, you might need to manually modify a link based on changes to your site. The following sections discuss methods for managing links in your site.

Viewing site links

To view links throughout an entire site, use the Site Links tab.

  1. Select a site by clicking the site's root directory.
  2. Click the Site Links tab in the right pane of the application window.

The top list displays all the site links selected for view. You can sort the list by clicking the header bar. The list is sorted by the column header that you select.

You can display invalid internal links, external links, or both. Use the drop-down list to the right of the External Links checkbox to select the type of external links you want to view.

Selecting

Means That

Icon

All

All external links are displayed.

All icons

Valid

External links that return a verified response when a URL request is made are displayed.

Invalid

External links that return a "no response" when a URL request is made, as well as any broken internal links, are displayed. A link is invalid if

Unchecked

External links that haven't been checked are displayed.

Can't Check

All mailto URLs are displayed.

The bottom list displays pages that contain the link selected in the top list. The first column names the page in which the link is used, and the second column indicates the number of times that the link is used.

Note: Site Manager does not track dynamic links that JavaScript creates.

Viewing page links

Part of link maintenance is finding out what files link to a selected page in your site, as well as any links from the page.

  1. Select a file from your site.
  2. Click the Page Links tab in the right pane of the application window.

The top list displays links that lead out of the selected page in the file list. You can sort the list by clicking on the header bar. The list is sorted by the column header that you select. The bottom list displays page links that point to the selected page in the file list.

Modifying links

When you manually edit a link, all the links in the site that point to that location will be modified.

  1. Click the Site Links tab.
  2. Select the link you want to modify from the Link list.
  3. Choose Edit|Modify Link.

  4. Type the new URL for the link, and click OK.

Checking internal links

An internal link is an HTML page that points to another page within the managed site. If you rename or edit a page using tools outside Site Manager, links in the page will not be updated. To update the affected links, Site Manager needs to recheck all internal links.

Checking external links

Because external links often change and become invalid, you can use Site Manager to check and update them.

  1. Select the site directory that you want to check.
  2. Choose Site|Check External Links.

    Site Manager checks all links in the site that begin with http://server.domain/ and displays any invalid links.

The Site Links tab is displayed when the link-checking process is completed, showing the number of valid and invalid links, as well as any new links that have been added to the site.

Repairing case problems in links

Site Manager manages files by their actual filenames, with uppercase and lowercase considered.

  1. Select the site to examine for possible case-sensitivity problems.
  2. Choose Site|Repair Case Sense Problems.

    Site Manager compares the links in the site to the actual file names in the directory tree and modifies the links to conform to the actual filenames.

Note: Although Site Manager can keep documents in your local site up-to-date, if someone else has linked to your Web pages from another Web site, their links become invalid when you move or rename the HTML file. If you know which external pages have links to your pages, it is good etiquette to inform their owners when you move or rename files.

Checking for unused pages

The Unused Pages tab displays pages within the site that have no other pages pointing to them. One common example is the top-level page (index.html) in a site, which often has links to all other pages but none that point back to it.

  1. Select the root directory of the site.
  2. Click the Unused Pages tab in the right pane of the application window.

    The filenames and paths of the unused pages in the site are displayed.

Removing a site from management

You can remove an entire site or an individual file from management. Files not under management cannot be deployed. This is useful when parts of a site are still under construction.

If Site Manager is interrupted when it is creating a site, the internal Site Manager database structure might become corrupted. Unmanage the site directory to remove the corrupted files.

"Unmanaging" files and directories

  1. Select the file or directory that you want to remove from management.
  2. Choose Site|Unmanage.

    Site Manager deletes the site database of files and links within the site and removes the site from management. All files and directories within the site are displayed with a plain icon--no red triangles--indicating that the site is no longer under management. The .site directory and its associated housekeeping files are removed.

Note: Files must be under management to be compiled into LiveWire applications.

Building LiveWire applications

Site Manager makes it easy to compile LiveWire applications.

Note: For information about working with LiveWire applications, see Chapter 3, "Developing applications."

  1. Select the site directory that contains your source files.
  2. Click the Properties tab, and type a .web filename for the site.
  3. Choose Site|Build LiveWire Application.

    A compile message box appears.

    The source files are compiled into a .web file (LiveWire application) that you can install with Application Manager.

    Note: If you don't specify a .web filename, the default is NewSite.web.

Deploying a site

With Site Manager you can create a site on your local file system and then deploy (publish) it locally or to a remote server connected to the Web. The remote deployment location is the area from which your HTTP or FTP server can serve pages to users accessing your Web site. This is typically a directory in the document root of your server. Only files and directories that are under management can be deployed using Site Manager.

  1. Select the managed site you want to deploy.
  2. In the Properties tab, type the location to which you want the selected site deployed. For example: http://caliban.mcom.com/testsite

    ftp://server1/testsite

  3. Choose Site|Deploy Site. Site Manager copies the entire site to the specified deployment location. A message box appears notifying you that the files are being copied.

    Note: If the server you're deploying to uses access control, you'll need to provide a password for the copy operation to begin.

Configuring a proxy server

Firewalls protect information in internal computer networks from external access. A proxy server sits on top of a firewall and acts as a conduit, providing a specific connection for each network service protocol. Proxy software retains the ability to communicate with external sources, yet is trusted to communicate with an internal network, such as your site development area. If a firewall separates your site development location and the server you want to deploy to, Site Manager uses the appropriate proxy server to access the Web server. However, be aware that some proxies might not support all the features for sitesucking and deployment.

  1. Choose Options|Proxy Configuration.

  2. Type the hostname and port number for the FTP protocol's proxy server.
  3. Type the hostname and port number for the HTTP protocol's proxy server.
  4. If you want to bypass the proxy server for one or more specified local domains, type them in the "No Proxy for" box.

    All HTTP requests for the specified host servers go directly to the host (not using any proxy).

A proxy that runs on a host server outside a firewall cannot connect to a server inside the firewall. To bypass the firewall's restriction, you must include in the "No Proxy for" box any internal server you're using.

Note: If you use local hostnames without the domain name, you should list them the same way. Multiple hostnames are delimited by commas, and the wildcard character (*) cannot be used.