Commit 42e21d19 authored by Erik Strand's avatar Erik Strand
Browse files

Add a basic Jekyll site

parents
*.swp
*.swo
.DS_Store
_site
vendor
.bundle
.sass-cache
.jekyll-metadata
---
layout: default
---
<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.5"
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.8)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.14.2)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.7)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.3)
listen (3.4.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.26.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
PLATFORMS
ruby
DEPENDENCIES
jekyll (~> 3.8.5)
BUNDLED WITH
2.0.1
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: MAS.865
email: strand@mit.edu
description: >- # this means to ignore newlines until "baseurl:"
Erik's class site for MAS.865 (Spring 2020)
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
# Build settings
markdown: kramdown
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
# exclude:
# - Gemfile
# - Gemfile.lock
# - node_modules
# - vendor/bundle/
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/
collections:
psets:
output: true
notes:
output: true
defaults:
- scope:
path: ""
type: "psets"
values:
layout: "pset"
- scope:
path: ""
type: "notes"
values:
layout: "pset"
- scope:
path: ""
values:
layout: "default"
- name: Home
link: /
- name: Problem Sets
link: /psets.html
- name: Notes
link: /notes.html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/katex@0.11.0/dist/katex.min.css"
integrity="sha384-BdGj8xC2eZkQaxoQ8nSLefg4AV4/AwB3Fj+8SUSo7pnKP6Eoy18liIKTPn9oBYNG"
crossorigin="anonymous">
<script
defer
src="https://cdn.jsdelivr.net/npm/katex@0.11.0/dist/katex.min.js"
integrity="sha384-JiKN5O8x9Hhs/UE5cT5AAJqieYlOZbGT3CHws/y97o3ty4R7/O5poG9F3JoiOYw1"
crossorigin="anonymous">
</script>
<script
src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha256-pasqAKBDmFT4eHoN2ndd6lN370kFiGUFyTiUHWhU7k8="
crossorigin="anonymous">
</script>
<script>
$(document).ready(function() {
$("script[type='math/tex']").replaceWith(function() {
var tex = $(this).text();
return katex.renderToString(tex, {displayMode: false});
});
$("script[type='math/tex; mode=display']").replaceWith(function() {
var tex = $(this).html();
return katex.renderToString(tex.replace(/%.*/g, ''), {displayMode: true});
});
});
</script>
<nav>
{% for item in site.data.navigation %}
<a href="{{ item.link | real_relative_url }}" {% if page.url == item.link %}class="current"{% endif %}>{{ item.name }}</a> >>
{% endfor %}
</nav>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
<link rel="stylesheet" href="{{ "/assets/css/styles.css" | real_relative_url }}">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
{% include katex.html %}
</head>
<body>
{% include navigation.html %}
{{ content }}
</body>
</html>
---
layout: default
---
<h1>{{ page.title }}</h1>
{{ content }}
require 'pathname'
# Jekyll's built-in "relative_url" filter does not generate relative URLs, it generates URLs that
# don't contain the domain. This plugin was posted to a GitHub issue in which @aioobe asks about
# making real relative URLs: https://github.com/jekyll/jekyll/issues/6360.
module Jekyll
module RealRelativeUrl
def real_relative_url(url)
pageUrl = @context.registers[:page]["url"]
pageDir = Pathname(pageUrl).parent
Pathname(url).relative_path_from(pageDir).to_s
end
end
end
Liquid::Template.register_filter(Jekyll::RealRelativeUrl)
body {
max-width: 650px;
line-height: 1.6;
font-family: 'Roboto', 'Helvetica', sans-serif;
font-size: 18px;
color: #333;
background-color: #fdfdfd;
margin: 40px auto;
padding: 0 10px;
}
h1, h2, h3 {
line-height: 1.2;
}
a {
color: #3070B9;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:visited {
color: #306590;
}
.current {
font-weight: bold;
}
img {
width: 100%;
}
img#coral, img#coral2, img#coral3 {
width: 79%;
margin: auto;
}
.captioned {
font-style: italic;
font-size: 85%;
}
.question {
font-style: italic;
}
// See https://gist.github.com/andyferra/2554919
table {
padding: 0; }
table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
table tr:nth-child(2n) {
background-color: #f8f8f8; }
table tr th {
font-weight: bold;
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px; }
table tr td {
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px; }
table tr th :first-child, table tr td :first-child {
margin-top: 0; }
table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }
---
---
@import "main";
---
title: MAS.865
---
## How to Make Something That Makes (almost) Anything
_Spring 2021_
_Erik Strand_
Source code for this website lives [here](https://gitlab.cba.mit.edu/erik/machines_2020_site).
---
title: Notes
---
<h1>Notes</h1>
<ul>
{% for note in site.notes %}
<li>
<a href="{{ note.url | real_relative_url }}">{{ note.title }}</a>
</li>
{% endfor %}
</ul>
---
title: Problem Sets
---
<h1>Problem Sets</h1>
<ul>
{% for pset in site.psets %}
<li>
<a href="{{ pset.url | real_relative_url }}">{{ pset.title }}</a>
</li>
{% endfor %}
</ul>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment