Skip to content

Commit 31784e6

Browse files
committed
Change make-clasp-website
So we can run it from the command line with arguements
1 parent 3d77710 commit 31784e6

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

elisp/clasp-website.el

+16-8
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,18 @@ POSTFIX is html code that is appended to the menu."
100100
(create-menu-preamble
101101
"footer.org" nil "<center>" "</center>"))
102102

103-
(defun make-clasp-website (force)
103+
(defun make-clasp-website-impl (force base-directory publishing-directory)
104104
"Create the website for clasp.
105105
If prefix arg FORCE is non-nil, force rebuild files that were not updated.
106106
Use FORCE, if you have updated menu.org, in order to update the menu on all files."
107-
(interactive "P")
108107
(let ((org-html-htmlize-output-type 'css)
109108
(project-alist
110109
(cons
111110
"clasp-html"
112111
(list
113-
:base-directory
114-
(or clasp-website-source-directory
115-
(read-directory-name "Source (org) directory: " nil nil t nil))
112+
:base-directory base-directory
116113
:base-extension "org"
117-
:publishing-directory
118-
(or clasp-website-target-directory
119-
(read-directory-name "Target (html) directory: "))
114+
:publishing-directory publishing-directory
120115
:recursive t
121116
:publishing-function 'org-html-publish-to-html
122117
:auto-sitemap t
@@ -127,3 +122,16 @@ Use FORCE, if you have updated menu.org, in order to update the menu on all file
127122
:html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/readtheorg/css/htmlize.css\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/readtheorg/css/readtheorg-no-toc.css\"/>\n\n<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js\"></script>\n<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js\"></script>\n<script type=\"text/javascript\" src=\"styles/lib/js/jquery.stickytableheaders.min.js\"></script>\n<script type=\"text/javascript\" src=\"styles/readtheorg/js/readtheorg.js\"></script>"))))
128123
(org-publish-project project-alist force)
129124
(message "Clasp website published.")))
125+
126+
127+
(defun make-clasp-website (force)
128+
"Create the website for clasp.
129+
If prefix arg FORCE is non-nil, force rebuild files that were not updated.
130+
Use FORCE, if you have updated menu.org, in order to update the menu on all files."
131+
(interactive "P")
132+
(make-clasp-website-impl
133+
force
134+
(or clasp-website-source-directory
135+
(read-directory-name "Source (org) directory: " nil nil t nil))
136+
(or clasp-website-target-directory
137+
(read-directory-name "Target (html) directory: "))))

0 commit comments

Comments
 (0)