Commit 9941878eab96

Vincent Demeester <vincent@sbr.pm>
2015-05-01 15:41:05
Add vdf publishing project
And fix the errors when exporting.
1 parent 9842cdf
Changed files (1)
.emacs.d
.emacs.d/emacs.org
@@ -2064,67 +2064,106 @@
     And the projects.
 
     #+BEGIN_SRC emacs-lisp
-      (use-package ox-publish)
-      (use-package ox-rss)
-      ;; Project
-      (setq org-publish-project-alist
-            '(("sbr-notes"
-               :base-directory (expand-file-name "sbr" org-notes-directory)
-               :base-extension "org"
-               :publishing-directory (expand-file-name "sbr" org-publish-folder)
-               :makeindex t
-               :exclude "FIXME"
-               :recursive t
-               :htmlized-source t
-               :publishing-function org-html-publish-to-html
-               :headline-levels 4
-               :auto-preamble t
-               :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"
-               :html-preamble "<div id=\"nav\">
-      <ul>
-      <li><a href=\"/\" class=\"home\">Home</a></li>
-      </ul>
-      </div>"
-               :html-postamble "<div id=\"footer\">
-      %a %C %c
-      </div>")
-              ("sbr-static"
-               :base-directory (expand-file-name "sbr" org-notes-directory)
-               :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg"
-               :publishing-directory (expand-file-name "sbr" org-publish-folder)
-               :recursive t
-               :publishing-function org-publish-attachment
-              )
-              ("sbr" :components ("sbr-notes" "sbr-static"))
-              ("znk-notes"
-               :base-directory (expand-file-name "zenika" org-notes-directory)
-               :base-extension "org"
-               :publishing-directory (expand-file-name "zenika" org-publish-folder)
-               :makeindex t
-               :exclude "FIXME"
-               :recursive t
-               :htmlized-source t
-               :publishing-function org-html-publish-to-html
-               :headline-levels 4
-               :auto-preamble t
-               :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"
-               :html-preamble "<div id=\"nav\">
-      <ul>
-      <li><a href=\"/\" class=\"home\">Home</a></li>
-      </ul>
-      </div>"
-               :html-postamble "<div id=\"footer\">
-      %a %C %c
-      </div>")
-              ("znk-static"
-               :base-directory (expand-file-name "zenika" org-notes-directory)
-               :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg"
-               :publishing-directory (expand-file-name "zenika" org-publish-folder)
-               :recursive t
-               :publishing-function org-publish-attachment
-              )
-              ("znk" :components ("znk-notes" "znk-static"))
-              ))
+            (use-package ox-publish)
+            (use-package ox-rss)
+
+            ;; Define some variables to write less :D
+            (setq sbr-base-directory (expand-file-name "sbr" org-notes-directory)
+                  sbr-publishing-directory (expand-file-name "sbr" org-publish-folder)
+                  znk-base-directory (expand-file-name "zenika" org-notes-directory)
+                  znk-publishing-directory (expand-file-name "zenika" org-publish-folder)
+                  vdf-base-directory (expand-file-name "vdf" org-notes-directory)
+                  vdf-site-directory (expand-file-name "vdemeester.github.com" github-personal-folder)
+                  vdf-publishing-directory (expand-file-name "_posts" vdf-site-directory)
+                  vdf-css-publishing-directory (expand-file-name "css" vdf-site-directory)
+                  vdf-assets-publishing-directory (expand-file-name "assets" vdf-site-directory))
+
+            ;; Project
+            (setq org-publish-project-alist
+                  `(("sbr-notes"
+                     :base-directory ,sbr-base-directory
+                     :base-extension "org"
+                     :publishing-directory ,sbr-publishing-directory
+                     :makeindex t
+                     :exclude "FIXME"
+                     :recursive t
+                     :htmlized-source t
+                     :publishing-function org-html-publish-to-html
+                     :headline-levels 4
+                     :auto-preamble t
+                     :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"
+                     :html-preamble "<div id=\"nav\">
+            <ul>
+            <li><a href=\"/\" class=\"home\">Home</a></li>
+            </ul>
+            </div>"
+                     :html-postamble "<div id=\"footer\">
+            %a %C %c
+            </div>")
+                    ("sbr-static"
+                     :base-directory ,sbr-base-directory
+                     :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg"
+                     :publishing-directory ,sbr-publishing-directory
+                     :recursive t
+                     :publishing-function org-publish-attachment
+                     )
+                    ("sbr" :components ("sbr-notes" "sbr-static"))
+                    ("vdf-notes"
+                     :base-directory ,vdf-base-directory
+                     :base-extension "org"
+                     :publishing-directory ,vdf-publishing-directory
+                     :exclude "FIXME"
+                     :section-numbers nil
+                     :with-toc nil
+                     :with-drawers t
+                     :htmlized-source t
+                     :publishing-function org-html-publish-to-html
+                     :headline-levels 4
+                     :body-only t)
+                    ("vdf-static-css"
+                     :base-directory ,vdf-base-directory
+                     :base-extension "css"
+                     :publishing-directory ,vdf-css-publishing-directory
+                     :recursive t
+                     :publishing-function org-publish-attachment
+                     )
+                    ("vdf-static-assets"
+                     :base-directory ,vdf-base-directory
+                     :base-extension "png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg"
+                     :publishing-directory ,vdf-assets-publishing-directory
+                     :recursive t
+                     :publishing-function org-publish-attachment
+                     )
+                    ("vdf" :components ("vdf-notes" "vdf-static-css" "vdf-static-assets"))
+                    ("znk-notes"
+                     :base-directory ,znk-base-directory
+                     :base-extension "org"
+                     :publishing-directory ,znk-publishing-directory
+                     :makeindex t
+                     :exclude "FIXME"
+                     :recursive t
+                     :htmlized-source t
+                     :publishing-function org-html-publish-to-html
+                     :headline-levels 4
+                     :auto-preamble t
+                     :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"
+                     :html-preamble "<div id=\"nav\">
+            <ul>
+            <li><a href=\"/\" class=\"home\">Home</a></li>
+            </ul>
+            </div>"
+                     :html-postamble "<div id=\"footer\">
+            %a %C %c
+            </div>")
+                    ("znk-static"
+                     :base-directory ,znk-base-directory
+                     :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg"
+                     :publishing-directory ,znk-publishing-directory
+                     :recursive t
+                     :publishing-function org-publish-attachment
+                     )
+                    ("znk" :components ("znk-notes" "znk-static"))
+                    ))
     #+END_SRC
 *** Protocol