-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c7b71d6
Showing
15 changed files
with
986 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Ignore everything ... | ||
|
||
|
||
## ...But not ignore these files | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
layout: default | ||
title: "404: Page not found" | ||
permalink: 404.html | ||
--- | ||
|
||
<div class="page"> | ||
<h1 class="page-title">404: Page not found</h1> | ||
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ site.github.url }}">Head back home</a> to try finding it again.</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
codeasmanuscript.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
##------------------------------------------------------------------- | ||
# Variables | ||
site_repo=`basename "$$PWD"` | ||
|
||
## List of commands to use for Makefile. | ||
all : | ||
@grep -E '^##' Makefile | sed -e 's/##//g' | ||
##------------------------------------------------------------------- | ||
## test_local : Test the site locally before building live version | ||
test_local : | ||
jekyll serve --watch | ||
|
||
## build_site : Build the GitHub pages site | ||
build_site : | ||
rsync -a --exclude='.git/' --exclude='.gitignore' ../workshops/ ../${site_repo}/ | ||
./knitpost.R | ||
jekyll build | ||
git clean -d -x -f | ||
|
||
.PHONY : build_site test_local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Dependencies | ||
markdown: kramdown | ||
highlighter: pygments | ||
|
||
# Permalinks | ||
permalink: pretty | ||
relative_permalinks: false | ||
|
||
# Setup | ||
title: Code As Manuscript | ||
tagline: 'Change the way you see your code.' | ||
description: 'Writing your code and analyses as if <i>it</i> was the manuscript.' | ||
url: http://codeasmanuscript.org | ||
|
||
author: | ||
name: 'Code As Manuscript' | ||
|
||
# Custom vars | ||
version: 2.1.0 | ||
|
||
github: | ||
repo: https://github.com/codeasmanuscript | ||
|
||
lesson-list: [Git, Intro, Plotting, Wrangling, Rmarkdown, Macros, ODS] | ||
category-list: [R, Git, Macros, ODS, Lessons] | ||
tag-list: [Lessons, Git, GitHub, Macros, ODS, Assignment, Slides, Cheatsheet] | ||
|
||
exclude: ['lessons/template/*', gps/eventListing.md, '*.Rmd', | ||
evals/, survey/, lessons/potentials.md, README.md] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<head> | ||
<link href="http://gmpg.org/xfn/11" rel="profile"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||
|
||
<!-- Enable responsiveness on mobile devices--> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> | ||
|
||
<title> | ||
{% if page.title == "Home" %} | ||
{{ site.title }} · {{ site.tagline }} | ||
{% else %} | ||
{{ page.title }} · {{ site.title }} | ||
{% endif %} | ||
</title> | ||
|
||
<!-- CSS --> | ||
<link rel="stylesheet" href="{{ site.github.url }}/public/css/poole.css"> | ||
<link rel="stylesheet" href="{{ site.github.url }}/public/css/syntax.css"> | ||
<link rel="stylesheet" href="{{ site.github.url }}/public/css/hyde.css"> | ||
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface"> | ||
|
||
<!-- Icons --> | ||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.github.url }}/public/apple-touch-icon-144-precomposed.png"> | ||
<link rel="shortcut icon" href="{{ site.github.url }}/public/favicon.ico"> | ||
|
||
<!-- RSS --> | ||
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml"> | ||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<div class="sidebar"> | ||
<div class="container"> <!--sidebar-sticky? I deleted it from here--> | ||
<div class="sidebar-about"> | ||
<h2> | ||
<a href="{{ site.github.url }}"> | ||
{{ site.title }} | ||
</a> | ||
</h2> | ||
<p class="lead">{{ site.description }}</p> | ||
</div> | ||
|
||
<nav class="sidebar-nav"> | ||
<a class="sidebar-nav-item{% if page.url == site.github.url %} active{% endif %}" href="{{ site.github.url }}/">Home</a> | ||
|
||
{% comment %} | ||
The code below dynamically generates a sidebar nav of pages with | ||
`layout: page` in the front-matter. See readme for usage. | ||
{% endcomment %} | ||
|
||
{% assign pages_list = site.pages %} | ||
{% for node in pages_list %} | ||
{% if node.title != null %} | ||
{% if node.sidebar == true %} | ||
{% if node.layout == "page" %} | ||
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ site.github.url }}{{ node.url }}">{{ node.title }}</a> | ||
{% endif %} | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
<a class="sidebar-nav-item" href="{{ site.github.repo }}">GitHub</a> | ||
</nav> | ||
|
||
<p>© {{ site.time | date: '%Y' }}. All rights reserved.</p> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> | ||
|
||
{% include head.html %} | ||
|
||
<body class="theme-base-0d"> | ||
|
||
{% include sidebar.html %} | ||
|
||
<div class="content container"> | ||
{{ content }} | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<div class="page"> | ||
<h1 class="page-title">{{ page.title }}</h1> | ||
{{ content }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<div class="post"> | ||
<h1 class="post-title">{{ page.title }}</h1> | ||
<span class="post-date">{{ page.date | date_to_string }}</span> | ||
{{ content }} | ||
</div> | ||
|
||
<div class="related"> | ||
<h2>Related Posts</h2> | ||
<ul class="related-posts"> | ||
{% for post in site.related_posts limit:3 %} | ||
<li> | ||
<h3> | ||
<a href="{{ site.github.url }}{{ post.url }}"> | ||
{{ post.title }} | ||
<small>{{ post.date | date_to_string }}</small> | ||
</a> | ||
</h3> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
layout: null | ||
--- | ||
|
||
<?xml version="1.0" encoding="utf-8"?> | ||
<feed xmlns="http://www.w3.org/2005/Atom"> | ||
|
||
<title>{{ site.title }}</title> | ||
<link href="{{ site.url }}/atom.xml" rel="self"/> | ||
<link href="{{ site.url }}/"/> | ||
<updated>{{ site.time | date_to_xmlschema }}</updated> | ||
<id>{{ site.url }}</id> | ||
<author> | ||
<name>{{ site.author.name }}</name> | ||
<email>{{ site.author.email }}</email> | ||
</author> | ||
|
||
{% for post in site.posts %} | ||
<entry> | ||
<title>{{ post.title }}</title> | ||
<link href="{{ site.url }}{{ post.url }}"/> | ||
<updated>{{ post.date | date_to_xmlschema }}</updated> | ||
<id>{{ site.url }}{{ post.id }}</id> | ||
<content type="html">{{ post.content | xml_escape }}</content> | ||
</entry> | ||
{% endfor %} | ||
|
||
</feed> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/Rscript --vanilla | ||
|
||
# Taken and modified from | ||
# http://varianceexplained.org/pages/workflow.html | ||
|
||
# compiles all .Rmd files in _R directory into .md files in the _posts | ||
# directory, if the input file is older than the output file. | ||
|
||
# run ./knitpages.R to update all knitr files that need to be updated. | ||
|
||
KnitPost <- function(input, outfile, base.url = '/') { | ||
# this function is a modified version of an example here: | ||
# http://jfisher-usgs.github.com/r/2012/07/03/knitr-jekyll/ | ||
knitr::opts_knit$set(base.url = base.url) | ||
knitr::opts_chunk$set(fig.path = 'images/', | ||
collapse = TRUE) | ||
knitr::render_jekyll() | ||
knitr::knit(input, outfile, envir = parent.frame()) | ||
txt <- sub('^published: false', 'published: true', | ||
readLines(outfile)) | ||
writeLines(txt, outfile) | ||
} | ||
|
||
for (infile in list.files(pattern="*.Rmd", full.names=TRUE, recursive = TRUE)) { | ||
outfile <- paste0(sub("\\.Rmd$", ".md", infile)) | ||
|
||
# knit only if the input file is the last one modified | ||
if (!file.exists(outfile) | | ||
file.info(infile)$mtime > file.info(outfile)$mtime) { | ||
KnitPost(infile, outfile) | ||
} | ||
} | ||
|
Oops, something went wrong.