# Editing the CS2 Website <hr> ### Accessing the [website](http://cs.brown.edu/courses/cs002/): - If accessing remotely: follow the department [setup directions](http://cs.brown.edu/about/system/connecting/ssh/) at to set up your `public key`, then `ssh` into the department machine - Workflow: :::success Once in your terminal: ```c $ ssh <username>@ssh.cs.brown.edu $ cd ../../course/cs0020/website ``` ::: <hr/> - Editing the website: :::success Files to know: ```c Main page: index.html Assignments: assignments.html Hours: hours.html Lectures: lectures.html Staff Page: staff.html File directory: files/ All imgages: img/ ``` ::: - Helpful Terminal Commands: ```terminal $ cd <directory> // "Change directory" to the given one $ mkdir <name> // make a directory in your current directory $ touch <name> // makes a new empty file in your current directory $ ls // shows you all the files in your current directory ``` - `rsync` :::info The `rsync` command can be used to move files from the remote computer to your computer, and vice versa. It can move **several** files at a time. ::: ```terminal $ rsync -r dir1/ dir2 // Syncing one directory into another ``` Remote Operations: ```c $ rsync -a <local_source_directory> username@remote_host:<destination_remote_directory> // Push to a remote directory $ rsync -a username@remote_host:source_remote_directory local_destination_directory // Pull from a remote directory ``` :::success Examples: $ rsync -a /Users/tylergurth/desktop/CS2HTA/website/ tgurth@ssh.cs.brown.edu:/course/cs0020/website // pushing from computer to website $ rsync -a tgurth@ssh.cs.brown.edu:/course/cs0020/website/ /Users/tylergurth/desktop/Brown/CS2HTA/website // pulling from website to computer ::: > The general idea is that once you finish editing the files on your computer and everythign looks good, using `rysnc` to the `ssh` should update all the files/new directories you make. Be sure to ONLY edit within the root directory of the website. - `vim` :::info The `vim` command can be used to edit **one file at a time**. It's not good for large edits, but can be helpful for very small changes, like uncommenting a line. $ vim <filename> // Opens in vim editor Using `vim` is really hard, you need to use key operations to move around in the file, switch between editing modes, and add/delete content. **Be sure to always change at the end of editing** (if you wan't your changes saved). ::: <hr/> ### //TODO At beginning of Semester: :::warning - Uncomment homepage top bar - **Change theme** - Change TA names/bios/pictures - Add new google calendar (**make it public!**) - Add new labs/projects but comment out the links ::: <hr/> ### Things to do during Semester: :::warning - Uncomment labs/projects - Add lectures as they are released (**from Don**) :::