source for Code Like This web site
see todo.md for some todo items
git clone XXX(where XXX is either
https://github.com/alexch/codelikethis.gitor your personal github repo URL)
gem install bundler
rake spec(to run all tests and verify setup)
rake build(to compile CSS)
rerunto rebuild/restart on file changes)
- open http://localhost:9292
SCSS is currently built using Sass. Run this all the time in development, or at least once before deploy after you change anything:
||run all tests and verify setup|
||run local server on http://localhost:9292|
||run with rebuild/restart on file changes|
||run this in a separate terminal to compile CSS when SCSS changes too|
Note that any of the above may need to be preceded by
bundle exec e.g.
bundle exec rerun rackup (whether you need to do this or not depends on gnarly details of your Ruby installation).
||ruby source code|
||ruby Site describing the Bootcamp course(s)|
||JSON describing the Bootcamp course schedule|
||ruby test source code|
||web site images|
||images used by some lessons|
||an image used by only a single lesson|
||web site scripts|
||web site css files -- do not edit these directly!|
||web site sass source files, compiled into public/css|
||course files (markdown and images), organized by track|
||track files (markdown and images), organized by track|
||track description files; names match public/lessons subdirs|
||markdown slides for a single lesson named
||markdown slides for a single project named
a Site is
- a hostname
- an ordered collection of Tracks
- a home page
- a schedule
Currently there are two Sites:
- CodeLikeThis http://codelikethis.com - the main site, containing all Tracks (listed in alphabetical order)
- Bootcamp http://bootcamp.burlingtoncodeacademy.com - the site for Burlington Code Academy's 2018 Web Development Bootcamp, which runs from June through August in (where else?) Burlington, Vermont
Both sites are served from the same web application instance, running on Heroku (http://codelikethis.herokuapp.com). The app looks at
request.host and serves a different Site to each hostname.
To add a Site, follow the example of Bootcamp.
To view a Site locally, use a
site parameter, e.g. http://localhost:9292/?site=bootcamp. This parameter is not propagated to new pages so you'll have to keep adding it explicitly to test different pages.
Adding a Track
- Decide on its name. Its name is a
camelcase_wordthat will automatically turn into titlecase when displayed. (e.g.
- create a new subdir inside
- define a
Tracksubclass in a new file inside that dir (e.g.
- declare your lessons inside the track file. Look at the existing
- for each Lesson, put its slides in a markdown file with its name in the lessons directory (e.g.
- add the Track to your Site by following the example of Bootcamp
Currently a project consists of a markdown file in the
public/projects/ directory e.g.
public/projects/foo.md. It is viewable via the path
/projects/foo (note the lack of file extension).
To declare a project is a bit scattershot. It can be referenced in several places:
- in the schedule JSON attached to a given week
- in a Lesson file (not the slides markdown)
- in a Track file, directly under the Track
- in a Track file, nested under a Lesson
We should clean this up, so we don't have duplication/omission of e.g. project descriptions depending on where they're defined/referenced.