Difference between revisions of "Mozilla.org/How to Work with Site"
m |
(Fix some broken non-wiki-style links to use wiki-style links) |
||
Line 3: | Line 3: | ||
<h1> Asking Questions </h1> | <h1> Asking Questions </h1> | ||
<p>The best way to learn about how to work with the www.mozilla.org site is to ask questions. Community members are happy to help, but it can be difficult to know who to talk to. Here are a few good places to go with questions: | <p>The best way to learn about how to work with the www.mozilla.org site is to ask questions. Community members are happy to help, but it can be difficult to know who to talk to. Here are a few good places to go with questions: | ||
− | </p><p>Email: | + | </p><p>Email: [http://groups.google.com/group/mozilla.dev.mozilla-org/ mozilla.dev.mozilla-org] |
− | </p><p>Chat: | + | </p><p>Chat: [irc://irc.mozilla.org/siteplanning #siteplanning on irc.mozilla.org] |
− | </p><p>Phone: | + | </p><p>Phone: [Mozilla.org:Planning#Planning_Meetings Monthly planning meetings] |
</p> | </p> | ||
<h1> Bugzilla </h1> | <h1> Bugzilla </h1> | ||
− | <p>We use | + | <p>We use [http://bugzilla.mozilla.org Bugzilla] to track bugs as well as enhancements to the site, so we recommend that you get familiar with this tool. You can look through bugs without a [https://bugzilla.mozilla.org/createaccount.cgi Bugzilla account], but you will need one to update an existing bug or open a new one. Please feel free to look through open bugs, comment in a bug, submit a patch or assign a bug to yourself. |
</p> | </p> | ||
− | <ul><li> | + | <ul><li>[https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=www.mozilla.org&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&resolution=DUPLICATE&resolution=---&emailassigned_to1=1&emailtype1=exact&email1=&emailassigned_to2=1&emailreporter2=1&emailqa_contact2=1&emailtype2=exact&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0= All open www.mozilla.org bugs] |
</li></ul> | </li></ul> | ||
− | <ul><li> | + | <ul><li>[https://bugzilla.mozilla.org/enter_bug.cgi?product=Websites;component=www.mozilla.org Enter a new bug] |
</li></ul> | </li></ul> | ||
<h1> Viewing The Source </h1> | <h1> Viewing The Source </h1> | ||
Line 23: | Line 23: | ||
<h1> Making Site Changes </h1> | <h1> Making Site Changes </h1> | ||
<p>There are several ways to edit the site and you are welcome to pick the option that works best for you. | <p>There are several ways to edit the site and you are welcome to pick the option that works best for you. | ||
− | </p><p><i>Note: Most pages on the site are static HTML and can be edited directly, although there are some dynamic and | + | </p><p><i>Note: Most pages on the site are static HTML and can be edited directly, although there are some dynamic and [[Mozilla.org/Generated pages|generated pages]] that are not straight forward to edit. Feel free to [[Mozilla.org#Contact_Us|contact us]] with questions about any specific page.</i> |
</p> | </p> | ||
<h2> Submitting Patches </h2> | <h2> Submitting Patches </h2> |
Revision as of 18:54, 3 February 2012
Docs for people getting involved with site.
Contents
Asking Questions
The best way to learn about how to work with the www.mozilla.org site is to ask questions. Community members are happy to help, but it can be difficult to know who to talk to. Here are a few good places to go with questions:
Email: mozilla.dev.mozilla-org
Chat: #siteplanning on irc.mozilla.org
Phone: [Mozilla.org:Planning#Planning_Meetings Monthly planning meetings]
Bugzilla
We use Bugzilla to track bugs as well as enhancements to the site, so we recommend that you get familiar with this tool. You can look through bugs without a Bugzilla account, but you will need one to update an existing bug or open a new one. Please feel free to look through open bugs, comment in a bug, submit a patch or assign a bug to yourself.
Viewing The Source
The site uses a templating system to add the header, side navigation and footer to all of the pages. If you view the source of a page through your browser you are seeing the results of merging a page with a template. To see what the HTML files look like before they are merged, you can look at the files in our Subversion repository at:
Our repository is open, so feel free to look around at different files to see how things are put together.
Making Site Changes
There are several ways to edit the site and you are welcome to pick the option that works best for you.
Note: Most pages on the site are static HTML and can be edited directly, although there are some dynamic and generated pages that are not straight forward to edit. Feel free to contact us with questions about any specific page.
Submitting Patches
The easiest way to make a change is to work with someone who already has access to edit the site. You can send them the change in a variety of formats. Attaching a <a href="https://developer.mozilla.org/En/Creating_a_patch">patch</a> to a bug is the most common way to do that, but it is also possible to simply email a change to someone. How changes are submitted will vary on your technical experience and on who you are working with.
Using Bespin (Web-based Editor)
We will soon have a web-based editor available for the site. Our goal is to embed <a href="https://bespin.mozilla.com/">Bespin</a> to make it easy for people to edit pages. When this is available, we'll post more information here about how to use it.
Using Subversion
The files for the site are kept in version control using the Subversion tool. You can edit the site by checking out these files, editing them on your computer and then checking them back in.
The following provides information specifically about Subversion for www.mozilla.org. General information about <a href="SVN">Mozilla's Subversion server</a> is also available.
Repository
Note: mozilla.org is setup differently that most Mozilla web properties, so read this section closely before committing any code.
Both stage and production auto-update from svn. Their is no traditional deployment process, so be careful.
Work locally, test in the stage branch, before merging to trunk (live).
Stage
Location of repository: http://svn.mozilla.org/projects/mozilla.org/branches/staging/
Production
Location of repository: http://svn.mozilla.org/projects/mozilla.org/trunk/
Authentication
Access to the repository is based on either your LDAP account or on an SSH key. People have reported problems trying to use SVN+SSH though, so LDAP authentication is the recommended option (the commands below are based on LDAP authentication).
If you need an SVN account or if you have one and need permission to edit the www.mozilla.org files, please <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=mozilla.org;component=Server%20Operations">file a bug</a> to request access to. For people without existing Mozilla commit rights, please follow the process described in <a href="http://www.mozilla.org/hacking/committer/">becoming a committer</a>.
Commands
To check out repository (note the use of the S in https://):
svn co https://svn.mozilla.org/projects/mozilla.org/trunk
Check-in an edit to a page:
svn ci -m "Comment goes here" foo.html
Staging Site
If you'd like to look at your changes before committing them to the live site, there are a couple of options—viewing things on our staging site or viewing them locally.
There is a staging site available at http://www-stage.mozilla.org. However, this isn't the best place to work on changes since the site is set up just to automatically pass on changes to the live site (this gives you a chance to check on things after committing a change to the repository).
Another staging option is to run a version of the site locally based on the files checked out from the repository. This set-up for your computer is documented below (note that we could use some help with making these instructions more user-friendly):
Localhost Site Setup
The following directions will show you how to setup a version of MozWeb (<a href="http://mozilla.org">mozilla.org</a>) on your local machine under the domain name <a href="http://mozilla.dev">mozilla.dev</a>
Note: Once you are done with this guide, <a href="http://mozilla.dev">mozilla.dev</a> should link to your local instance of MozWeb.
<a _fcknotitle="true" href="MAC OSX Setup">MAC OSX Setup</a>
This setup was conducted on an Intel Mac running OS X 10.5.8 which was the latest version of Leopard at the time of this writing. 10.6 (Snow Leopard) has just come out but, this setup has not been tested on Snow Leopard.
If people could test the setup and give feedback for the setup on OS X 10.4+ (Tiger) and 10.6 (Snow Leopard)
Setup for Other Platforms
TODO: More Guides
More guides are coming for Windows and Ubuntu to help developers get up and running on hacking Mozweb.
Ubuntu
- Do 1, 2 and optionally 3 from the instructions below
- You need php5 and php5-curl installed ("sudo apt-get install php5 php5-curl")
- You need to enable the "Actions" Apache module ("a2enmod actions")
- You need to add "mozilla.dev" to the 127.0.0.1 line in /etc/hosts
- You need a file in /etc/apache2/sites-enabled with the following contents:
<VirtualHost mozilla.dev:80> ServerName mozilla.dev DocumentRoot /path/to/your/checkout AddType application/x-httpd-php .php .html DirectoryIndex index.php index.html Options -Indexes RewriteEngine On RewriteMap toupper int:toupper </VirtualHost>
Generic Setup
1) Check out <a href="http://svn.mozilla.org/projects/mozilla.org/trunk/">trunk</a> somewhere
2) Copy <a href="http://svn.mozilla.org/projects/mozilla.org/trunk/includes/config.inc.php-dist">includes/config.inc.php-dist</a> to includes/config.inc.php and edit appropriately
3) Add cronjob for front-page feed parser. Example would be:
*/10 * * * * root cd /data/www/www.mozilla.org/includes/; ./feed-parser.php -c ./feed-parser-config.xml
4) Add Apache vhost for site (example vhost is in <a href="http://svn.mozilla.org/projects/mozilla.org/trunk/README">README</a>)
In the future we may change how staging works, but <a href="Mozilla.org#Contact_Us">let us know</a> if you have any questions about this current setup.
Style Guides and References
Once you're able to make changes to the site, please take a look at the following pages that offer suggestions about writing and coding. Since the site is edited by a range of people across the community, following some guidelines will help maintain a consistent experience for users.
- <a href="http://www.mozilla.org/contribute/writing/guidelines.html">mozilla.org Documentation Style Guide</a>
- <a href="http://www.mozilla.org/contribute/writing/markup.html">mozilla.org Markup Reference</a>
- Design style guide (coming soon)