From a69934885c7a3b303049e2418333b3915b8f8fb8 Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Fri, 25 Jan 2019 00:34:09 +0100 Subject: [PATCH] =?utf8?q?Add=20=E2=80=98pelican-make-github=E2=80=99=20(`?= =?utf8?q?C-c=20=3D=20g`)=20to=20run=20`make=20github`?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Thanks to Azzam S.A for implementing this feature. --- README.md | 1 + pelican-mode.el | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 65c21d4..68d0b35 100644 --- 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 diff --git a/pelican-mode.el b/pelican-mode.el index 418a825..2cfa3be 100644 --- a/pelican-mode.el +++ b/pelican-mode.el @@ -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")) + (defun pelican-mode-set-fields (&rest fields) -- 2.20.1