Revision of MozdevDocs from Wed, 10/17/2007 - 14:58

Adding, Editing and Deleting Content

CVS is used to edit, update and add all source and content on mozdev.org, including a project's web pages. Web pages are contained in the www/ directory for each project, so to start making changes to your pages you first need to check out your project from CVS. Using a command line CVS client, you would do the following:

cvs -d :pserver:USERNAME@mozdev.org:/cvs login
cvs -d :pserver:USERNAME@mozdev.org:/cvs co PROJECTNAME

Note: The CVS commands above are for use with command line CVS clients. There are Windows and Macintosh CVS programs (such as WinCVS and TortoiseCVS for Windows and MacCVS and MacCVSClient for the Mac) that provide a graphical front end for CVS. For more information about using CVS on mozdev, please see John Haller's CVS Setup guide.

When the checkout is complete all of the project's contents will be on your computer and the web pages can be found at PROJECTNAME/www/. For all new projects there are already some Template Start Pages that have been included in this directory, although you are free to add whatever files or directories you want. After modifying files locally, you can commit these changes back to your project and they will show up on the site.

CVS is also used to take down a page from your site. Files removed in CVS are moved into an area called the Attic and are not deleted from the repository. This is done because CVS needs to keep a full history of all versions of all files in case an earlier version of a file needs to be brought back at some point. Removed pages may not be linked to from your site anymore, but they will still be available online by browsing through your project's Attic using CVSweb. This means that a file removed from your site can still be found through a Google search, for instance.

Default Template Pages

All new projects come with some default template pages that you can edit to get your project started quickly. These templates are designed to use valid HTML and CSS and have been optimized to display best in standards-compliant browsers. HTML and CSS compliance is optional though and you are free to replace any of these files or edit them however you want.

The default templates include:

  • project_nav.html: This file contains the project navigation that will be included on all pages for your project.
  • head.txt: This file will allow you to make additions to the tag that is included by default in the site branding code.
  • local.conf: This file allows you to set a number of different variables that will allow you to configure your project. Any $local_conf_ variable changes should be inside <?php and ?>
  • bugs.html: This file adds a dynamically updated 'Latest bugs filed' list to the bottom of the page.
  • source.html: This file adds a dynamically updated 'Today's CVS commits' list to the bottom of the page.
  • members.html: This file lists each person who has CVS access to a project and what role they have been assigned.

Configuration Options for local.conf

The local.conf file is a configuration file for customising how your project content is presented. Please see the full list of configuration options for all of the details.

Branding Options

The pages you create for your project are wrapped with mozdev's branding and navigation by default. This means that there will be HTML that is added to the files in your www/ directory when they are displayed on the site. The wrappers include both beginning and ending <html>, <head>, <title> and <body> tags. To avoid causing any conflicts it is recommended that you don't include these tags in the web pages you add to your project.

There are a number of ways to alter the branding that is wrapped around your project pages by default. To display any page without any of the branding, the simplest way to do this is to include no_wrap in the URL for that page. For example, to see the Roadmap page without the branding use this URL:

http://www.mozdev.org/no_wrap/resources/roadmap.html

You can also edit the local.conf file to toggle different branding options. To turn the branding off you can modify the $local_conf_no_wrap variable by making the following change in local.conf:

// site branding
$local_conf_no_wrap=ON;

Turning site branding off with this method only turns off the mozdev look and feel, but your pages are still being served with some additional wrapping. To completely turn off all wrapping and have your page content stand alone, you can add this switch to local.conf:

// serve it as it is
$local_conf_serve_as_is=ON;

If you choose to turn off the default branding on your project, please include a logo somewhere on your site with a link to www.mozdev.org.

Header Insert

It is not possible to directly edit the contents of the tag in your project's HTML. It is possible to include custom header content though by using the head.txt file that will be added to the default header content. New projects have a basic file in the main www directory that includes a reference to a default stylesheet:

<link rel="stylesheet" href="project.css">

This file can be edited however you like. Some examples of things to add include:

  • Meta tags
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  • Links to custom stylesheets and javascript code
  • Favicon image to your URL
<link rel="icon" href="http://www.mozdev.org/sharedimages/mozdev-icon.png" type="image/png">
  • Change the title of your pages
<title>My Great Project</title>

You can add a number of different head.txt files in your project's directories. If you include this file in a subdirectory it will be used instead of any files used in higher level directories. If you leave this file out of any subdirectories the file in the top level www directory will be used.

Should you have sub-subdirectories [project/www/subdir/subsubdir/] , and there is a head.txt for their parent directory, and the sub-subdirectories themselves lack a head.txt, that head.txt [project/www/subdir/head.txt], if it exists, will be used before the top-level head.txt [project/www/head.txt].

Posting Files to the Download Mirrors

When you are ready to post a version of your project for download or installation, you will need to copy the release file to your downloads directory. All download files (xpi, zip, gzip, tar, etc.) should live only in the downloads directory. Newly checked in (or changed) release files are scheduled for copying to the mirror servers. It can be as quick as the top of the next hour, yet with some servers you may see a delay of up to 8 hours.

Once your files are copied over they will be available at http://downloads.mozdev.org/YOURPROJECTNAME/. In other words, if you project were called gil, and you placed a copy of release.xpi in your downloads directory, it would be available at http://downloads.mozdev.org/gil/release.xpi.

For more information about the download mirrors or about how to become a mozdev.org mirror, visit the mirrors project.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • You can use BBCode tags in the text. URLs will automatically be converted to links.

More information about formatting options

CAPTCHA
This question is used to make sure you are a human visitor and to prevent spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.