publish.el (1967B)
1 ;;; package --- summary Blog post generator. 2 3 ;;; Copyright (C) Ryan Jeffrey 2022 4 5 ;;; Author: Ryan Jeffrey <ryan@ryanmj.xyz> 6 ;;; Created: 2021-02-12 7 ;;; Keywords: website org 8 ;;; Version: 0.1 9 ;;; Package-Requires: ((emacs "27.1")) 10 ;;; URL: https://gitlab.com/Mallock/site 11 12 ;;; License: 13 14 ;; This file is part of Ryan's Homepage. 15 ;; 16 ;; Ryan's Homepage is free software: you can redistribute it and/or modify 17 ;; it under the terms of the GNU General Public License as published by 18 ;; the Free Software Foundation, either version 3 of the License, or 19 ;; (at your option) any later version. 20 ;; 21 ;; Ryan's Homepage is distributed in the hope that it will be useful, 22 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 23 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 ;; GNU General Public License for more details. 25 ;; 26 ;; You should have received a copy of the GNU General Public License 27 ;; along with Ryan's Homepage. If not, see <http://www.gnu.org/licenses/>. 28 29 30 ;;; Commentary: 31 32 ;; This script uses org-mode to export posts for my site. 33 34 ;;; Code: 35 36 (require 'ox-publish) 37 (require 'ox-html) 38 39 ;; Define the publishing project 40 (setq org-publish-project-alist 41 (list 42 (list "org-site:blog" 43 :base-directory "./" 44 :publishing-directory "./" 45 :publishing-function 'org-html-publish-to-html 46 :with-creator t ;; Include Emacs and Org versions in footer 47 :with-toc 2 ;; Include a table of contents with a depth of 2 48 :section-numbers t ;; Don't include section numbers 49 :exclude ".*" ;; Exclude all files 50 :with-latex t ;; Enable latex for maths 51 :body-only t ;; Only publish the body of the HTML file 52 :include (list (nth 0 argv)) ;; Except the ones we want to compile 53 ))) 54 55 ;; Generate the site output 56 (org-publish-all t)