Website: Difference between revisions

From CSCWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 102: Line 102:
= Feature Requests and Ideas =
= Feature Requests and Ideas =


* Replace webapps with debian packages
* Possibly move club list onto wiki.
* Possibly move club list onto wiki.
* Auto-generate exec page; this requires putting exec positions in LDAP.
* Auto-generate exec page; this requires putting exec positions in LDAP.

Revision as of 02:09, 18 September 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 build the website by running:

make

You can remove the generated files by running:

make clean

Modifying the website

XML

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. If you want to add new information to the website you'll want to modify the XML files.

Some notable XML files:

  • events.xml - past and upcoming events
  • news.xml - past and upcoming items
  • media/index.xml - media items (e.g. talks)
  • about/exec.xml - the current club exec

XML should be fairly easy to work with. Some important things to remember:

  • All opening tags must be closed.
  • All tags should generally be in lowercase.
  • Tag and attribute names and case-sensitive.

If you want more information on XML, the following are good resources:

XSLT

If you want to change the HTML layout you'll want to modify 'default.css'. or the XSLT files. Almost all XSLT files are located in the 'xsl' directory. We are using XSLT 2.0, which is generally backwards compatible with XSLT 1.0.

Website vs Wiki

In order to keep things organized, the following guidelines should be followed.

Website:

  • Information not likely to change frequently (e.g. services, general information)
  • Information that should only be modifiable by the exec
  • Official documents (e.g. constitution, policies)
  • Current and past executive
  • User and club lists
  • News, events, and media items
  • Anything we want non-members to see when they first encounter our site

Wiki:

  • Information that changes frequently
  • Information that any club member should be able to add to or modify
  • Information on creating talks and posting them
  • Past funding opportunities and advice (assuming this can be publicly posted)
  • Contacts (e.g. CSCF, SCS) (assuming this can be publicly posted)

Also note that we can protect various pages if they shouldn't be edited in general.

Conventions

Email Addresses

Email addresses should be wrapped in <email> tags. For example, if you want to include the email president@csclub.uwaterloo.ca you should include the following xml snippet:

<email>president@csclub.uwaterloo.ca</email>

Make sure that this is on a single line; i.e. don't do this:

<email>
  president@csclub.uwaterloo.ca
</email>

Currently this just generates an standard mailto link. In the future it may generate an image containing the address, to avoid spam.

My current plan is to generate the email images while running make. I would need to somehow call an external command from within the xslt processor. The program would be passed the email address and would generate a file of the form user@domain.png. The email images would be stored in http://csclub.uwaterloo.ca/emails/.

Feature Requests and Ideas

  • Replace webapps with debian packages
  • Possibly move club list onto wiki.
  • Auto-generate exec page; this requires putting exec positions in LDAP.
  • Convert cellspacing and cellpadding to CSS equivalents.
  • IMO (dtbartle), keyboard thing on front page is way too big - reduce or remove.
  • Make RSS and ICS feeds more prominent.
  • Replace or compliment /events with a web-based calendar?
  • Replace all email addresses with generated graphics?
  • On media pages, get rid of trailing comma.
  • Replace <br>'s with <p>'s wherever it makes sense.
  • Replace <strong>, <b>, <i>, etc... tags with CSS.