Code downloads

This commit is contained in:
Correl Roush 2014-05-19 01:42:59 -04:00
parent a662d89454
commit 13b2a14321
3 changed files with 23 additions and 8 deletions

View file

@ -1,7 +1,7 @@
#+BEGIN_HTML #+BEGIN_HTML
--- ---
title: 1.1 - The Elements of Programming title: 1.1 - The Elements of Programming
layout: page layout: org
--- ---
#+END_HTML #+END_HTML

21
_layouts/org.html Normal file
View file

@ -0,0 +1,21 @@
---
layout: default
---
{% assign scheme_filename = page.url | replace: '.html','.scheme' | remove: '/org/' %}
{% assign scheme_url = scheme_filename | prepend: '/' | prepend: site.baseurl %}
<div class="post">
<header class="post-header">
<h1>{{ page.title }}</h1>
<hr />
Download the code for this chapter: <a class="post-link" href="{{ scheme_url }}">{{ scheme_filename }}</a>
<hr />
</header>
<article class="post-content">
{{ content }}
</article>
</div>

View file

@ -14,12 +14,6 @@
:html-extension "html" :html-extension "html"
:with-toc nil :with-toc nil
:body-only t) :body-only t)
("org-sicp-code" ("sicp" :components ("org-sicp"))))
:base-directory "."
:base-extension "scm\\|scheme"
:publishing-directory "./code"
:recursive nil
:publishing-function org-publish-attachment)
("sicp" :components ("org-sicp" "org-sicp-code"))))
(org-publish "sicp" 't) (org-publish "sicp" 't)