mozilla.org content and cvsMike Shaver, Terry Weissman, and Jamie Zawinski
fantasai and benc
This document outlines important things you should know about adding content to a subtree of the mozilla.org website follow. Understand them well, for if you break your section of the website, you will have only yourself to blame. (Unless our instructions suck, of course, in which case we'll have to help you fix it, and you may mock us mercilessly.)
- About the mozilla.org Build System
- CVS Access to the Website Tree
- Checking Out
- Checking In
- Web-Based CVS Access with Doctor
- Building mozilla.org
The entire mozilla.org website is built off of a CVS tree of plain,
unadorned HTML files. These and all other files on the website are
contained in the
html subdirectory of the
website CVS root. A set of makefiles and Perl scripts periodically
processes these files and places the result in an
subdirectory. The contents of the
subdirectory is what gets served up as the mozilla.org website. You
can run this build process on your own machine by
checking out the website CVS tree and
All files that are checked in to the CVS repository anywhere
html directory will be visible
on the web site.
By default, HTML files will have the standard mozilla.org left-edge
menu appended to them; those HTML files listed in the
file in the same directory will not be wrapped. (Only HTML files will
ever be wrapped, so you needn't list images in
Files listed in the
NOMENU file in the
same directory will be wrapped with just the horizontal headers and
footers appended to them (without the sidebar menu).
Your files should look like the ones in the
html directory, in that they should have only
your content, and not the menu bar hackery. The menu bar
hackery gets added through the dark magic of Perl. If you want something
added to the left-side menu, you have to ask One Of Us to do it.
When adding or removing files, altering the
file in any way, or—especially—editing either the root
you must ensure that running
from the website root directory completes successfully. This will
regenerate the Makefile to take into account the new files.
If you do something that horks the
process, then no new content can show up anywhere on mozilla.org until
it is fixed. Breaking things in this way is therefore a fairly big
deal, so don't do it. You wouldn't check in source code without making
sure it compiled first, would you? Of course not. This is the same
There are two CVS repositories, the primary at
cvs.mozilla.org and a secondary,
read only at
The primary CVS repository is accessed via
(If you're accessing the mirror, use
$CVSROOT variable to
The password for
anonymous is anonymous.
$CVSROOT variable to
Where it says your%address above, you would substitute
your canonical email address, but replacing the
%. For example, if your email address
$CVSROOT would be
$CVSROOT is set properly, you can check out the website.
The entire tree is very large, so we suggest doing a checkout of the
lowest-possible directory. For example, someone interested in Networking QA
would probably check out just the /quality/networking directory:
cvs -z3 co mozilla-org/html/quality/networking
-z3 is to compress things during transit.
If you need to build the website, you also need to check out the ScriptBase module:
cvs -z3 co ScriptBase
ScriptBase module is the smallest documentation module available and contains only the set of necessary scripts, the wrapper and a minimal set of docs.
The MozillaOrgTrim module checks out a partial version of the web site that's missing some of the larger pieces. The MozillaOrg module checks out the entire web site. For a complete list of modules type:
cvs co -c
You must cvs add before committing a new file, and you
should follow all the other rules of good CVS hygiene as well, such
as properly tagging binary files with
-kb to avoid
In general, you are expected to behave responsibly, and to not modify files that you know nothing about. If you are not completely sure about what you are editing, opening a bug in "Documentation" and involving other well-informed contributors is a good idea.
There are a few files (in particular,
mozilla-org/html/news.html) that are tightly controlled;
any attempt to check in changes to these files will fail. If you really
need to make a change and the system refuses you, send mail to
If you do not have a CVS client or cannot use one, we have a webtool called Doctor which can be used to create and edit files. If you have an active CVS account, you can submit changes through Doctor. If you don't, you can still use Doctor to create a patch.
To use Doctor to edit an existing page, click on the "Edit this Page" link at the bottom of the document or enter its path in the text field on Doctor's main page. The page's HTML will be presented in an editable text field. Make your edits, and hit "Review Changes". Your changes will appear in "diff" format. If you have CVS access, you can commit your changes right there. If you do not have CVS access, you can copy the diff to a text file, which you should submit as a patch in Bugzilla.
To create a new page visit http://doctor.mozilla.org.
Doctor is not recommended for people who already know or are willing to learn CVS.
To build mozilla.org you will need:
- CVS (to check out the sources)
- Perl 5
- Template-Toolkit Perl module (2.13 or later)
- DateManip Perl module
- XML-Simple Perl module (needed to build front page)
- GNU make
If you are planning to work with XML files on developer.mozilla.org, you will also need libxslt.
If you're running Unix/Linux, you should know where to get your packages
from. The package names are usually
make. If you're on Mac, you already have
and you can get
make by installing the
Developer Tools CD.
The perl modules can be installed from CPAN with the following commands:
perl -MCPAN -e "install 'Template'" perl -MCPAN -e "install 'Date::Manip'" perl -MCPAN -e "install 'XML::Simple'"
There are, of course, multiple routes to getting the appropriate tools installed. I used ActivePerl (it comes with nicer documentation), but I'm told Cygwin perl also works.
- Install Cygwin
- When prompted to choose line endings, pick UNIX-style.
- When prompted to choose packages, make sure that
make, are selected for installation. (Select
libxsltas well if you need it.) If you want to install Perl through Cygwin rather than ActivePerl, select the
- Add the cygwin bin directory to your
PATHenvironment variable. You can do this in the System dialog brought up by right-clicking My Computer (permanent, recommended) or by typing set PATH=C:\path_to_cygwin\bin;%PATH% at the command prompt (temporary, applies to that command session only). You also need to set a
TZenvironment variable to a time zone (such as
PST) for the Date::Manip Perl module to work correctly.
- If you didn't install Perl through Cygwin, install
and tell it to add Perl to your
- Install the Template-Toolkit, DateManip, and XML-Simple Perl modules:
- If you have ActivePerl installed, you can install them with ppm:
- Start the DOS command prompt
- Type ppm and press Enter
- Follow the setup instructions, if any. (Don't worry about them too much.)
- Type the following commands into the ppm prompt:
ppm>install Template-Toolkit ppm>install DateManip ppm>install XML-Simple ppm>quit
- Start the DOS command prompt
- Type the following commands:
>perl -MCPAN -e "install 'Template'" >perl -MCPAN -e "install 'Date::Manip'" >perl -MCPAN -e "install 'XML::Simple'"Perl will run you through some setup configuration (same as ppm's) the first time you install a module. Follow the instructions, but don't worry about them too much.
To build the mozilla.org tree, cd into
and run make.
If you can't run make, try running the