This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
web_page_editing [2013/02/14 12:14] fowlkes |
web_page_editing [2016/11/27 16:29] (current) rdiazgar [Regenerate the static pages] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | The vision group web page is hosted out of /extra/vision0 and managed with an SVN repository. Don't make changes to the webpage directly, instead make them to a copy checked out from SVN. | + | The vision group webpage is managed with a SVN repository, so changes should not be made to the webpage directly. |
+ | ===== Checking out the repo ===== | ||
- | The standard procedure is: | + | To get a copy of the repository, clone the ucivision webpage repository from bitbucket: |
+ | <file> | ||
+ | git clone git@bitbucket.org:ucivision/vision.ics.git | ||
+ | </file> | ||
- | 1) Check out a copy from svn: | + | ===== Updating content ===== |
+ | Now that you have a copy of the repository, you should take a look at the README file located in “public_html/scripts/” to make sure your system has the prerequisite applications and libraries, before trying to make changes to the website. The webpage is semi-static in that the contents are served from static pages, but the pages themselves were dynamically generated by python scripts and xml files. Documented below are the most common changes you'd likely want to make to the webpage. | ||
- | <file> | + | === Adding People === |
- | svn co https://svn.ics.uci.edu/svnadmin/titans/visionweb/ | + | |
- | </file> | + | To add a person to the webpage, you'll need to do two things: (1) add a profile photo and (2) add an entry to the person database. |
+ | |||
+ | (1) Before adding the photo, it should be cropped/resized to 200×250 for optimal display and named using the convention: firstname_lastname.jpg. To add the photo, copy the file to “public_html/images/mugshots/” (2) To add an entry to the person database, you'll want to edit peoplelist.xml located in “public_html/scripts/”. At the top of the file, you'll find a template that's commented out, which you can copy and add the new person with. The fields are hopefully self-explanatory, if not see other people entries as examples. | ||
+ | |||
+ | === Adding Projects === | ||
+ | |||
+ | To add a new project to the webpage, you'll want to edit projectlist.xml located in “public_html/scripts/”. | ||
+ | |||
+ | === Adding Papers === | ||
+ | |||
+ | The naming convention for papers is to use the first author's last name appended with the first letter of the other authors (e.g., FowlkesMM for Fowlkes, Martin, and Malik) followed by the venue of publication and the publication year. All together it'll be like “FowlkesMM_CVPR_2003”. Henceforth, we'll use “name” to denote this notation. | ||
+ | |||
+ | To add a new paper to the webpage, you'll want to create a directory inside “public_html/papers/” following the naming convention. Inside you'll add four files: abstract.html, icon.jpg, “name”.bibtex, and “name”.pdf. | ||
+ | |||
+ | abstract.html should contain only text or HTML code that is intended to go inside the <body></body> of a HTML file. icon.jpg is a small picture related to the paper. “name”.bibtex is the bibtex file for the paper. “name”.pdf is the pdf of the paper. | ||
+ | ===== Regenerate the static pages ===== | ||
+ | |||
+ | When you're done making changes, you can regenerate all static pages by running the following command: | ||
+ | |||
+ | <code> | ||
+ | python gen.py all | ||
+ | </code> | ||
+ | |||
+ | If you see errors when running the script, feel free to try to fix them yourself or bug Bailey. | ||
+ | Make sure your version of lxml and pybtex are up to date using the python pip tool. | ||
- | 2) Add your papers in the appropriate format to the "public_html/papers" directory | + | ===== Commit your changes ===== |
+ | When you are satisfied that everything looks good, commit your updates back in to git and push to the upstream origin. | ||
- | 3) Run the python script to update the papers database, automatically generate thumbnails, etc. | + | ===== Updating the live site ===== |
+ | The vision website is hosted on /extra/vision0 share which you can access on the titan cluster | ||
- | 4) When you are satisfied that everything looks good, check your updates back in to svn. Remember to "svn add" any new files you have added to the tree. | + | Note: the .html files make use of server side includes. The department file server requires use of the "XBitHack" which only processes server-side includes for files that are executable, hence the last "find" operation above. |
+ | This final step will eventually be automated but for now just email Charless :) | ||
- | 5) Finally, pull the updates from svn to the hosted directory. | + | ---- |
+ | New recipie | ||
<code> | <code> | ||
gsu vision | gsu vision | ||
- | cd /extra/vision0 | + | cd /extra/vision0/vision.ics/ |
- | svn export https://svn.ics.uci.edu/titans/visionweb/public_html/ | + | git pull |
- | find public_html/ -type f -print -exec chmod a+r {} \; | + | cd /extra/vision0/ |
- | find public_html/ -type d -print -exec chmod a+rx {}// // \; | + | rsync -rv /extra/vision0/vision.ics/public_html/ /extra/vision0/public_html/ |
+ | find /extra/vision0/public_html/ -type f -print -exec chmod a+r {} \; | ||
+ | find /extra/vision0/public_html/ -type d -print -exec chmod a+rx {} \; | ||
+ | find /extra/vision0/public_html/ -type f -print -name "*.html" -exec chmod a+rx {} \; | ||
+ | chmod 644 /extra/vision0/public_html/.htaccess | ||
+ | cd /extra/vision0/vision.ics/ | ||
</code> | </code> | ||
- | The final step will eventually be automated but for now just email Charless :) | ||