From 944ebc84d6b6640f4cf0682a7675709936af0e82 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Mon, 21 Aug 2023 08:50:23 -0400 Subject: add one --- 2023/info/adventure-nav.md | 2 +- 2023/info/extending-nav.md | 4 +- 2023/info/llm-nav.md | 2 +- 2023/info/lspocaml-after.md | 2 +- 2023/info/one-after.md | 7 ++++ 2023/info/one-before.md | 4 ++ 2023/info/one-nav.md | 6 +++ 2023/info/ref-after.md | 2 +- 2023/info/uni-nav.md | 4 +- 2023/talk-details.md | 5 ++- 2023/talks/one.md | 98 +++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 126 insertions(+), 10 deletions(-) create mode 100644 2023/info/one-after.md create mode 100644 2023/info/one-before.md create mode 100644 2023/info/one-nav.md create mode 100644 2023/talks/one.md (limited to '2023') diff --git a/2023/info/adventure-nav.md b/2023/info/adventure-nav.md index d06353cb..ba12ed56 100644 --- a/2023/info/adventure-nav.md +++ b/2023/info/adventure-nav.md @@ -1,5 +1,5 @@
Back to the [[talks]] -Previous by track: Authoring and presenting university courses with Emacs and a full libre software stack +Previous by track: one.el: the static site generator for Emacs Lisp Programmers
diff --git a/2023/info/extending-nav.md b/2023/info/extending-nav.md index dc6018fd..f49681ca 100644 --- a/2023/info/extending-nav.md +++ b/2023/info/extending-nav.md @@ -1,7 +1,7 @@
Back to the [[talks]] -Previous by track: Writing a Language Server In OCaml for Emacs, fun, and profit -Next by track: Org-Mode Workflow: Informal Reference Tracking +Previous by track: Writing a language server in OCaml for Emacs, fun, and profit +Next by track: Org-Mode workflow: informal reference tracking Track: dev
diff --git a/2023/info/llm-nav.md b/2023/info/llm-nav.md index 5a38789f..ca5cfbd7 100644 --- a/2023/info/llm-nav.md +++ b/2023/info/llm-nav.md @@ -2,5 +2,5 @@
Back to the [[talks]] Previous by track: The many ways to browse Hacker News from Emacs -Next by track: Writing a Language Server In OCaml for Emacs, fun, and profit +Next by track: Writing a language server in OCaml for Emacs, fun, and profit
diff --git a/2023/info/lspocaml-after.md b/2023/info/lspocaml-after.md index bf12ce15..409fc04c 100644 --- a/2023/info/lspocaml-after.md +++ b/2023/info/lspocaml-after.md @@ -1,7 +1,7 @@ -Questions or comments? Please e-mail [austin@cutedogs.org](mailto:austin@cutedogs.org?subject=Comment%20for%20EmacsConf%202022%20lspocaml%3A%20Writing%20a%20Language%20Server%20In%20OCaml%20for%20Emacs%2C%20fun%2C%20and%20profit) +Questions or comments? Please e-mail [austin@cutedogs.org](mailto:austin@cutedogs.org?subject=Comment%20for%20EmacsConf%202022%20lspocaml%3A%20Writing%20a%20language%20server%20in%20OCaml%20for%20Emacs%2C%20fun%2C%20and%20profit) diff --git a/2023/info/one-after.md b/2023/info/one-after.md new file mode 100644 index 00000000..9832af36 --- /dev/null +++ b/2023/info/one-after.md @@ -0,0 +1,7 @@ + + + +Questions or comments? Please e-mail [tony@tonyaldon.com](mailto:tony@tonyaldon.com?subject=Comment%20for%20EmacsConf%202022%20one%3A%20one.el%3A%20the%20static%20site%20generator%20for%20Emacs%20Lisp%20Programmers) + + + diff --git a/2023/info/one-before.md b/2023/info/one-before.md new file mode 100644 index 00000000..af9cef3a --- /dev/null +++ b/2023/info/one-before.md @@ -0,0 +1,4 @@ + + +# Description + \ No newline at end of file diff --git a/2023/info/one-nav.md b/2023/info/one-nav.md new file mode 100644 index 00000000..23647338 --- /dev/null +++ b/2023/info/one-nav.md @@ -0,0 +1,6 @@ + +
+Back to the [[talks]] +Previous by track: Authoring and presenting university courses with Emacs and a full libre software stack +Next by track: An Org-Mode based text adventure game for learning the basics of Emacs, inside Emacs, written in Emacs Lisp +
diff --git a/2023/info/ref-after.md b/2023/info/ref-after.md index b8c88d90..9a823b5f 100644 --- a/2023/info/ref-after.md +++ b/2023/info/ref-after.md @@ -1,7 +1,7 @@ -Questions or comments? Please e-mail [christopher@librehacker.com](mailto:christopher@librehacker.com?subject=Comment%20for%20EmacsConf%202022%20ref%3A%20Org-Mode%20Workflow%3A%20Informal%20Reference%20Tracking) +Questions or comments? Please e-mail [christopher@librehacker.com](mailto:christopher@librehacker.com?subject=Comment%20for%20EmacsConf%202022%20ref%3A%20Org-Mode%20workflow%3A%20informal%20reference%20tracking) diff --git a/2023/info/uni-nav.md b/2023/info/uni-nav.md index 7c3f86b4..cca3da43 100644 --- a/2023/info/uni-nav.md +++ b/2023/info/uni-nav.md @@ -1,6 +1,6 @@
Back to the [[talks]] -Previous by track: Org-Mode Workflow: Informal Reference Tracking -Next by track: An Org-Mode based text adventure game for learning the basics of Emacs, inside Emacs, written in Emacs Lisp +Previous by track: Org-Mode workflow: informal reference tracking +Next by track: one.el: the static site generator for Emacs Lisp Programmers
diff --git a/2023/talk-details.md b/2023/talk-details.md index 7bdd0d24..154a5c87 100644 --- a/2023/talk-details.md +++ b/2023/talk-details.md @@ -1,8 +1,9 @@ + - + - +
DurationTitleSpeakers
10An Org-Mode based text adventure game for learning the basics of Emacs, inside Emacs, written in Emacs LispChung-hong Chan
20one.el: the static site generator for Emacs Lisp ProgrammersTony Aldon
20Authoring and presenting university courses with Emacs and a full libre software stackJames Howell
20Org-Mode Workflow: Informal Reference TrackingChristopher Howard
20Org-Mode workflow: informal reference trackingChristopher Howard
20GNU Emacs for electronics, note-taking, and as lightweight IDEAnand Tamariya
10A modern Emacs look-and-feel without painPedro A. Aranda
10Writing a Language Server In OCaml for Emacs, fun, and profitAustin Theriault
10Writing a language server in OCaml for Emacs, fun, and profitAustin Theriault
20LLM clients in Emacs, functionality and standardizationAndrew Hyatt
10The many ways to browse Hacker News from EmacsMickael Kerjean
\ No newline at end of file diff --git a/2023/talks/one.md b/2023/talks/one.md new file mode 100644 index 00000000..1198292b --- /dev/null +++ b/2023/talks/one.md @@ -0,0 +1,98 @@ +[[!meta title="one.el: the static site generator for Emacs Lisp Programmers"]] +[[!meta copyright="Copyright © 2023 Tony Aldon"]] +[[!inline pages="internal(2023/info/one-nav)" raw="yes"]] + + + + + +# one.el: the static site generator for Emacs Lisp Programmers +Tony Aldon - + +[[!inline pages="internal(2023/info/one-before)" raw="yes"]] + +Have you ever wanted to write a blog: + +- contained in a unique org file, +- rendered with only one Emacs command, +- that can be modified by writing Emacs Lisp code (and CSS too), +- with "html templates" that are plain Emacs Lisp data, +- with no config file, +- and no dependencies on external static site generators? + +If so, you might be interested in one.el package. + +In this talk, we'll look at how to get started with one.el and write a +a simple blog as an example. + +What kind of static sites can be produced with one.el? I don't know +but you can get an idea by checking those 3 websites built with +one.el: + +- +- +- + +Below you can see the basics of a one.el website. + +In one.el, the following org file/buffer defines a website with 2 +pages that we build by calling \`one-build\` command while we are visiting +it: + + *** My website + :PROPERTIES: + :ONE: one-default-home + :CUSTOM_ID: / + :END: + + Welcome to my website! + + *** Blog post 1 + :PROPERTIES: + :ONE: one-default + :CUSTOM_ID: /blog/page-1/ + :END: + + My first blog post! + + The path ~/~ in the first ~CUSTOM_ID~ org property tells ~one.el~ that the + page "My website" is the home page. That page is rendered using + ~one-default-home~ render function, value of ~ONE~ org property of the + same headline. + + The path ~/blog/page-1/~ in the second ~CUSTOM_ID~ org property tells + ~one.el~ that we want to render "Blog post 1" page in such a way + that when we serve our website locally at ~http://localhost:3000~ for + instance, that page is served at ~http://localhost:3000/blog/page-1/~. + How that page is rendered is determined by the value of ~ONE~ org + property of the same headline which is ~one-default~, a render + function. + + As you might have noticed, a ~one.el~ website is an org file where the + pages are the headlines of level 1 with the org properties ~ONE~ and + ~CUSTOM_ID~ set. Nothing more! + + ~ONE~ is the only org property added by ~one.el~. Its value (an Elisp + function which returns an HTML string) for a given page determines how + ~one.el~ renders that page. + + The paths of pages are set using ~CUSTOM_ID~ org property. + + That's it! + + note: I wanted to have a blog written in org-mode that I can modify + only by evaluating some Emacs Lisp code. This is how one.el got + started. Down that path I found that the Org parser and exporter do an + amazing job, in fact 95 percent of the heavy work in one.el. I just + had to find a way to pass org data to render functions and write an + Emacs Lisp html generator package to be used by those render + functions. I'm having a good user experience so far and I hope its + design will fit your workflow. + + + +[[!inline pages="internal(2023/info/one-after)" raw="yes"]] + +[[!inline pages="internal(2023/info/one-nav)" raw="yes"]] + + -- cgit v1.2.3