Import
SiteLite 2.0

Import

Templates ] [ Resources ] [ Blocks ] [ Pages ]

SiteLite 2.0 allows import of all kinds of components. The reason for this is twofold:

  • You may build a site with contributions from many people on the Internet.
  • You may reuse material from other sites or pages.
You may import from the Internet, using a http-protocoll, or you may import from a disk address, a file path.

SiteLite is built with the strategy that all components in a site should always be stored on one disk volume. All components that are located on other volumes or on the internet are imported, that is copied, to the local disk during build. A consequence of this strategy is that changes you do to the copies will be erased the next time you do an effective import, that is the next time you build. You may of course change the script to avoid this.

The strategy is chosen to support the most common situations, where a site is mainly selfcontained and 99% of the work is on your local machine. The imports you do are mainly contributions from other writers on the internet. The strategy also makes it easy to share resources and templates to keep up a standard layout and appearance within a (virtual) community.

The strategy allows a site to be distributed in many catalogs on one disk volume. This may be a good thing while testing and refining your site, but it makes it complicated to move the site to another volume, for instance for publishing. Unless you work directly on the server that will host the site, it is a good idea to keep all components of a site completely within one catalog. This does not prevent you from importing during build, and it makes it easy to move a site by simply moving the catalog.

When you plan a site, it is wise, but in most cases not necessary, to use the name standards for catalogs with templates and resources. Templates should be placed in a catalog templates and resources in a catalog gfx.

Below is a description of the import of different kinds of components and some comments and advises to their use.

TopOfPage

Templates

Templates may be imported from:

  • a complete URL (www-ia.iof.no/~borres/gb/templates/)
  • a complete disk path (d:\mysstdsite\templates\)
or templates may reside on a disk path relative to the site catalog (..\mysstdsite\templates\ or simply: templates). In this case they are not copied, but used as is.

SiteLite copies all imported templates to the the catalog templates which is a catalog directly below the site catalog. If the TEMPLATES= -line in the script contains a remote location (other disk volume or internet address), all files in that location are copied to the templates-catalog.

If, after the copying, some "standard" templates are missing, these are produced by SiteLite if needed. If the TEMPLATES= -line is missing, the necessary templates are produced by SiteLite and are put in the local templates-catalog as needed. This way SiteLite always have access to the basic template scheme.

If the script contains any ATEMPLATE= -lines, the same copy procedure are exercised; all templates ends up in the same templates catalog.

The disadvantage of importing is that if you do changes to the local copies of the templates, these changes are disregarded next time you build since the local copies are overwritten. The only remedy for this is to edit only the originals or change the script.

TopOfPage

Resources

By resources we understand all graphics in the templates, and the style sheet file.

Resources may be imported from

  • a complete URL (www-ia.iof.no/~borres/gb/gf x/),
  • a complete disk path (d:\mysstdsite\gf x\)
or they may reside on a disk path relative to the site catalog (..\mysstdsite\gf x\ or simply gf x). In this case they are not copied, but used as is.

SiteLite makes a cop of imported resources in the catalog gfx which is a catalog directly below the site catalog.

If, after the copying, some "standard" resources are missing, these are produced by SiteLite. If the RESOURCES= -line is missing, all resources are produced by SiteLite and are put in the local gfx-catalog. This way SiteLite always have access to the basic resources.

NOTE that templates (and pages and blocks) should always refer to resources as if they were directly accessible in a catalog gfx. SiteLite will correct the references.

TopOfPage

Blocks

Blocks may be imported from

  • a complete URL (www-ia.iof.no/~borres/gb/ma-2d/matrix.html),
  • a complete disk path (d:\mysstdsite\blocks\cv.html)
or they may reside on the same disk volume as the site catalog (..\mysstdsite\blocks\cv.html or blocks\cv.html). In this case they are not copied, but used as is.

When blocks are copied, SiteLite uses the following naming strategy: SiteLite establish a local catalog called imported, and all imports (except templates and resources) are stored within this catalog. Subdirectories are established to match the structure the blocks are copied from. For instance the source
   www-ia.hiof.no/~borres/gb/ma-2d/matrix.html
is copied to:
   c:\mysite\imported\borres\gb\ma-2d\matrix.html
assuming that c:\mysite is the site catalog. This is not a full guarantee against name conflicts, but it makes them fairly unlikely.

SiteLite attempts to copy images which are referenced in a block. They are copied with the same naming strategy as for the block, and their addresses are calculated so it fits the page the block are pasted in. SiteLite does not copy other files, like applets, sounds or multimedia files.

TopOfPage

Pages

Pages may be imported from

  • a complete URL (www-ia.iof.no/~borres/gb/ma-2d/page-2d.html),
  • a complete disk path (d:\mysstdsite\pages\p-cv.html)
or they may reside on a disk path relative to the site catalog (..\mysstdsite\pages\p-cv.html). In this case they are not copied.

The same naming strategy applies for pages as for blocks. Imported pages are always considered readymade, that is they are not built. The K-option (Keep) is assumed by SiteLite, and BLOCK-lines that belong to the page are ignored. This means that the page is not assembled from blocks but all other substitution and building of index and tables of content are done. Updates to the page are only done on the local copy.

SiteLite attempts to copy images which are referenced in a page. They are copied with the same naming strategy as for the page. SiteLite does not copy other files, like applets, sounds or multimedia files.

Pages with the N-option is not copied, they are addressed directly from the site.

TopOfPage


Vevsted: B Stenseth
Modul: B Stenseth
Bygget: June 24, 2002
---------------------------