Reorganizing my Publishing Approach

Getting ready to ship an exported version of my files up to my own
server.
This commit is contained in:
Howard Abrams 2023-12-20 19:54:30 -08:00
parent c54d070935
commit 62651466e2
34 changed files with 273 additions and 214 deletions

View file

@ -274,6 +274,6 @@ Convert it back to XML
#+PROPERTY: header-args:emacs-lisp :tangle no
#+PROPERTY: header-args :results none :eval no-export :comments no
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -291,6 +291,6 @@ Convert it back to XML
#+PROPERTY: header-args:emacs-lisp :tangle no
#+PROPERTY: header-args :results none :eval no-export :comments no
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -3,40 +3,75 @@
#+date: 2021-11-01 November
#+tags: emacs readme
** Introduction
My Emacs configuration, that I'm cheekily calling /hamacs/ is a literate programming model heavily inspired by my recent journey into [[https://www.youtube.com/watch?v=LKegZI9vWUU][Henrik Lissner's]] [[https://github.com/hlissner/doom-emacs][Doom Emacs]] and [[https://www.spacemacs.org/][Spacemacs]]. I used both extensively, but decided that I would /roll my own/ as Emacs people tend to be /control freaks/ (at least a little bit).
The other advantage to rolling yer own is that you may /use/ what you add, leading to less bloat, and a more fun experience.
Why yes, feel free to steal whatever you find interesting, as sharing is what makes our community great. Notice that functions and features that I have written begin with ~ha-~, but everything else is either /stock Emacs/ or a /package/ that I download using [[https://github.com/raxod502/straight.el][straight]] (see [[file:bootstrap.org][bootstrap]] for how) and configured with [[https://github.com/jwiegley/use-package][use-package]] (see either [[https://ianyepan.github.io/posts/setting-up-use-package/][this introduction]] or [[https://www.emacswiki.org/emacs/UsePackage][this wiki page]] for details)… meaning that most blocks of code should work on its own.
Hit me up with questions, =@howardabrams=. If you want to try this out, after installing Emacs, and cloning this repo, run:
One advantage of using [[https://howardism.org/Technical/Emacs/literate-devops.html][literate programming]] for my Emacs configuration is an easy way to /share/ my code. So yes, feel free to steal whatever you find interesting, as sharing is what makes our community great. Notice that functions and features that I have written begin with ~ha-~, but everything else is either /stock Emacs/ or a /package/ that I download using [[https://github.com/raxod502/straight.el][straight]] (see [[file:bootstrap.org][bootstrap]] for how) and configured with [[https://github.com/jwiegley/use-package][use-package]] (see either [[https://ianyepan.github.io/posts/setting-up-use-package/][this introduction]] or [[https://www.emacswiki.org/emacs/UsePackage][this wiki page]] for details)… meaning that most blocks of code should work on its own.
Hit me up with questions on Mastodon: [[https://emacs.ch/@howard][@howard@emacs.ch]].
If you want to try the entire process, after installing Emacs, clone this repo with:
#+begin_src sh
git clone https://github.com/howardabrams/hamacs
#+end_src
And then, run:
#+BEGIN_SRC sh
./initialize
#+END_SRC
This creates [[file:~/.emacs.d/init.el][~/.emacs.d/init.el]] that starts the process loading the files:
To create [[file:~/.emacs.d/init.el][~/.emacs.d/init.el]] that starts the process loading the files:
** Core Configuration
- [[file:bootstrap.org][Bootstrap]] :: configures =straight= and loads basic libraries the rest of the code depends on. It then loads the following files in order.
- [[file:ha-config.org][Configuration]] :: contains /most/ of my configuration, setting up my sequence key menus, evil, etc.
- [[file:ha-display.org][GUI Display]] :: sets up the visual aspects of an Emacs GUI, including themes and fonts.
- [[file:ha-dashboard.org][Dashboard]] :: sets up initial window layout of the =main= project with a dashboard.
- [[file:ha-data.org][Data]] :: functions for dealing with a buffer-full of data.
- [[file:bootstrap.org][bootstrap]] :: configures =straight= and loads basic libraries the rest of the code depends on. It then loads the following files in order:
- [[file:ha-config.org][config]] :: contains /most/ of my configuration, setting up my sequence key menus, evil, etc.
- [[file:ha-display.org][display]] :: sets up the visual aspects of an Emacs GUI, including themes and fonts.
- [[file:ha-dashboard.org][dashboard]] :: sets up initial window layout of the =main= project with a dashboard.
- [[file:ha-org.org][org]] :: configures the basics for org-mode formatted files. Specific features come from their own files.
- [[file:ha-org-word-processor.org][org-word-processor]] :: attempts to make Org files /visually/ look like a word processor, including turning off the colors for headers, and instead increasing their size.
- [[file:ha-org-clipboard.org][org-clipboard]] :: automatically converting HTML from a clipboard into Org-formatted content.
- [[file:ha-org-journaling.org][org-journaling]] :: for writing journal entries and tasks.
- [[file:ha-org-publishing.org][org-publishing]] :: code for publishing my website, [[http://howardism.org][www.howardism.org]].
- [[file:ha-org-sprint.org][org-sprint]] :: functions for working with the my Org-focused sprint file.
- [[file:ha-data.org][data]] :: functions for dealing with a buffer-full of data.
- [[file:ha-eshell.org][eshell]] :: customization and enhancement to the Emacs shell.
- [[file:ha-remoting.org][remoting]] :: my interface to systems using SSH and Vterm.
- [[file:ha-email.org][email]] :: reading email using =notmuch= in a *Hey* fashion.
- [[file:ha-feed-reader.org][feed-reader]] :: configuration of elfeed as well as my RSS feeds.
- [[file:ha-aux-apps.org][aux-apps]] :: optional applications, like Twitter and Telegram.
- [[file:ha-capturing-notes.org][capturing-notes]] :: my engineering notebook.
- [[file:ha-agendas.org][agendas]] :: attempts to "supe-up" my task list.
- [[file:ha-irc.org][irc]] :: connection to IRC servers using rcirc and bitlbee.
- [[file:ha-passwords.org][passwords]] :: code for generating passwords.
- [[file:ha-programming.org][programming]] :: configuration for /all/ programming languages, or at least, the simple ones.
- [[file:ha-programming-elisp.org][programming-elisp]] :: additions to Emacs Lisp programming.
- [[file:ha-programming-python.org][programming-python]] :: configuration for working with Python and LSP.
- [[file:ha-programming-scheme.org][programming-scheme]] :: configuration for Racket.
** Org Mode Configuration
- [[file:ha-org.org][Initial Org Configuration]] :: configures the basics for org-mode formatted files. Specific features come from their own files.
- [[file:ha-org-word-processor.org][Word Processing]] :: attempts to make Org files /visually/ look like a word processor, including turning off the colors for headers, and instead increasing their size.
- [[file:ha-org-clipboard.org][Clipboard]] :: automatically converting HTML from a clipboard into Org-formatted content.
- [[file:ha-org-journaling.org][Journaling]] :: for writing journal entries and tasks.
- [[file:ha-org-publishing.org][Publishing]] :: code for publishing my website, [[http://howardism.org][www.howardism.org]].
- [[file:ha-org-sprint.org][Sprint Notes]] :: functions for working with the my Org-focused sprint file.
- [[file:ha-agendas.org][Agendas]] :: attempts to "supe-up" my task list.
- [[file:ha-capturing-notes.org][Capturing Notes]] :: my engineering notebook.
*Note:* Other functions and files come from essays written on [[http://www.howardism.org][my blog]]. To help with this, see [[file:support/final-initialize.el][support/final-initialize.el]] file.
** Terminal Configuration
If you know me, I appreciate the light-weight nature of Eshell (see [[https://emacsconf.org/2022/talks/eshell/][this talk at EmacsConf 2022]]), but Eshell doesnt work that well with some of my remote work.
- [[file:ha-eshell.org][Eshell]] :: customization and enhancement to the Emacs shell.
- [[file:ha-remoting.org][Remote Access]] :: my interface to systems using SSH and Vterm.
** Programming Configuration
While Im a language polyglot, I usually focus on one or two languages at a time, and my configuration may acquire a /wee bit of cruft/. That said, Im attempting to convert over to LSP (with varying degrees of success).
- [[file:ha-programming.org][General Programming]] :: configuration for /all/ programming languages, or at least, the simple ones.
- [[file:ha-programming-elisp.org][Emacs Lisp]] :: additions to Emacs Lisp programming.
- [[file:ha-programming-python.org][Python]] :: configuration for working with Python and LSP.
- [[file:ha-programming-scheme.org][Scheme]] :: configuration for Guile and Racket.
- [[file:ha-programming-clojure.org][Clojure]] :: configuration for Clojure.
- [[file:ha-programming-ruby.org][Ruby]] :: configuration for Ruby.
** Miscellanea
- [[file:ha-aux-apps.org][Applications]] :: optional applications, like Twitter and Telegram.
- [[file:ha-email.org][Email]] :: reading email using =notmuch= in a *Hey* fashion.
- [[file:ha-feed-reader.org][RSS Reader]] :: configuration of =elfeed= as well as my RSS feeds.
- [[file:ha-irc.org][IRC]] :: connection to IRC servers using rcirc and bitlbee.
- [[file:ha-passwords.org][Passwords]] :: code for generating passwords.
** Summary
The [[file:elisp/][elisp]] directory contains non-literate code.
Other functions and files come from essays written on [[http://www.howardism.org][my blog]]. To help with this synchronization, I created a [[file:support/final-initialize.el][support/final-initialize.el]] file, but that shouldnt be too interesting to others.
You may ask yourself, Howard, why are you still using Github. The only reason is that Org files automatically get rendered as HTML with the code block correctly syntax highlighted. This may change. 🤓
#+DESCRIPTION: An index.html for describing my hamacs project
#+PROPERTY: header-args:sh :tangle no
#+PROPERTY: header-args:emacs-lisp :tangle no
#+PROPERTY: header-args :results none :eval no-export :comments no
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -307,6 +307,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -68,67 +68,5 @@ should work with association lists as well."
((plistp tree) (plist-get tree node))
(t (error "query-tree: Looking for '%s' in %s" node tree))))
(ert-deftest query-tree-walk-tree-test ()
;; PLIST:
(let ((data '(:a 1 :b 2 :c 3)))
(should (eq (query-tree--parse-node :b data) 2)))
;; ALIST:
(let ((data '((pine . cones) (oak . acorns) (maple . seeds))))
(should (eq (query-tree--parse-node 'oak data) 'acorns)))
;; LIST, aka a sequence
(let ((data '(a b c d e f)))
(should (eq (query-tree--parse-node 3 data) 'd)))
;; VECTOR:
(let ((data [a b c d e]))
(should (eq (query-tree--parse-node 2 data) 'c)))
;; HASH TABLE with strings:
(let ((h (make-hash-table :test 'equal)))
(puthash "a" 1 h)
(puthash "b" 2 h)
(puthash "c" 3 h)
(should (eq (query-tree--parse-node "b" h) 2))
(should (eq (query-tree--parse-node 'b h) 2)))
;; HASH TABLE with symbols:
(let ((h (make-hash-table)))
(puthash 'a 1 h)
(puthash 'b 2 h)
(puthash 'c 3 h)
(should (eq (query-tree--parse-node 'b h) 2))))
(ert-deftest query-tree-parse-tree-test ()
(should (null (query-tree-parse nil nil)))
(let ((data :final))
(should (eq (query-tree-parse nil data) :final)))
(let ((data [ a b c d e f ]))
(should (eq (query-tree-parse '(3) data) 'd)))
(let ((data (json-parse-string
"{ \"a\": 1,
\"b\": {
\"x\": 10,
\"y\": [100, 101, 102, 103],
\"z\": 30
},
\"c\": 3
}")))
(should (hash-table-p data))
(should (= (query-tree-parse '("a") data) 1))
(should (= (query-tree-parse '("b" "x") data) 10))
(should (= (query-tree-parse '("b" "y" 2) data) 102))
(should (= (query-tree-parse '(a) data) 1))
(should (= (query-tree-parse '(b x) data) 10))
(should (= (query-tree-parse '(b y 2) data) 102))))
(ert-deftest query-tree-test ()
(let ((data (json-parse-string
"{ \"a\": 1,
\"b\": {
\"x\": 10,
\"y\": [100, 101, 102, 103],
\"z\": 30
},
\"c\": 3
}")))
(should (= (query-tree data 'b 'y 2) 102))))
(provide 'query-tree)
;;; query-tree.el ends here

View file

@ -167,6 +167,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -194,6 +194,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -681,6 +681,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -2412,7 +2412,7 @@ Let's extend Magit with [[https://github.com/magit/forge][Magit Forge]] for work
#+end_src
Every /so often/, pop over to the following URLs and generate a new token where the *Note* is =forge=, and then copy that into the [[file:~/.authinfo.gpg][~/.authinfo.gpg]]:
- [[https://gitlab.com/-/profile/personal_access_tokens][Gitlab]]
- [[https://gitlab.com/-/user_settings/personal_access_tokens][Gitlab]]
- [[https://github.com/settings/tokens][Github]]
and make sure this works:
@ -2753,6 +2753,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -276,6 +276,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -288,6 +288,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -430,6 +430,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no :mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -747,6 +747,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -1748,6 +1748,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -254,6 +254,6 @@ Let's /provide/ a name so we can =require= the file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -147,6 +147,6 @@ This will =provide= a code name, so that we can =require= this.
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -262,6 +262,6 @@ Let's provide a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -198,6 +198,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -35,13 +35,20 @@ While the following packages come with Emacs, they aren't necessarily loaded:
#+end_src
Variable settings:
#+begin_src emacs-lisp
(setq org-export-with-broken-links t
(setq org-publish-project-alist nil ; filled in below
org-export-with-broken-links t
org-mode-websrc-directory "~/website"
org-mode-publishing-directory (concat (getenv "HOME") "/website-pub/"))
#+end_src
Since I have two specific websites, I create two variables for those destinations:
#+begin_src emacs-lisp
(setq ha-publishing-howardabrams (concat org-mode-publishing-directory "howardabrams")
ha-publishing-howardism (concat org-mode-publishing-directory "howardisms"))
#+end_src
** You Dont Know Jack
Im not afraid of HTML, however, I like the idea of doing my HTML work in a Lisp-like way using the [[https://github.com/tonyaldon/jack][jack-html project]]:
#+begin_src emacs-lisp
(use-package jack)
@ -61,72 +68,88 @@ I separate my /website/ into distinct projects separately built:
- =blog-static= :: All of the assets, like images are easily copied in place
- =blog-rss= :: Regenerate the feeder files
- =org-notes= :: Optionally render a non-web site collection of notes.
** The Website
Years of having two domain names can be confusing, but I have to keep them going now. So =howardabrams.com= is essentially a single static page (oh, and email).
#+begin_src emacs-lisp
(setq org-publish-project-alist
`(("all"
:components ("blog-content" "blog-static" "org-notes" "blog-rss"))
(add-to-list 'org-publish-project-alist
`("website"
:base-directory "~/dropbox/website-howardabrams"
:publishing-directory ,ha-publishing-howardabrams))
#+end_src
** The Blog
My main blog made up a huge collection of org files:
#+begin_src emacs-lisp
(add-to-list 'org-publish-project-alist
`("blog-content"
:base-directory ,org-mode-websrc-directory
:base-extension "org"
:publishing-directory ,org-mode-publishing-directory
:recursive t
:publishing-function org-html-publish-to-html
:preparation-function org-mode-blog-prepare
:export-with-tags nil
:headline-levels 4
:auto-preamble t
:auto-postamble nil
:auto-sitemap t
:sitemap-title "Howardisms"
:section-numbers nil
:table-of-contents nil
:with-toc nil
:with-author nil
:with-creator nil
:with-tags nil
:with-smart-quotes t
("blog-content"
:base-directory ,org-mode-websrc-directory
:base-extension "org"
:publishing-directory ,org-mode-publishing-directory
:recursive t
:publishing-function org-html-publish-to-html
:preparation-function org-mode-blog-prepare
:export-with-tags nil
:headline-levels 4
:auto-preamble t
:auto-postamble nil
:auto-sitemap t
:sitemap-title "Howardisms"
:section-numbers nil
:table-of-contents nil
:with-toc nil
:with-author nil
:with-creator nil
:with-tags nil
:with-smart-quotes t
:html-doctype "html5"
:html-html5-fancy t
;; :html-preamble org-mode-blog-preamble
;; :html-postamble org-mode-blog-postamble
;; :html-postamble "<hr><div id='comments'></div>"
:html-head
,(jack-html
'(:meta (@ :http-equiv "X-Clacks-Overhead"
:content "GNU Terry Pratchett")
(:link (@ :rel "stylesheet"
:html-doctype "html5"
:html-html5-fancy t
;; :html-preamble org-mode-blog-preamble
;; :html-postamble org-mode-blog-postamble
;; :html-postamble "<hr><div id='comments'></div>"
:html-head
,(jack-html
'((:meta (@ :http-equiv "X-Clacks-Overhead"
:content "GNU Terry Pratchett"))
(:link (@ :rel "stylesheet"
:type "text/css"
:href "http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&subset=latin,latin-ext"))
(:link (@ :rel "stylesheet"
(:link (@ :rel "stylesheet"
:type "text/css"
:href "http://fonts.googleapis.com/css?family=Source+Serif+Pro:400,700&subset=latin,latin-ext"))
(:link (@ :rel "stylesheet"
(:link (@ :rel "stylesheet"
:type "text/css"
:href "http://fonts.googleapis.com/css?family=Source+Code+Pro:400,700"))
(:link (@ :rel "stylesheet"
(:link (@ :rel "stylesheet"
:type "text/css"
:href "/css/styles.css"))
(:script (@ :src "/js/magic.js"
(:script (@ :type "text/javascript"
:src "https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"))
(:script (@ :src "/js/magic.js"
:type "text/javascript"))
(:link (@ :rel "icon"
(:link (@ :rel "icon"
:href "/img/dragon.svg"))
(:link (@ :rel "shortcut icon"
(:link (@ :rel "shortcut icon"
:href "/img/dragon-head.svg"))
(:meta (@ :name "viewport"
(:meta (@ :name "viewport"
:content "width=device-width, initial-scale=1"))))
:html-head-include-default-style nil)
:html-head-include-default-style nil))
#+end_src
("blog-static"
:base-directory ,org-mode-websrc-directory
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|svg"
:publishing-directory ,org-mode-publishing-directory
:recursive t
:publishing-function org-publish-attachment)
Why not break out the images and other static files into a separate project:
#+begin_src emacs-lisp
(add-to-list 'org-publish-project-alist
`("blog-static"
:base-directory ,org-mode-websrc-directory
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|svg"
:publishing-directory ,org-mode-publishing-directory
:recursive t
:publishing-function org-publish-attachment))
#+end_src
("blog-rss"
The RSS generation seems to be something I do /later/ once I have my site working:
#+begin_src emacs-lisp
(add-to-list 'org-publish-project-alist
`("blog-rss"
:base-directory ,org-mode-websrc-directory
:base-extension "org"
:rss-image-url "https://howardism.org/img/dragon-head.png"
@ -136,12 +159,22 @@ I separate my /website/ into distinct projects separately built:
:html-link-use-abs-url t
:with-toc nil
:exclude ".*"
:include ("index.org"))
:include ("index.org")))
#+end_src
("org-notes"
And lets make some blends of the individual projects:
#+begin_src emacs-lisp
(add-to-list 'org-publish-project-alist
`("blog" :components ("blog-content" "blog-static" "blog-rss")))
#+end_src
** Technical Notes
I take notes on a variety of technical subjects, and since I can share these notes with others, I feel like I can publish those:
#+begin_src emacs-lisp
(add-to-list 'org-publish-project-alist
`("tech-notes"
:base-directory "~/technical/"
:base-extension "org"
:publishing-directory ,(concat org-mode-publishing-directory "/notes/")
:publishing-directory ,(concat org-mode-publishing-directory "notes/")
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
@ -165,14 +198,41 @@ I separate my /website/ into distinct projects separately built:
:table-of-contents nil
:with-author nil
:with-creator nil
:with-tags nil)
:with-tags nil))
#+end_src
("org-notes-static"
As above, we can separate the publishing of the images and other static files:
#+begin_src emacs-lisp
(add-to-list 'org-publish-project-alist
`("tech-notes-static"
:base-directory "~/technical/"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory ,(concat org-mode-publishing-directory "/other/")
:recursive t
:publishing-function org-publish-attachment)))
:publishing-function org-publish-attachment))
#+end_src
** Literate Emacs Configuration
Ive been committing my literate-style Emacs configuration for a few years now, and Ive assumed that Github would be sufficient for rendering it. However, I feel that I could publish this to my own web site.
#+begin_src emacs-lisp
(add-to-list 'org-publish-project-alist
`("hamacs"
:base-directory "~/other/hamacs"
:base-extension "org"
:publishing-directory ,(concat org-mode-publishing-directory "hamacs/")
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t
:auto-sitemap nil
:makeindex nil
:section-numbers nil
:style ,(jack-html
'(:link (@ :rel "stylesheet" :type "text/css"
:href "../css/styles.css")))
:table-of-contents nil
:with-author nil
:with-creator nil
:with-tags nil))
#+end_src
* Including Sections
In the project definitions, I reference a =pre-= and =postamble= that allow me to inject some standard HTML file headers and footers:
@ -203,14 +263,40 @@ Another helper function for the content of website is to make sure to update =in
(save-buffer 0))
(kill-buffer buffer)))
#+end_src
* Uploading
Using =rsync= to keep published files in sync with my website:
#+begin_src emacs-lisp
(defun ha-sync-site (project)
"Sync PROJECT (an org publish project) with my website."
(interactive (list (completing-read "Publish project: "
org-publish-project-alist)))
(let* ((host "gremlin.howardabrams.com")
(conf (thread-last org-publish-project-alist
(seq-filter (lambda (lst) (string-equal (car lst) project)))
(car)
(cdr)))
(src (plist-get conf :publishing-directory))
(dest (cond
((equal project "blog-content") "howardism")
((equal project "blog-static") "howardism")
((equal project "blog-rss") "howardism")
((equal project "org-notes") "howardabrams/technical")
((equal project "org-notes-static") "howardabrams/technical")
((equal project "hamacs") "howardabrams/hamacs"))))
(message "rsync -az %s %s:%s" src host dest)))
#+end_src
* Keybindings
Make it easy to publish all or just some of my website:
#+begin_src emacs-lisp
(with-eval-after-load 'ha-org
(ha-leader :keymaps 'org-mode-map
;; "p" '(:ignore t :which-key "publishing")
"o p" '(:ignore t :which-key "publish")
"o p a" '("all" . org-publish-all)
"o p p" '("project" . org-publish-project)))
"o p p" '("project" . org-publish-project)
"o p h" '("hamacs" . (lambda () (interactive)
(org-publish-project "hamacs")
(sit-for 30)
(ha-sync-site "hamacs")))))
#+end_src
And let's put a /leader key/ sequence for my favorite file on my website:
@ -236,6 +322,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -451,6 +451,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -441,6 +441,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -1128,6 +1128,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes :noweb yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -128,6 +128,6 @@ This will =provide= a code name, so that we can =require= this.
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -282,6 +282,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -350,6 +350,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -89,6 +89,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -102,6 +102,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -317,6 +317,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -319,6 +319,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -117,6 +117,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -185,6 +185,6 @@ Let's =provide= a name so we can =require= this file:
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -1311,6 +1311,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -542,6 +542,6 @@ Before you can build this on a new system, make sure that you put the cursor ove
#+PROPERTY: header-args:emacs-lisp :tangle yes
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

View file

@ -22,7 +22,7 @@ Anything that doesn't fit the above goes here.
#+DESCRIPTION: Notes taken during Sprint #`(sprint-number)`
#+PROPERTY: header-args: :results drawer :tangle no :eval no-export :comments org
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil skip:nil author:nil email:nil creator:nil timestamp:nil ^:nil
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil skip:nil author:nil email:nil creator:nil timestamp:nil ^:nil
# Local Variables:
# eval: (org-content 2)