Git Product home page Git Product logo

cs247-2017-spring's Introduction

CS 247

Web site for CS 247.

Getting started

Local development

Start the local server by running the following command:

./ssi-server --index index.shtml --rootpath 2017-spring

You might need to make ./ssi-server executable first by e.g. running chmod +x ./ssi-server.

The index option changes the default index file from index.html to one allowing server side includes. The rootpath option allows to mimick running in a subdirectory on the actual webserver. CS247 has so far put content for each class in a subdirectory based on year and quarter of the instantiation of the course.

Deployment

Run ./deploy.sh from the repository root. This assumes a fully configured hci host in your .ssh/config file. An example configuration would be:

Host hci
  Hostname hci.stanford.edu
  User <<<your csid>>>
  ForwardAgent yes

Rationale and background

This is meant to be a pretty static HTML site. We wanted no build system. But we also wanted DRY includes. Our solution are Server Side Includes. Stanford's web servers are running Apache [0], and Apache has an implementation of Server Side Includes. SSI allows for includes like this:

<!--#include virtual="header.html" -->
<h1> Some HTML</h1>
<!--#include virtual="footer.html" -->

Note no space after the opening comment <!-- is allowed. Name all files that will use include statements *.shtml.

[0] See if that's still true when you read this: curl --silent -I http://www.stanford.edu | grep Apache

Setup Apache SSI

This is already done for you, but FYI:

  • Add an .htaccess file to the class directory with this option: Options +Includes

cs247-2017-spring's People

Contributors

hmslydia avatar ludwigschubert avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tiffapedia

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.