Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit after playing around a bit
- Loading branch information
Charles R. Hogg III
committed
Sep 6, 2012
1 parent
fd35d66
commit 8df5586
Showing
14 changed files
with
497 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,57 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# A few helpful tips about the Rules file: | ||
# | ||
# * The string given to #compile and #route are matching patterns for | ||
# identifiers--not for paths. Therefore, you can’t match on extension. | ||
# | ||
# * The order of rules is important: for each item, only the first matching | ||
# rule is applied. | ||
# | ||
# * Item identifiers start and end with a slash (e.g. “/about/” for the file | ||
# “content/about.html”). To select all children, grandchildren, … of an | ||
# item, use the pattern “/about/*/”; “/about/*” will also select the parent, | ||
# because “*” matches zero or more characters. | ||
|
||
compile '/stylesheet/' do | ||
# don’t filter or layout | ||
end | ||
|
||
compile '/about/*' do | ||
if item.binary? | ||
# don't filter binary items | ||
else | ||
filter :pandoc | ||
filter :pygments | ||
layout 'default' | ||
end | ||
end | ||
|
||
compile '*' do | ||
if item.binary? | ||
# don’t filter binary items | ||
else | ||
filter :erb | ||
layout 'default' | ||
end | ||
end | ||
|
||
route '/stylesheet/' do | ||
'/style.css' | ||
end | ||
|
||
route '/Mathjax/' do | ||
'/Mathjax.js' | ||
end | ||
|
||
route '*' do | ||
if item.binary? | ||
# Write item with identifier /foo/ to /foo.ext | ||
item.identifier.chop + '.' + item[:extension] | ||
else | ||
# Write item with identifier /foo/ to /foo/index.html | ||
item.identifier + 'index.html' | ||
end | ||
end | ||
|
||
layout '*', :erb |
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,77 @@ | ||
# A list of file extensions that nanoc will consider to be textual rather than | ||
# binary. If an item with an extension not in this list is found, the file | ||
# will be considered as binary. | ||
text_extensions: [ 'coffee', 'css', 'erb', 'haml', 'handlebars', 'hb', 'htm', 'html', 'js', 'less', 'markdown', 'md', 'ms', 'mustache', 'php', 'rb', 'sass', 'scss', 'txt', 'xhtml', 'xml' ] | ||
|
||
# The path to the directory where all generated files will be written to. This | ||
# can be an absolute path starting with a slash, but it can also be path | ||
# relative to the site directory. | ||
output_dir: output | ||
|
||
# A list of index filenames, i.e. names of files that will be served by a web | ||
# server when a directory is requested. Usually, index files are named | ||
# “index.html”, but depending on the web server, this may be something else, | ||
# such as “default.htm”. This list is used by nanoc to generate pretty URLs. | ||
index_filenames: [ 'index.html' ] | ||
|
||
# Whether or not to generate a diff of the compiled content when compiling a | ||
# site. The diff will contain the differences between the compiled content | ||
# before and after the last site compilation. | ||
enable_output_diff: false | ||
|
||
prune: | ||
# Whether to automatically remove files not managed by nanoc from the output | ||
# directory. For safety reasons, this is turned off by default. | ||
auto_prune: false | ||
|
||
# Which files and directories you want to exclude from pruning. If you version | ||
# your output directory, you should probably exclude VCS directories such as | ||
# .git, .svn etc. | ||
exclude: [ '.git', '.hg', '.svn', 'CVS' ] | ||
|
||
# The data sources where nanoc loads its data from. This is an array of | ||
# hashes; each array element represents a single data source. By default, | ||
# there is only a single data source that reads data from the “content/” and | ||
# “layout/” directories in the site directory. | ||
data_sources: | ||
- | ||
# The type is the identifier of the data source. By default, this will be | ||
# `filesystem_unified`. | ||
type: filesystem_unified | ||
|
||
# The path where items should be mounted (comparable to mount points in | ||
# Unix-like systems). This is “/” by default, meaning that items will have | ||
# “/” prefixed to their identifiers. If the items root were “/en/” | ||
# instead, an item at content/about.html would have an identifier of | ||
# “/en/about/” instead of just “/about/”. | ||
items_root: / | ||
|
||
# The path where layouts should be mounted. The layouts root behaves the | ||
# same as the items root, but applies to layouts rather than items. | ||
layouts_root: / | ||
|
||
# Whether to allow periods in identifiers. When turned off, everything | ||
# past the first period is considered to be the extension, and when | ||
# turned on, only the characters past the last period are considered to | ||
# be the extension. For example, a file named “content/about.html.erb” | ||
# will have the identifier “/about/” when turned off, but when turned on | ||
# it will become “/about.html/” instead. | ||
allow_periods_in_identifiers: false | ||
|
||
# Configuration for the “watch” command, which watches a site for changes and | ||
# recompiles if necessary. | ||
watcher: | ||
# A list of directories to watch for changes. When editing this, make sure | ||
# that the “output/” and “tmp/” directories are _not_ included in this list, | ||
# because recompiling the site will cause these directories to change, which | ||
# will cause the site to be recompiled, which will cause these directories | ||
# to change, which will cause the site to be recompiled again, and so on. | ||
dirs_to_watch: [ 'content', 'layouts', 'lib' ] | ||
|
||
# A list of single files to watch for changes. As mentioned above, don’t put | ||
# any files from the “output/” or “tmp/” directories in here. | ||
files_to_watch: [ 'config.yaml', 'Rules' ] | ||
|
||
# When to send notifications (using Growl or notify-send). | ||
notify_on_compilation_success: true | ||
notify_on_compilation_failure: true |
Large diffs are not rendered by default.
Oops, something went wrong.
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,7 @@ | ||
# About the author | ||
|
||
Charles R. Hogg III wishes he knew how to use pandoc. So, here's some vim code: | ||
|
||
```vim | ||
setlocal nohlsearch | ||
``` |
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 @@ | ||
--- | ||
title: About the author | ||
--- | ||
|
||
|
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 @@ | ||
--- title: About this website --- # Motivation Why do a new website? The time is right. ## An online home for everything I found I needed a home for my research # Needs What do I need this website to be able to do? ## Syntax highlighting [Coderay](http://coderay.rubychan.de/ "Coderay - Fast and easy syntax highlighting for selected languages.") or [pygments](http://pygments.org/ "pygments - Python syntax highlighting")? Coderay looks good, and has a nice, expressive Ruby syntax. But it doesn't highlight `R` _or_ `vimscript`. Pygments _does_ -- as well as [a whole lot more](http://pygments.org/languages/ "The ever-growing range of languages supported by pygments")! I'm going with pygments. ### Problems with pandoc I do all my writing in [pandoc](http://johnmacfarlane.net/pandoc/index.html "Pandoc - a universal document converter"). It seems like the most flexible markdown superset that meets _all_ my needs: blogging, scientific papers, and talk slides. ~~~~~~~~~~~~~~~ {.vim .numberLines startFrom="3"} let g:adjective = "flexible" echom "I hear pandoc is pretty" g:adjective ~~~~~~~~~~~~~~~ Okay, I see pandoc doesn't have support for `vim` highlighting. ```bash for I in ls do echo "$I" done ``` ```vim let g:adjective = "flexible" echom "I hear pandoc is pretty" g:adjective ``` $$\sum_{i=0}^\infty \frac{1}{2^i}$$ |
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,52 @@ | ||
# Motivations | ||
|
||
Why do a new website? Because the time is right. | ||
|
||
## An online home for everything | ||
|
||
I found I needed a home for my research | ||
|
||
# Needs | ||
|
||
What do I need this website to be able to do? | ||
|
||
## Syntax highlighting | ||
|
||
[Coderay](http://coderay.rubychan.de/ "Coderay - Fast and easy syntax highlighting for selected languages.") | ||
or | ||
[pygments](http://pygments.org/ "pygments - Python syntax highlighting")? | ||
|
||
Coderay looks good, and has a nice, expressive Ruby syntax. | ||
But it doesn't highlight `R` _or_ `vimscript`. | ||
Pygments _does_ -- as well as [a whole lot more](http://pygments.org/languages/ | ||
"The ever-growing range of languages supported by pygments")! | ||
|
||
I'm going with pygments. | ||
|
||
### Problems with pandoc | ||
|
||
I do all my writing in [pandoc](http://johnmacfarlane.net/pandoc/index.html | ||
"Pandoc - a universal document converter"). | ||
It seems like the most flexible markdown superset that meets _all_ my needs: | ||
blogging, scientific papers, and talk slides. | ||
|
||
~~~~~~~~~~~~~~~ {.vim .numberLines startFrom="3"} | ||
let g:adjective = "flexible" | ||
echom "I hear pandoc is pretty" g:adjective | ||
~~~~~~~~~~~~~~~ | ||
|
||
Okay, I see pandoc doesn't have support for `vim` highlighting. | ||
|
||
```bash | ||
for I in ls | ||
do | ||
echo "$I" | ||
done | ||
``` | ||
|
||
```vim | ||
let g:adjective = "flexible" | ||
echom "I hear pandoc is pretty" g:adjective | ||
``` | ||
|
||
$$\sum_{i=0}^\infty \frac{1}{2^i}$$ should work |
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,3 @@ | ||
--- | ||
title: About this website | ||
--- |
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,16 @@ | ||
--- | ||
title: Hurry up already! | ||
--- | ||
|
||
<h1>A Brand New nanoc Site</h1> | ||
|
||
<p>One small step for Charles Hogg; one giant leap for... actually, not a giant leap yet.</p> | ||
|
||
<p>You’ve just created a new nanoc site. The page you are looking at right now is the home page for your site. To get started, consider replacing this default homepage with your own customized homepage. Some pointers on how to do so:</p> | ||
|
||
<ul> | ||
<li><p><strong>Change this page’s content</strong> by editing the “index.html” file in the “content” directory. This is the actual page content, and therefore doesn’t include the header, sidebar or style information (those are part of the layout).</p></li> | ||
<li><p><strong>Change the layout</strong>, which is the “default.html” file in the “layouts” directory, and create something unique (and hopefully less bland).</p></li> | ||
</ul> | ||
|
||
<p>If you need any help with customizing your nanoc web site, be sure to check out the documentation (see sidebar), and be sure to subscribe to the discussion group (also see sidebar). Enjoy!</p> |
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 @@ | ||
--- | ||
title: A New Item | ||
--- | ||
|
||
Hi, I'm a new item! |
Oops, something went wrong.