Add build for tangling, weaving, and stow
parent
b71f6bc93b
commit
4857f2e1b0
|
@ -0,0 +1,3 @@
|
|||
/www-root
|
||||
theindex.*
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
# Mike Gerwitz's personal configuration build
|
||||
#
|
||||
# Copyright (C) 2015 Mike Gerwitz
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
.PHONY: default tangle-and-weave
|
||||
|
||||
default: tangle-and-weave
|
||||
|
||||
tangle-and-weave:
|
||||
emacs --batch -l project.el
|
||||
|
||||
install:
|
||||
stow -vd . -t "$(HOME)" --ignore='^_|.*\.(org|inc)$$' src
|
||||
|
||||
uninstall:
|
||||
stow -vd . -t "$(HOME)" -D src
|
|
@ -0,0 +1,56 @@
|
|||
;; Tangle configuration files and weave documentation
|
||||
;;
|
||||
;; Copyright (C) 2015 Mike Gerwitz
|
||||
;;
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(package-initialize)
|
||||
|
||||
(require 'ox-publish)
|
||||
|
||||
;; FIXME: we're relying on the fact that we do not yet have a hierarchy
|
||||
(defconst html-nav-bar
|
||||
"<nav id=\"nav-rel\">
|
||||
<ul>
|
||||
<li><a href=\"./\">Home</a></li>
|
||||
</ul>
|
||||
</nav>")
|
||||
|
||||
(setq org-confirm-babel-evaluate nil
|
||||
org-src-fontify-natively t
|
||||
|
||||
org-publish-project-alist
|
||||
`(("config-html"
|
||||
:base-directory "src"
|
||||
:publishing-directory "www-root"
|
||||
:recursive t
|
||||
:base-extension "org$"
|
||||
:exclude "_inc"
|
||||
|
||||
:headline-levels 5
|
||||
:section-numbers t
|
||||
|
||||
:makeindex t
|
||||
|
||||
:html-html5-fancy t
|
||||
:html-head-include-default-style nil
|
||||
:html-preamble ,html-nav-bar
|
||||
|
||||
:publishing-function my/org-publish-tangle)))
|
||||
|
||||
(defun my/org-publish-tangle (plist filename pub-dir)
|
||||
(org-babel-tangle-file filename)
|
||||
(org-html-publish-to-html plist filename pub-dir))
|
||||
|
||||
(org-publish "config-html")
|
Loading…
Reference in New Issue