Add ‘pelican-make-github’ (`C-c = g`) to run `make github`
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Thu, 24 Jan 2019 23:34:09 +0000 (00:34 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Thu, 24 Jan 2019 23:36:50 +0000 (00:36 +0100)
Thanks to Azzam S.A for implementing this feature.

README.md
pelican-mode.el

index 65c21d4..68d0b35 100644 (file)
--- a/README.md
+++ b/README.md
@@ -42,6 +42,7 @@ as hook functions for more direct control.
 * `C-c = n` - Insert a post or page header
 * `C-c = p` - Remove draft status from a post (i.e. publish it)
 * `C-c = u` - Upload a site using rsync (equivalent to `make rsync_upload`)
+* `C-c = g` - Upload a site to GitHub Pages (equivalent to `make github`)
 
 
 ## Troubleshooting
index 418a825..2cfa3be 100644 (file)
@@ -120,6 +120,7 @@ arguments, field and value strings."
     (define-key map (kbd "n") #'pelican-mode-insert-header)
     (define-key map (kbd "p") #'pelican-mode-publish)
     (define-key map (kbd "u") #'pelican-make-rsync-upload)
+    (define-key map (kbd "g") #'pelican-make-github)
     map)
   "Keymap for Pelican commands after ‘pelican-mode-keymap-prefix’.")
 (fset 'pelican-mode-command-map pelican-mode-command-map)
@@ -285,6 +286,11 @@ has no status."
   (interactive)
   (pelican-make "rsync_upload"))
 
+(defun pelican-make-github ()
+  "Upload to GitHub Pages via a Makefile at the root of the site."
+  (interactive)
+  (pelican-make "github"))
+
 \f
 
 (defun pelican-mode-set-fields (&rest fields)