Skip to content

Instantly share code, notes, and snippets.

@yenliangl
Created January 5, 2012 08:21
Show Gist options
  • Save yenliangl/1564238 to your computer and use it in GitHub Desktop.
Save yenliangl/1564238 to your computer and use it in GitHub Desktop.
Publish org to remote host via SSH
(require 'org-publish)
(setq org-directory "~/Dropbox/Org")
(setq org-internal-directory "~/Org")
(setq org-internal-publishing-directory (concat "/ssh:" user-login-name "@HOST01:~/public_html"))
(setq org-publish-project-alist
`( ;use back-quote
;; publish to public cloud
("org" :components ("org-notes" "org-static" "org-ebooks"))
;; publish to internal cloud
("org-internal" :components ("org-internal-notes" "org-internal-static"))
;; components
("org-notes"
:base-directory ,org-directory
:base-extension "org"
:publishing-directory "~/Dropbox/public_html"
:recursive t
:publishing-function org-publish-org-to-html
:plain-source t
:headline-levels 10
:htmlized-source t
:section-numbers nil
:table-of-contents t
:style "<link rel=\"stylesheet\" href=\"css/worg.css\" type=\"text/css\"/>"
:auto-preamble t
:auto-index t
:index-filename "sitemap.org"
:index-title "Sitemap"
)
("org-ebooks"
:base-directory ,org-directory
:base-extension "pdf\\|chm"
:publishing-directory "~/Dropbox/public_html/"
:recursive t
:publishing-function org-publish-attachment
)
("org-static"
:base-directory ,org-directory
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|mp3\\|ogg\\|swf\\|mm"
:publishing-directory "~/Dropbox/public_html/"
:recursive t
:publishing-function org-publish-attachment
)
;; for everythings that should be kept away from public
("org-internal-notes"
:base-directory ,org-internal-directory
:base-extension "org"
:publishing-directory ,org-internal-publishing-directory
:recursive t
:publishing-function org-publish-org-to-html
:headline-levels 10
:htmlized-source t
:section-numbers nil
:table-of-contents t
:style "<link rel=\"stylesheet\" href=\"css/worg.css\" type=\"text/css\"/>"
:auto-preamble t
:auto-index t
:auto-sitemap t
:sitemap-filename "index.html"
:sitemap-title "Homepage of Liu, Yen-Liang (Josh)"
:sitemap-style "tree"
:tags nil
)
("org-internal-static"
:base-directory ,org-internal-directory
:publishing-directory ,org-internal-publishing-directory
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|mp3\\|ogg\\|swf\\|mm"
:recursive t
:publishing-function org-publish-attachment
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment