Here are few notes on how to modify and update the MATD website.
- Terminal
- git (optionally a client: GitHub for Mac or GitX are good)
- xsltproc (should be preinstalled on Macs with with XCode)
- clone the git repository
- edit source files
- in Terminal change to folder with this file
- type and confirm:
./build* - commit changes and push back to GitHub repository
*) This is a simple script which updates the HTML (only) in the years' folders. Everything else is to be edited manually. See Editing (below) for more details. Make sure it has necessary rights (run: $chmod +x build).
- the source stuff is saved in
site/folder. Each year has its own HTML and images in a separate folder. - never edit HTML directly, edit
site/data.xmlinstead. Custom modifications of HTML would get overwritten next time you run./build. site/data.xmlis transformed to HTML by the./buildscript (by means of XSLT)site/data.xmlcontains all textual information, also filenames of specimens, group specimen, thank-you texts, etc. It should be self-descriptive. Each year has a flagreadywhich needs to be set to1for the year to be exported.- if you want to alter the HTML structure of all years, edit
style.xsl(you need to understand XSLT to do that properly). - Google Analytics code is generated automatically
site/style.cssis common CSS file for all years.- preferably, change only colours (to fit with the year's colour scheme) in the appropriate year section. This way the design is kept consistent for all years.
img/in root folder includes pictures common to all pages.YEAR/img/includes year-specific pictures for the year colour scheme. To be edited manually or via Photoshop templates in thedesign/folder.- the previews are mastered and copied manually from
resources/to appropriate folder insite/(see thedesign/preview_template.pdfand guidelines I emailed to students earlier), note that there is a need to add coloured background and save as web-optimized PNGs (e.g. in Photoshop) and to make them look aligned and equal.
- the specimens, RoPs and such are to be uploaded manually to
resources/…folder directly on the FTP server to the appropriate year folder. We do not keep them here for several reasons. - name them precisely as they are in the
data.xmlfile.
- you need to edit
feed.xmlmanually at the moment.
How to set default year for the address www.typefacedesign.org:
- modify the
site/index.phpto redirect at a particular year folder
- add it to
data.xmland set all textual data - add year folder (ideally copy from previous) and
img/andpreviews/subfolders. - add properly coloured year-dependent images
- edit main CSS file = copy previous year section and modify it with new year's data (e.g. change 2009 -> 2010) everywhere in that section)
- add previews (people usually sent PDFs and I converted them via Photoshop to optimized PNGs)
- upload all PDFs
- when everything is ready, set the ready flag to 1 and run the build script
- double check (also the previous years before uploading)
- modify the
site/index.phpto make it the default year - upload the files via FTP
- remember to push to the GitHub repository