-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,37 @@ | ||
;; Set the package installation directory so that packages aren't stored in the | ||
;; ~/.emacs.d/elpa path. | ||
;;; .build-site.el --- Build progen site. | ||
;; | ||
;; Copyright (C) 2023 Marco Craveiro | ||
;; | ||
;; Author: Marco Craveiro <[email protected]> | ||
;; Maintainer: Marco Craveiro <[email protected]> | ||
;; URL: https://github.com/MASD-Project/progen/blob/main/.build-site.el | ||
;; | ||
;; This program is free software; you can redistribute it and/or modify | ||
;; it under the terms of the GNU General Public License as published by | ||
;; the Free Software Foundation, either version 3 of the License, or | ||
;; (at your option) any later version. | ||
;; | ||
;; This program is distributed in the hope that it will be useful, | ||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
;; GNU General Public License for more details. | ||
;; | ||
;; You should have received a copy of the GNU General Public License | ||
;; along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
;; | ||
;;; Commentary: | ||
;; | ||
;; Builds the progen site under the build directory. | ||
;; | ||
;;; Code: | ||
(require 'package) | ||
(require 'org) | ||
(require 'org-id) | ||
(require 'ox-publish) | ||
(require 'org-element) | ||
|
||
(setq org-id-locations-file (expand-file-name "./.org-id-locations-file")) | ||
(org-id-update-id-locations (directory-files-recursively "." "\\.org$")) | ||
(setq package-user-dir (expand-file-name "./.packages")) | ||
(setq package-archives '(("melpa" . "https://melpa.org/packages/") | ||
("elpa" . "https://elpa.gnu.org/packages/"))) | ||
|
@@ -24,19 +55,30 @@ | |
|
||
;; Define the publishing project | ||
(setq org-publish-project-alist | ||
(list | ||
(list "org-site:main" | ||
:recursive t | ||
:base-directory "./" | ||
:publishing-function 'org-html-publish-to-html | ||
:publishing-directory "./build/output/site" | ||
:with-author nil ;; Don't include author name | ||
:with-creator t ;; Include Emacs and Org versions in footer | ||
:with-toc t ;; Include a table of contents | ||
:section-numbers nil ;; Don't include section numbers | ||
:time-stamp-file nil))) ;; Don't include time stamp in file | ||
'( | ||
("progen-site:pages" | ||
:recursive t | ||
:base-directory "./" | ||
:publishing-function org-html-publish-to-html | ||
:publishing-directory "./build/output/site" | ||
:with-author nil ;; Don't include author name | ||
:with-creator t ;; Include Emacs and Org versions in footer | ||
:with-toc t ;; Include a table of contents | ||
:section-numbers nil ;; Don't include section numbers | ||
:time-stamp-file nil) ;; Don't include time stamp in file | ||
("progen-site:images" | ||
:base-directory "./assets/images" | ||
:base-extension "png\\|jpg" | ||
:publishing-directory "./build/output/site" | ||
:publishing-function org-publish-attachment) | ||
( "progen-site:main" | ||
:components("progen-site:images" "progen-site:pages")) | ||
)) | ||
|
||
;; Generate the site output | ||
(org-publish-all t) | ||
|
||
(message "Build complete!") | ||
|
||
(provide '.build-site) | ||
;;; .build-site.el ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
build/output | ||
|
||
# Emacs | ||
.packages | ||
.org-id-locations-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters