Christopher James Hayward
4 years ago
4 changed files with 273 additions and 190 deletions
-
242README.org
-
46init.el
-
82modules/capture.org
-
83modules/website.org
@ -0,0 +1,82 @@ |
|||
#+TITLE: Capture |
|||
#+AUTHOR: Christopher James Hayward |
|||
#+EMAIL: chris@chrishayward.xyz |
|||
|
|||
#+PROPERTY: header-args:emacs-lisp :comments org |
|||
#+PROPERTY: header-args :results silent :eval no-export |
|||
|
|||
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil |
|||
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil |
|||
|
|||
Capturing images, screencasts, screenshots or live-streaming. It's defined in this file. |
|||
|
|||
* Slides |
|||
|
|||
Produce high quality presentations that work anywhere with =HTML/JS= and the *Reveal.js*[fn:1] package. Achieve this behaviour in Emacs with *Ox-reveal*[fn:2]], configured to use a =cdn= allows us to produce ones that are not dependent on a local version. An important caveat here is that paths to images must be absolute URLs. |
|||
|
|||
#+begin_src emacs-lisp |
|||
(use-package ox-reveal |
|||
:after ox |
|||
:custom (org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js")) |
|||
#+end_src |
|||
|
|||
Create a capture template for creating slides quickly, with our desired configuration. |
|||
|
|||
#+begin_src emacs-lisp |
|||
(with-eval-after-load 'org-roam |
|||
(add-to-list 'org-roam-capture-templates |
|||
'("s" "Slides" plain (function org-roam-capture--get-point) |
|||
"%?" |
|||
:file-name "docs/slides/${slug}" |
|||
:unnarrowed t |
|||
:head |
|||
" |
|||
,#+TITLE: ${title} |
|||
,#+AUTHOR: Christopher James Hayward |
|||
,#+EMAIL: chris@chrishayward.xyz |
|||
|
|||
,#+REVEAL_ROOT: https://cdn.jsdelivr.net/npm/reveal.js |
|||
,#+REVEAL_THEME: serif |
|||
|
|||
,#+EXPORT_FILE_NAME: ${slug} |
|||
|
|||
,#+OPTIONS: reveal_title_slide:nil |
|||
,#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil |
|||
,#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil |
|||
"))) |
|||
#+end_src |
|||
|
|||
* Screencasts |
|||
|
|||
Create screencasts with =one-frame-per-action= GIF recording via *Emacs gif screencast*[fn:3]. |
|||
|
|||
+ Pause / Resume |
|||
+ High Quality |
|||
+ Optimized |
|||
|
|||
It requires the installation of ~scrot~, ~gifsicle~, and ~convert~ from the =ImageMagick= library. |
|||
|
|||
#+begin_src emacs-lisp |
|||
(use-package gif-screencast |
|||
:commands (gif-screencast-start-or-stop gif-screencast-toggle-pause) |
|||
:custom (gif-screencast-output-directory (concat dotfiles/home "docs/images/"))) |
|||
#+end_src |
|||
|
|||
Place keybindings behind =SPC s=. |
|||
+ Screenshot with =s= |
|||
+ Screencast with =c= |
|||
|
|||
#+begin_src emacs-lisp |
|||
(dotfiles/leader |
|||
"s" '(:ignore t :which-key "Screen") |
|||
"ss" '(screenshot :which-key "Screenshot") |
|||
"sc" '(gif-screencast-start-or-stop :which-key "Screencast")) |
|||
#+end_src |
|||
|
|||
* TODO Screenshots |
|||
|
|||
* Resources |
|||
|
|||
[fn:1] https://revealjs.com |
|||
[fn:2] https://github.com/hexmode/ox-reveal |
|||
[fn:3] https://github.com/takaxp/emacs-gif-screencast |
@ -0,0 +1,83 @@ |
|||
#+TITLE: Website |
|||
#+AUTHOR: Christopher James Hayward |
|||
#+EMAIL: chris@chrishayward.xyz |
|||
|
|||
#+PROPERTY: header-args:emacs-lisp :tangle website.el :comments org |
|||
#+PROPERTY: header-args :results silent :eval no-export :comments org |
|||
|
|||
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil |
|||
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil |
|||
|
|||
I use *Hugo*[fn:1] for my *website*[fn:2] which I write in *Org*[fn:3] before compiling to *Hugo markdown*[fn:4]. |
|||
|
|||
* Setup |
|||
|
|||
Download *Ox-hugo*[fn:5] and configure it for =one-post-for-file= to add support for exporting to *Hugo markdown*[fn:4]. |
|||
|
|||
#+begin_src emacs-lisp |
|||
(use-package ox-hugo |
|||
:after ox) |
|||
#+end_src |
|||
|
|||
* Posts |
|||
|
|||
Add a capture template for creating new blog posts. |
|||
|
|||
#+begin_src emacs-lisp |
|||
(with-eval-after-load 'org-roam |
|||
(add-to-list 'org-roam-capture-templates |
|||
'("p" "Post" plain (function org-roam-capture--get-point) |
|||
"%?" |
|||
:file-name "docs/posts/${slug}" |
|||
:unnarrowed t |
|||
:head |
|||
" |
|||
,#+TITLE: ${title} |
|||
,#+AUTHOR: Christopher James Hayward |
|||
,#+DATE: %<%Y-%m-%d> |
|||
|
|||
,#+OPTIONS: num:nil todo:nil tasks:nil |
|||
|
|||
,#+EXPORT_FILE_NAME: ${slug} |
|||
,#+ROAM_KEY: https://chrishayward.xyz/posts/${slug}/ |
|||
|
|||
,#+HUGO_BASE_DIR: ../ |
|||
,#+HUGO_AUTO_SET_LASTMOD: t |
|||
,#+HUGO_SECTION: posts |
|||
,#+HUGO_DRAFT: true |
|||
"))) |
|||
#+end_src |
|||
|
|||
* Notes |
|||
|
|||
Add a capture template for creating blog posts and notes on other peoples content / published works. |
|||
|
|||
#+begin_src emacs-lisp |
|||
(with-eval-after-load 'org-roam |
|||
(add-to-list 'org-roam-capture-templates |
|||
'("n" "Notes" plain (function org-roam-capture--get-point) |
|||
"%?" |
|||
:file-name "docs/notes/${slug}" |
|||
:unnarrowed t |
|||
:head |
|||
" |
|||
,#+TITLE: ${title} |
|||
,#+AUTHOR: Christopher James Hayward |
|||
|
|||
,#+OPTIONS: num:nil todo:nil tasks:nil |
|||
,#+EXPORT_FILE_NAME: ${slug} |
|||
,#+ROAM_KEY: https://chrishayward.xyz/notes/${slug}/ |
|||
|
|||
,#+HUGO_BASE_DIR: ../ |
|||
,#+HUGO_AUTO_SET_LASTMOD: t |
|||
,#+HUGO_SECTION: notes |
|||
,#+HUGO_DRAFT: true |
|||
"))) |
|||
#+end_src |
|||
|
|||
* Resources |
|||
|
|||
[fn:1] https://gohugo.io |
|||
[fn:2] https://chrishayward.xyz |
|||
[fn:3] https://markdownguide.org/tools/hugo |
|||
[fn:4] https://github.com/kaushalmodi/ox-hugo |
Write
Preview
Loading…
Cancel
Save
Reference in new issue