That’s great for giving lectures, and is all I really need at 9:55 when I’m trying to type my lecture and walk to class at the same time. But after lecture I want to put my slides somewhere my students can see them. Even if I wanted to, it would be impossible for me to post to Blackboard, which turns these files into garbage. What I want to do is publish them to the web; but I need to make sure that all the JS and CSS links are pointing to the web-based libraries and not my local copies, which of course no one but me can see. To do this I had to make one small change to org-reveal.el
, which I have submitted as a pull request. This creates a new variable, org-reveal-extra-css
, which I can refer to in my own functions.
<p>
Then I use org-mode’s fantastic built-in <a href="http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html">Publishing functions</a> to push my slides to a public website. Publishing allows you to perform an export on many files, and customize the output in powerful ways that are mostly beyond me, actually. Still, I have a setup that I like a lot.
</p>
<p>
First, my <code>org-publish-project-alist</code>, which defines the publishing targets. Note especially the top part, which defines “meta-projects”: for instance, I can publish all the slides and source files for all my classes with one command, <code>M-x org-publish-projects [RET] courses</code>.
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp">(<span style="color: #a020f0;">setq</span> org-publish-project-alist
'(
(<span style="color: #8b2252;">"courses"</span>
<span style="color: #483d8b;">:components</span> (<span style="color: #8b2252;">"dh"</span> <span style="color: #8b2252;">"rlg231"</span>))
(<span style="color: #8b2252;">"rlg231"</span>
<span style="color: #483d8b;">:components</span> (<span style="color: #8b2252;">"rlg231-lecture-slides"</span> <span style="color: #8b2252;">"rlg231-lecture-source"</span>))
(<span style="color: #8b2252;">"dh"</span>
<span style="color: #483d8b;">:components</span> (<span style="color: #8b2252;">"digital-history-lecture-slides"</span> <span style="color: #8b2252;">"digital-history-lecture-source"</span>))
(<span style="color: #8b2252;">"rlg231-lecture-slides"</span>
<span style="color: #483d8b;">:base-directory</span> <span style="color: #8b2252;">"~/RLG231/Lectures/"</span>
<span style="color: #483d8b;">:base-extension</span> <span style="color: #8b2252;">"org"</span>
<span style="color: #483d8b;">:publishing-directory</span> <span style="color: #8b2252;">"/ssh:matt@shimano:/var/www/sandbox/RLG231/Lectures/Slides"</span>
<span style="color: #483d8b;">:recursive</span> t
<span style="color: #483d8b;">:publishing-function</span> mwp-org-reveal-publish-to-html
<span style="color: #483d8b;">:preparation-function</span> nil
<span style="color: #483d8b;">:completion-function</span> nil
<span style="color: #483d8b;">:headline-levels</span> 4 <span style="color: #b22222;">; </span><span style="color: #b22222;">Just the default for this project.</span>
<span style="color: #483d8b;">:exclude</span> <span style="color: #8b2252;">"LectureOutlines.org"</span>
<span style="color: #483d8b;">:exclude-tags</span> note noexport
<span style="color: #483d8b;">:auto-preamble</span> t)
(<span style="color: #8b2252;">"rlg231-lecture-source"</span>
<span style="color: #483d8b;">:base-directory</span> <span style="color: #8b2252;">"~/RLG231/Lectures/"</span>
<span style="color: #483d8b;">:base-extension</span> <span style="color: #8b2252;">"org"</span>
<span style="color: #483d8b;">:publishing-directory</span> <span style="color: #8b2252;">"/ssh:matt@shimano:/var/www/sandbox/RLG231/Lectures/Source"</span>
<span style="color: #483d8b;">:recursive</span> t
<span style="color: #483d8b;">:publishing-function</span> org-org-publish-to-org
<span style="color: #483d8b;">:preparation-function</span> nil
<span style="color: #483d8b;">:completion-function</span> nil
<span style="color: #483d8b;">:headline-levels</span> 4 <span style="color: #b22222;">; </span><span style="color: #b22222;">Just the default for this project.</span>
<span style="color: #483d8b;">:exclude</span> <span style="color: #8b2252;">"LecturePlans.org"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:exclude "LectureOutlines.org"</span>
<span style="color: #483d8b;">:exclude-tags</span> note noexport
<span style="color: #483d8b;">:auto-preamble</span> t)
(<span style="color: #8b2252;">"digital-history-lecture-source"</span>
<span style="color: #483d8b;">:base-directory</span> <span style="color: #8b2252;">"~/DH/Lectures"</span>
<span style="color: #483d8b;">:base-extension</span> <span style="color: #8b2252;">"org"</span>
<span style="color: #483d8b;">:publishing-directory</span> <span style="color: #8b2252;">"/ssh:matt@shimano:/var/www/sandbox/DigitalHistory/Lectures/Source"</span>
<span style="color: #483d8b;">:recursive</span> t
<span style="color: #483d8b;">:publishing-function</span> org-org-publish-to-org
<span style="color: #483d8b;">:preparation-function</span>
<span style="color: #483d8b;">:completion-function</span>
<span style="color: #483d8b;">:headline-levels</span> 4 <span style="color: #b22222;">; </span><span style="color: #b22222;">Just the default for this project.</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:exclude "LecturePlans.org"</span>
<span style="color: #483d8b;">:exclude</span> <span style="color: #8b2252;">"LectureOutlines.org"</span>
<span style="color: #483d8b;">:exclude-tags</span> note noexport
<span style="color: #483d8b;">:auto-preamble</span> t)
(<span style="color: #8b2252;">"digital-history-lecture-slides"</span>
<span style="color: #483d8b;">:base-directory</span> <span style="color: #8b2252;">"~/DH/Lectures"</span>
<span style="color: #483d8b;">:base-extension</span> <span style="color: #8b2252;">"org"</span>
<span style="color: #483d8b;">:publishing-directory</span> <span style="color: #8b2252;">"/ssh:matt@shimano:/var/www/sandbox/DigitalHistory/Lectures/Slides"</span>
<span style="color: #483d8b;">:recursive</span> t
<span style="color: #483d8b;">:publishing-function</span> mwp-org-reveal-publish-to-html
<span style="color: #483d8b;">:preparation-function</span>
<span style="color: #483d8b;">:completion-function</span>
<span style="color: #483d8b;">:headline-levels</span> 4 <span style="color: #b22222;">; </span><span style="color: #b22222;">Just the default for this project.</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:exclude "LecturePlans.org"</span>
<span style="color: #483d8b;">:exclude</span> <span style="color: #8b2252;">"LectureOutlines.org"</span>
<span style="color: #483d8b;">:exclude-tags</span> note noexport
<span style="color: #483d8b;">:auto-preamble</span> t)
<span style="color: #b22222;">;; </span><span style="color: #b22222;">("newone-lecture-slides"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:base-directory "~/NewOne/Lectures/"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:base-extension "org"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:publishing-directory "/ssh:matt@shimano:/var/www/sandbox/NewOne/Lectures"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:recursive t</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:publishing-function org-deck-publish-to-html</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:headline-levels 4 ; Just the default for this project.</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:exclude-tags note noexport</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:auto-preamble t)</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">("newone-lecture-notes"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:base-directory "~/NewOne/Lectures/"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:base-extension "org"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:publishing-directory "/ssh:matt@shimano:/var/www/sandbox/NewOne/Lectures-with-notes"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:recursive t</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:publishing-function org-html-publish-to-html</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:headline-levels 4 ; Just the default for this project.</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:exclude-tags noexport</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:auto-preamble t)</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">("newone-images"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:base-directory "~/NewOne/Images/"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:base-extension "jpg\\|gif\\|png"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:publishing-directory "/ssh:matt@shimano:/var/www/sandbox/NewOne/Images"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:publishing-function org-publish-attachment)</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">("newone" :components ("newone-lecture-slides" "newone-lecture-notes" "newone-images") )</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">("presentations"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:base-directory "~/Dropbox/Work/Talks/"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:base-extension "org"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:publishing-directory "/ssh:matt@shimano:/var/www/sandbox/Presentations"</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:headline-levels 4 ; just the default for this project</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:exclude-tags noexport</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:auto-preamble t</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">:publishing-function mwp-org-deck-publish-to-html</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">;; :completion-function mwp-update-published-paths</span>
<span style="color: #b22222;">;; </span><span style="color: #b22222;">)</span>
))