Website: Difference between revisions

From CSCWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 11: Line 11:
Then you could see your copy of the website at this URL:
Then you could see your copy of the website at this URL:
http://csclub.uwaterloo.ca/~dtbartle/csc/
http://csclub.uwaterloo.ca/~dtbartle/csc/

= Committing changes to the website =


If you add a new file to the website, you can add it to git:
If you add a new file to the website, you can add it to git:

Revision as of 01:03, 22 August 2007

Checking out the website

The website is managed in a git repository.

Anyone can checkout the website using git-clone:

git-clone caffeine:/users/www/www/.git

This creates a directory called 'www' that contains the entire website and repository. If you want to make changes to the website, you'll need to ask someone on the Systems Committee to add you to the 'www' group and to the 'git' mailing list. The easiest way to see your changes without committing them is to create a symlink into your public 'www' directory. For example, say your local copy of the website lives in '/users/dtbartle/csc/www'. You could symlink '/users/dtbartle/csc/www' to '/users/dtbartle/www/csc':

ln -s /users/dtbartle/csc/www /users/dtbartle/www/csc

Then you could see your copy of the website at this URL:

http://csclub.uwaterloo.ca/~dtbartle/csc/

Committing changes to the website

If you add a new file to the website, you can add it to git:

git-add file

To delete a file type:

git-rm file

And to rename or move a file type:

git-mv old-file new-file

Once you're done modifying the website you can commit your changes:

git-commit -a

The above command only commits the change to your local repository; you need to push the changes out to the master repository:

git-push

The above command will also automatically rebuild the website and send out an email to the git mailing list with the details of your change.

Building the website

Once you've checked out the website, you can begin to modify the website.

The website's data is contained in a series of XML files. A series of XSLT files are used to transform the XML data into HTML files. This process is initiated by running:

make

You can remove the generated html files by running:

make clean

If you want to add new information to the website you'll want to modify the XML files. If you want to change the HTML layout you'll want to modify the XSLT files.