Website Development
From OBO Foundry
Contents |
[edit]
Editing the OBO Foundry Website
[edit]
How to get
CVS checkout from obo.cvs.sourceforge.net:/cvsroot/obo
[edit]
Facts
- Both the static and dynamic pages use the same SSI pages, JS, and CSS in the htdocs directory. To have a change across all pages (e.g. menus or footer), just change these.
- For creating new pages, there are templates in both the cgi-bin (template.cgi) and htdocs (template.shtml) directories. Copy these and edit the appropriate parts.
- There is a mini templating system--LiteTemplate::Aux--now in the cgi-bin that is used by all of the scripts to keep the style consistent and valid. An example of its use is given in template.cgi.
[edit]
Caveats
- The site is now strict XHTML and CSS (all static and dynamic pages checked are valid). The style renders cleanly in: FF2, Safari 2, IE Safari, IE 7, Opera 9, and iCab 3. There is a single artifact in IE 6 (the main body text body on non-main pages is shifted 10% to the right), but otherwise renders well and can be fixed in CSS later.
- Three files and a directory that are in the cgi-bin must be linked to from the htdocs directory for the main page to function: ontologies.txt, trackers.txt, FileParse.pm, and LiteTemplate (directory).
- The main page (index.cgi) uses a slightly different template: LiteTemplate::Main. The main difference is the inclusion of side.html and associated divs.
[edit]
Remember
- If at all possible, test your changes locally before committing them to CVS.
- Check your changes against http://validator.w3.org, before committing if at all possible.
- Other people use the data files, so check before doing any format changes.
- The website is automatically updated from CVS at about 1am every day. If you make an error and nobody is around, it will be 24 hours before you can make a correction.
[edit]
For internal developers and admins
- lsc is the website host.
- Always commit your changes to CVS (and, if possible, test them on a toy server) before moving them to the site.
- For the sake of consistency, you should use the installation script "obo-publisher.pl" instead of manually copying things over.
- Remember to give read/write access and ownership of all changes and additions to "sjcarbon", or else the backups and updates might start failing.
- The nightly site backups are in: /users/sjcarbon/.Trash (on the /users NFS mount)
- The htdocs are in the form htdocs.<localtime_during_backup>
- The cgi-bin are in the form cgi-bin.<localtime_during_backup>
- Just copy these back to recover
