School of Computing

bpage (Build Page)

Introduction

bpage is the recommended build script for publishing general purpose web pages. It can be used in a simple mode to easily generate a page in the house style with no navigation side bar. Alternatively, options can be provided for more advanced requirements including a navigation side bar. Do not use bpage to publish pages which have a pre-defined layout such as module pages, business card pages and publication indexes which use bmp, bp and bipi build scripts respectively.

Input

bpage typically uses a web content file (e.g. index.wc or test.wc) as input. A web content file contains just the content of the page, written in HTML. It must not contain any HTML header information or <body> tags. (See example file.wc)

For more advanced requirements, you can include Template Definition Language elements if you so wish. However, bpage does not interrogate the CSWeb database therefore you cannot inlcude information inserts (eg. you cannot include #if, #foreachrow).

For backwards compatibility, a template file (e.g. index.template or test.template) may also be used as input and this should contain the constructs shown in /web/cs/docs/skeleton.template. However, it is recommended that you convert old template files to be web content (.wc) files.

Meta Data

If you want to include metadata in the webpage you must provide a separate file containing the metadata information. This file must have the same filename prefix as the content file but with a .meta extention e.g. index.meta. See Using metadata to aid search engine rankings


Usage

  1. bpage   [OPTIONS]   [-p page-type]           pagename-prefix
  2. bpage   [OPTIONS]   template-filename   pagename-prefix

OPTIONS:

-h Help
-e Build the external web page only (Default)
-i Build internal web page only
-b Build both internal and external web pages
-t page_title Set page title (Default: Computer Science at Kent)
-o output_dir Set output directory (Default: current working directory)

Page-type:

-p page-type Specify the page type (navigation side bar) as one of:
cs, people, teaching, ug, pg, internal, activities, news
The default is cs, which has no side bar.

Examples

bpage test Create the external web page test.html in the current directory by combining the content provided by test.wc with the house style.
bpage -b -p teaching -o /foo test Create both internal and external web pages, i.e. test.local and test.html, in the direcotry /foo by combining the specified navigation side bar (teaching in this instance), and the content provided by test.wc with the house style.
bpage -e -p people -t "Prof. Smith's interests page" test

Create the external web page only, e.g. test.html, by combining the specified navigation side bar (people in this instance), and the content provided by test.wc together with the house style and incorporating an HTML title into the HTML header section of the page.

Please note that incorporating an HTML title tag can also be achieved without using the -t command line option. Instead, place an HTML comment of the following type as the first line in your web content (.wc) file

<!-- <title> your_title_string </title> -->

replacing the your_title_string with your own words.

It is good practice to include an HTML title. It is used by search engines, is used by the browser as the bookmark label, and is displayed in the title bar of the browser.

bpage /foo/my.template test Create the external web page test.html in the current working directory by using the the given template /foo/my.template and including the content from the file test.wc.


School of Computing, University of Kent, Canterbury, Kent, CT2 7NF

Enquiries: +44 (0)1227 824180 or contact us.

Last Updated: 13/09/2010