The gimp.org website (GimpWeb) is built from the module gimp-web on the GNOME Subversion server. To work on the website, you need to obtain this module, then install it. This creates a working copy of the website in another folder on your system. You then set up a local web server (apache) and then access your copy of the site with your web browser. This allows to see the changes you have done and then look at it so there is no problem before commiting it or sending it
- Preliminaries
- Getting the source
- Setting up apache
- Installing the site
- Administration of the site
- News
- Templates
- Bugs
- Patches
Preliminaries
You will need subversion to download the source, python to install it, and apache or apache2 to run a local webserver to view your changes. Your distro documentation should tell you how to install packages. For example, on debian-based distros, you need to do:
$ sudo apt-get install subversion $ sudo apt-get install python $ sudo apt-get install apache2
Getting the source
Next download the source from the GNOME Subversion repository. This will create a folder 'gimp-web' in your current folder, and everything you download will go into that. Warning at time of writing, the module is about 54MB.
$ svn co http://svn.gnome.org/svn/gimp-web/trunk gimp-web'
Setting up apache
Installing the apache or apache2 package should start the webserver automatically. Try http://localhost/ in your web browser. On some distros this will give you information about which folders hold configuration files and web pages.
You need to enable SSI (Server-side includes) on your apache server. See
https://wiki.ubuntu.com/ServerSideIncludes for instructions for apache2.
SSI needs to be configured with the
XBitHack, and it needs to treat both .html and .xhtml files as files to be parsed. The default apache configuration probably won't be set up for .xhtml, so you may need to add a line AddType text/html .xhtml somewhere suitable.
If you want a small HOWTO for the SSI support you can find it at
http://beta.fluff.ath.cx/gnu-linux/howto/apache_ssi.html, and here is a example available in GettingStartedWithGimpWeb/HttpdConfExample.
You also need to set apache up in such a way that the /includes virtual directory goes to the correct place. There are several ways to do this: a brutal hack with a directory alias is one way. Another is to set up a subdomain just for the gimp website. See
https://wiki.ubuntu.com/LocalhostSubdomain for instructions on this.
Quick apache troubleshooting:
No title bar or links bar : html files are not being processed for SSI. Check you have "XBitHack On".
title bar and links bar appear, but not formatted properly: xhmtl include files are not being processed for SSI. Check xhtml is being treated as text/html by apache: you may need to add a line "AddType text/html .xhtml".
Text "[An error occurred while processing this directive]" in page: check apache can find files in the /Includes folder.
After you have setup apache with the supported options required by the website then you will need to find out what owner is used by apache. The different owners could be "www-data", "apache" etc. There are several ways to find this:
ps aux | grep apache2
will list the processes involved in apache.
Alternatively, in the apache configuration folder (probably /etc/apache2) , do
grep User *
Installing the site
Create the /home/wgo directory (you can actually use any directory but we will use /home/wgo as a example here). This will be the directory where the test site will be installed.
copy the file in the root install.config.sample to install.config, and change the two variables so they begin with the root directory where the test site will go, /home/wgo
Standing in gimp-web directory (root directory of the module) run:
PYTHON=python2.2 ./install.sh /home/wgo ;
* If you want the more advanced features of the site (what are these), you need to run the install as root and change ownership of files, like this: as root and standing in gimp-web directory (root directory of the module) run:
chown -R apache . ; PYTHON=python2.2 ./install.sh /home/wgo ; chown -R username .
Where the "username" is the username you use on the machine.
Make changes in the main tree of the site.
After you have done changes in the main source tree, reinstall the site with (standing in gimp-web root directory):
chown -R apache . ; PYTHON=python2.2 ./install.sh /home/wgo ; chown -R username .
So this means that you: Edit the source tree, reinstall the site to /home/wgo and then commit it.
NOTE! In a very near future this might change a lot depending on how the website will change in the source. Some changes might be that the SSI support is not needed for the normal pages. So the install instruction above is used for the SSI things that are used at the moment (2003-09-09). So this might change soon.
Administration of the site
All the administration parts are done via a few scripts and pages. The main page of administration is the
http://www.gimp.org/admin/ page where there are howtos and some other useful stuff. Check it out a little and you will see that there are some cool stuff in there.
News
The way that the new website is handling news and how news are edited to the site is via the site mentioned above. But there is one thing you need to do before you can start to edit the news. Here is the steps you need to do before the news are being showed on the site.
There is a howto on the website also, take a look at:
http://www.gimp.org/admin/news/howto-news.html
Start a new mail with your favorite mail client and follow the steps here:
Add news-at-mmmaybe-dot-gimp-dot-org in the TO: field
In the subject add: News:
Also after News: add a topic. Example: News: New release
In the body of the mail you add whatever the news is going to say. Example: Release notes.
After sending the mail to the site you will be able to edit it in the admin page. Check the News section on that site to find out more.
Warning! Don't use <pre> tags for the news sent to the site it will break the news. The news is in a <div> element so anything that can be used in a <div> element is valid content.
Templates
The templates on the website is there to be used for new files being created, all the new sites being added should go with the templates. Everybody is responsible for the templates to be correct for thoose sections that has a template. Sometimes there are different templates depending on what the section is going to include. Example: template.htrw, howto-template.htrw and so on.
In the files there are also examples of how things work on the site and what tags to use for what to be showed on the site. Follow the tag examples and follow the template build up and everything should be fine.
Bugs
*
bugzilla listing for gimp-web
Patches
See TipsForContributing for how to make patches.
Copyright © Niklas Mattisson <scizzo-at-gimp-dot-org>