{"id":21206655,"url":"https://github.com/oncomouse/middleman-course-template","last_synced_at":"2025-03-14T23:20:24.358Z","repository":{"id":28172029,"uuid":"31673321","full_name":"oncomouse/middleman-course-template","owner":"oncomouse","description":null,"archived":false,"fork":false,"pushed_at":"2017-07-13T20:58:31.000Z","size":51,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-21T15:48:45.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oncomouse.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-04T18:40:08.000Z","updated_at":"2017-12-19T06:05:52.000Z","dependencies_parsed_at":"2022-09-04T16:50:33.015Z","dependency_job_id":null,"html_url":"https://github.com/oncomouse/middleman-course-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oncomouse%2Fmiddleman-course-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oncomouse%2Fmiddleman-course-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oncomouse%2Fmiddleman-course-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oncomouse%2Fmiddleman-course-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oncomouse","download_url":"https://codeload.github.com/oncomouse/middleman-course-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658698,"owners_count":20326546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T20:56:27.101Z","updated_at":"2025-03-14T23:20:24.333Z","avatar_url":"https://github.com/oncomouse.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# middleman-course-template\n\nThis template allows the creation of simple, responsive course websites for college-level courses. It uses YAML to create the schedule of instruction and [Middleman's vast array of supported languages](https://middlemanapp.com/basics/templating_language/) for page content. It uses bits of [Bootstrap](http://getbootstrap.com/) for responsive navigation and some layout. It also is heavily customizable to create unique, course-specific layouts.\n\nThis template also attempts to bake in support for IE8 using [html5shiv](https://github.com/aFarkas/html5shiv), [respond.js](https://github.com/scottjehl/Respond), and [css3-mediaqueries.js](https://code.google.com/p/css3-mediaqueries-js/).\n\nYou [can view a sample course at http://andrew.pilsch.com/courses/sample-course/](http://andrew.pilsch.com/courses/sample-course/)\n\n## Setup\n\n### Dependencies\n\n* [Ruby](https://www.ruby-lang.org/)\n* [Bundler](http://bundler.io/)\n\n### Instructions\n\nTo install, run `bundle install` from a Terminal.\n\nTo start the development server, run `middleman` and visit [http://localhost:4567](http://localhost:4567).\n\n### Tips for Installing Ruby \u0026 Bundler\n\nStarting from scratch with Middleman, you will need to install [Ruby](https://www.ruby-lang.org) (I *strongly* [recommend using RVM for this](http://rvm.io).).\n\nOnce you have Ruby working, you can run `gem install bundler` to install the two package management utilities used by this package.\n\n## Editing The Course\n\nChanging the `course.yml` file controls the default displays of the course. The \u003cabbv\u003eHAML\u003c/abbv\u003e files that begin with course in `source/partial` (`_course-description.haml` and `_course-title.haml`) can be edited for more control.\n\nThe course schedule of assignments, readings, etc. is built by editing the `schedule.yml`.\n\nAs a rule, you should not need to edit `sourc/partials/links.haml`, `source/course.yml.erb`, and `schedule.html.erb`.\n\n### Changing Syllabus Appearance\n\nTo change the color scheme of the syllabus (something you should do for each class!), you will need to edit `source/stylesheets/_variables.scss`. This file contains a series of overrides and custom variables, but the most important variable in this file is `$course_color`. Changing this variable overrides the default background color for your course and changes links, borders, and the overall appearance of the syllabus. \n\nI've included the SASS-Colors library, which contains a host of named variables for colors to use in SASS. You can see a full list of the colors (along with samples) [here](https://dl.dropboxusercontent.com/u/28696035/samples.html).\n\nFor some of the colors, you may need to change the percentages passed to `lighten()` and `darken()`, so experiment to get the color you want.\n\n### Customizing Bootstrap\n\nThis template uses a very minimal version of Bootstrap, only the core functions, navbar, and the collapsing navbar javascript. If you would like to use more Bootstrap functionality in your syllabuses, edit `source/javascripts/bootstrap.js` to load more JS features and edit `source/stylesheets/_bootstrap.scss` to include more CSS features.\n\n### Changing Build Behavior\n\nIn `config.rb`, there are two variables to set: `config[:build_http_prefix]`, which is the HTTP root for your course, when it deploys. For instance, a course called `eng101spr2015` that existed online at `http://andrew.pilsch.com/courses/eng101spr2015`, would have `config[:build_http_prefix]` set to `/courses/eng101spr2015` (the variable `@course_tag` is set up to do this by default). \n\nAdditionally, the javascript files `app.js` and `css3-mediaqueries.js` can be shared between multiple course sites. Set `config[:shared_javascript_prefix]` to the URL of the directory where these shared files are located (for instance, `http://andrew.pilsch.com/courses/shared-javascripts/`). Leave it set as `''` if you don't need this behavior.\n\n### Changing Deployment Behavior\n\nThis template uses [middleman-deploy](https://github.com/middleman-contrib/middleman-deploy) to automate deployment.\n\n## Creating New Pages\n\n### Automated Page Creation\n\nThis template includes a [Rakefile](https://github.com/ruby/rake) to automate page creation. To create pages in this manner, run `rake create_page[file_name.html.md]` in the terminal (where `file_name.html.md` is the name of the file in the `source/` directory you want to create). The rake task will create the page and set up the basic YAML front matter (see below). You do not have to use the rake task to create pages, it is merely provided as a convenience.\n\n### Editing YAML Frontmatter\n\nFiles created in the `source/` directory that compile to html (eg `policies.html.haml` or `assignments.html.md`) need a [YAML](http://yaml.org) [metadata block](https://middlemanapp.com/basics/frontmatter/) (set off above and below with `---` and at the top of the document, as [covered in Middleman's documentation](https://middlemanapp.com/basics/frontmatter/)) with the `page_link_name` property set to the text displayed in the page's navigation link.\n\n``` yaml\n---\npage_link_name: Foobar\n---\n```\n\nYou can also create sidebar widgets using the following YAML fragment as a template:\n\n``` yaml\n---\npage_sidebar_widgets:\n- |\n  ### Markdown Formated Widget Content\n  \n  Hello, this is a widget\n- |\n  ### This is a 2nd Widget\n  \n  Boom\n---\n```\n\nNote that the Markdown formatted content of these widgets must be indented by two spaces (`  `) for Middleman to compile and load the page.\n\n## The Course Schedule (`data/schedule.yml`)\n\nTo schedule course activities (readings, homework assignments, etc), edit `data/schedule.yml`. This [YAML](http://yaml.org) file controls the schedule of courses.\n\nThe first two items in the schedule are start and end dates for the class (`start: ` and `end: ` in the file). They should be set in the `YYYY-MM-DD` format. `start:` can refer to the first meeting of your class *or* the day that classes start at your institution. Similarly, `end:` can refer to either the final meeting of your class or the day that classes end at your institution.\n\nNext comes an array of holidays (`holidays:`). Each holiday needs to begin with two spaces and the `date:` key. You do not have to assign each holiday a name (which can be things like \"Winter Break\" or \"Teaching Absent\"), but do so, on a new line below the `date:` command you wish to name, begin with four spaces and add the `name:` key and the name for this holiday.\n\n`meets:` is an array of days of the week on which your class meets. This template uses a natural language processor to translate these into usable `Date` objects in Ruby, so you don't have to worry about capitalization here.\n\n`units`: is an array containing a collection of units (indicated by title and week on which they begin). You can break your syllabus into as many units as you have weeks.\n\n`weeks:` is a hash containing the names of each course week. If you want to assign the first week the title of \"Course Introduction\", you can type `  1: Course Introduction`. These are totally optional and not having them will not change the behavior of this template.\n\n`classes:` contains an array of days in your course. Each day is indicated by two spaces and `- |` the content of the day starts with four spaces on each line and is written in [Markdown](http://daringfireball.net/projects/markdown/). The course will fill out the weeks and months of your class as it processes this list. If you have too many class meetings, the template will simply stop rendering them when the end of term date (`end:`, discussed above) is reached. If you have too few classes, it will only render those you've provided.\n\n## Course Metadata (`data/course.yml`)\n\nThe `data/course.yml` file contains information about the course. These pieces of metadata control the basic display of the course, primarily through files contained in the `source/partials` directory. Edit this file to reflect your course's structure and information. Additionally, if you don't like the way something is displaying, edit the responsible partial to better match what you want.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foncomouse%2Fmiddleman-course-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foncomouse%2Fmiddleman-course-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foncomouse%2Fmiddleman-course-template/lists"}