Skip to content

theharvardcrimson/programs.thecrimson.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

  • The Harvard Crimson Journalism Conferences website is a static site that is generated using Ruby. It is hosted on GitHub Pages. So in order to make modifications to the site, you need to ensure that you have the latest version of ruby installed alongside the latest version of gem (the package manager for Ruby).

  • Make sure that you've already git cloned this repo to your computer and are currently in the home directory of the repo.

  • Once you've installed Ruby and ensured that you have the repo locally, add these two lines to the bottom of your ~/.bashrc to ensure that every gem is stored in a local directory.

    export GEM_HOME=~/.gem
    export GEM_PATH=~/.gem
    
  • Once you've done this, run the following commands:

    • source ~/.bashrc (enables the environment variables set above)
    • gem install bundler (install a gem that helps with package management)
    • bundle install (installs all the required gems)
  • If any gem in particular gives you trouble during the bundle install process, you can try installing it directly with gem install [gemname].

Development

  • In the home directory, run bundle exec jekyll serve. This starts up a local development server at http://localhost:4000 which hosts live changes to the static site. When you modify and save the files in any folder other than than _site, these changes will be visible on the site upon refresh.

  • Note: bundle exec jekyll serve (or alternatively bundle exec jekyll build) generates a folder called _site that contains the static files that are actually used to render the website. DO NOT MAKE MODIFICATIONS TO THE FILES IN THIS FOLDER. The folder is not checked into git because these files are automatically regenerated by bundle exec jekyll serve or bundle exec jekyll build. So any changes to this file will be overwritten the next time this regeneration occurs.

  • Jekyll uses the Liquid templating language, which is fairly similar to Jinja and the Django Template Language. The context for the templates is provided in _config.yaml. Note that you will have to restart the bundle exec jekyll serve command in order to observe any changes you've made to _config.yaml.

  • Variables such the Crimson's current president are located in _config.yaml, so to get the president's name in a template, write {{ site.president.name }}. If you find yourself hardcoding a name, email address, or phone number in a template, consider adding that information to the yaml file and using Liquid instead. This makes it so that updates to the static files only need to happen in one in place, the config file, instead of in 20 different files. TL;DR: Use _config.yaml and Liquid often.

Deployment

This site is deployed with GitHub Pages. Simply push to master remotely and ensure the changes are deployed at https://old-programs.thecrimson.com.

About

Crimson Journalism Programs website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages