idk
This commit is contained in:
parent
9397f3077e
commit
ac8bdcacd2
2 changed files with 39 additions and 9 deletions
17
init.el
17
init.el
|
|
@ -4418,3 +4418,20 @@ interfere with the default `bongo-playlist-buffer'."
|
|||
gcmh-verbose nil))
|
||||
|
||||
(add-to-list 'warning-suppress-types '(comp))
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(org-src-content-indentation 0 nil nil "Customized with use-package org")
|
||||
'(package-selected-packages nil)
|
||||
'(pdf-misc-print-program-args
|
||||
'("-o media=Letter" "-o fit-to-page" "-o sides=two-sided-long-edge"))
|
||||
'(pdf-misc-print-program-executable "lpr"))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(dired-directory ((t :foreground "#57c7ff" :inherit dired-header)))
|
||||
'(org-modern-tag ((t :background "#9aedfe" :foreground "#282a36"))))
|
||||
|
|
|
|||
|
|
@ -18,10 +18,16 @@
|
|||
(denote-directory "~/docs/site/content")
|
||||
(current-notes (directory-files "~/docs/site/content/notes" t ".*.org$"))
|
||||
(current-lessons (directory-files "~/docs/site/content/teaching" t ".*.org$"))
|
||||
(create-lockfiles nil)
|
||||
(org-export-with-broken-links 'mark)
|
||||
(org-export-with-section-numbers nil)
|
||||
(org-export-with-author nil)
|
||||
(org-export-with-timestamps nil)
|
||||
(org-export-with-date nil)
|
||||
(org-export-with-toc nil)
|
||||
(org-html-html5-fancy t)
|
||||
(org-html-validation-link nil)
|
||||
(org-html-postamble "")
|
||||
(make-backup-files nil)
|
||||
(org-html-head-include-default-style nil)
|
||||
(org-html-head "<link rel=\"stylesheet\" href=\"./static/pico.snazzy.css\">
|
||||
|
|
@ -31,10 +37,13 @@
|
|||
}
|
||||
</style>"))
|
||||
|
||||
(when (= 1
|
||||
(shell-command
|
||||
"cmp --silent ~/docs/site/assets/pico.snazzy.css ~/docs/site/public/static/pico.snazzy.css"))
|
||||
(copy-file "~/docs/site/assets/pico.snazzy.css" "~/docs/site/public/static/pico.snazzy.css" t))
|
||||
(when (not
|
||||
(= 0
|
||||
(shell-command
|
||||
"cmp --silent ~/docs/site/assets/pico.snazzy.css\
|
||||
~/docs/site/public/static/pico.snazzy.css")))
|
||||
(copy-file "~/docs/site/assets/pico.snazzy.css"
|
||||
"~/docs/site/public/static/pico.snazzy.css" t))
|
||||
|
||||
(message "Starting site build")
|
||||
(cl-loop for file in current-notes
|
||||
|
|
@ -44,14 +53,15 @@
|
|||
do (delete-file file t))
|
||||
(message "Removed all lessons")
|
||||
(cl-loop for file in notes
|
||||
do (let ((filename (f-filename file)))
|
||||
do (let ((filename (concat "~/docs/site/content/notes/" (f-filename file))))
|
||||
(copy-file
|
||||
file (concat "~/docs/site/content/notes/" filename) t)))
|
||||
file filename t t)))
|
||||
(message "Copied all notes")
|
||||
(cl-loop for file in lessons
|
||||
do (let ((filename (f-filename file)))
|
||||
do (let ((filename (concat "~/docs/site/content/teaching/" (f-filename file))))
|
||||
(copy-file
|
||||
file (concat "~/docs/site/content/teaching/" filename) t)))
|
||||
file filename t t)
|
||||
(message "copied %s to %s" file filename)))
|
||||
(message "Copied all lessons")
|
||||
(find-file "~/docs/site/content/index.org")
|
||||
(org-update-all-dblocks)
|
||||
|
|
@ -78,6 +88,7 @@
|
|||
(beginning-of-line)
|
||||
(let* ((export-line (delete-and-extract-region
|
||||
(line-beginning-position) (line-end-position)))
|
||||
(create-lockfiles nil)
|
||||
(org-export-with-broken-links 'mark)
|
||||
(org-export-with-section-numbers nil)
|
||||
(org-html-html5-fancy t)
|
||||
|
|
@ -106,13 +117,15 @@
|
|||
(save-buffer)
|
||||
(kill-buffer))))))
|
||||
|
||||
(message "Exporting %s out of %s files: %s" index (length files) file)
|
||||
(setq counter (+ counter 1))
|
||||
(while (> counter 12)
|
||||
(sit-for 0.5))
|
||||
(message "Exporting %s out of %s files: %s" index (length files) file)
|
||||
(async-start
|
||||
func
|
||||
(lambda (result)
|
||||
(message "Note %s out of %s finished: %s" index (length files) file)
|
||||
(message "Finished %s" index (length files) file)
|
||||
(setq counter (- counter 1))))
|
||||
|
||||
)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue