diff options
-rw-r--r-- | 2023/info/adventure-nav.md | 2 | ||||
-rw-r--r-- | 2023/info/extending-nav.md | 4 | ||||
-rw-r--r-- | 2023/info/llm-nav.md | 2 | ||||
-rw-r--r-- | 2023/info/lspocaml-after.md | 2 | ||||
-rw-r--r-- | 2023/info/one-after.md | 7 | ||||
-rw-r--r-- | 2023/info/one-before.md | 4 | ||||
-rw-r--r-- | 2023/info/one-nav.md | 6 | ||||
-rw-r--r-- | 2023/info/ref-after.md | 2 | ||||
-rw-r--r-- | 2023/info/uni-nav.md | 4 | ||||
-rw-r--r-- | 2023/talk-details.md | 5 | ||||
-rw-r--r-- | 2023/talks/one.md | 98 |
11 files changed, 126 insertions, 10 deletions
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 @@ <div class="talk-nav"> Back to the [[talks]] -Previous by track: <a href="/2023/talks/uni">Authoring and presenting university courses with Emacs and a full libre software stack</a> +Previous by track: <a href="/2023/talks/one">one.el: the static site generator for Emacs Lisp Programmers</a> </div> 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 @@ <div class="talk-nav"> Back to the [[talks]] -Previous by track: <a href="/2023/talks/lspocaml">Writing a Language Server In OCaml for Emacs, fun, and profit</a> -Next by track: <a href="/2023/talks/ref">Org-Mode Workflow: Informal Reference Tracking</a> +Previous by track: <a href="/2023/talks/lspocaml">Writing a language server in OCaml for Emacs, fun, and profit</a> +Next by track: <a href="/2023/talks/ref">Org-Mode workflow: informal reference tracking</a> Track: <span class="sched-track dev">dev</span> </div> 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 @@ <div class="talk-nav"> Back to the [[talks]] Previous by track: <a href="/2023/talks/hn">The many ways to browse Hacker News from Emacs</a> -Next by track: <a href="/2023/talks/lspocaml">Writing a Language Server In OCaml for Emacs, fun, and profit</a> +Next by track: <a href="/2023/talks/lspocaml">Writing a language server in OCaml for Emacs, fun, and profit</a> </div> 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 @@ <!-- Automatically generated by emacsconf-publish-after-page --> -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) <!-- End of emacsconf-publish-after-page --> 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 @@ +<!-- Automatically generated by emacsconf-publish-after-page --> + + +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) + + +<!-- End of emacsconf-publish-after-page --> 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 @@ +<!-- Automatically generated by emacsconf-publish-before-page --> + +# Description +<!-- End of emacsconf-publish-before-page -->
\ 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 @@ + +<div class="talk-nav"> +Back to the [[talks]] +Previous by track: <a href="/2023/talks/uni">Authoring and presenting university courses with Emacs and a full libre software stack</a> +Next by track: <a href="/2023/talks/adventure">An Org-Mode based text adventure game for learning the basics of Emacs, inside Emacs, written in Emacs Lisp</a> +</div> 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 @@ <!-- Automatically generated by emacsconf-publish-after-page --> -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) <!-- End of emacsconf-publish-after-page --> 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 @@ <div class="talk-nav"> Back to the [[talks]] -Previous by track: <a href="/2023/talks/ref">Org-Mode Workflow: Informal Reference Tracking</a> -Next by track: <a href="/2023/talks/adventure">An Org-Mode based text adventure game for learning the basics of Emacs, inside Emacs, written in Emacs Lisp</a> +Previous by track: <a href="/2023/talks/ref">Org-Mode workflow: informal reference tracking</a> +Next by track: <a href="/2023/talks/one">one.el: the static site generator for Emacs Lisp Programmers</a> </div> 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 @@ <table><thead><th>Duration</th><th>Title</th><th>Speakers</th></thead><tbody><tr><td>10</td><td><a href="/2023/talks/adventure">An Org-Mode based text adventure game for learning the basics of Emacs, inside Emacs, written in Emacs Lisp</a></td><td>Chung-hong Chan</td><tr> +<tr><td>20</td><td><a href="/2023/talks/one">one.el: the static site generator for Emacs Lisp Programmers</a></td><td>Tony Aldon</td><tr> <tr><td>20</td><td><a href="/2023/talks/uni">Authoring and presenting university courses with Emacs and a full libre software stack</a></td><td>James Howell</td><tr> -<tr><td>20</td><td><a href="/2023/talks/ref">Org-Mode Workflow: Informal Reference Tracking</a></td><td>Christopher Howard</td><tr> +<tr><td>20</td><td><a href="/2023/talks/ref">Org-Mode workflow: informal reference tracking</a></td><td>Christopher Howard</td><tr> <tr><td>20</td><td><a href="/2023/talks/extending">GNU Emacs for electronics, note-taking, and as lightweight IDE</a></td><td>Anand Tamariya</td><tr> <tr><td>10</td><td><a href="/2023/talks/flat">A modern Emacs look-and-feel without pain</a></td><td>Pedro A. Aranda</td><tr> -<tr><td>10</td><td><a href="/2023/talks/lspocaml">Writing a Language Server In OCaml for Emacs, fun, and profit</a></td><td>Austin Theriault</td><tr> +<tr><td>10</td><td><a href="/2023/talks/lspocaml">Writing a language server in OCaml for Emacs, fun, and profit</a></td><td>Austin Theriault</td><tr> <tr><td>20</td><td><a href="/2023/talks/llm">LLM clients in Emacs, functionality and standardization</a></td><td>Andrew Hyatt</td><tr> <tr><td>10</td><td><a href="/2023/talks/hn">The many ways to browse Hacker News from Emacs</a></td><td>Mickael Kerjean</td><tr></tbody></table>
\ 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"]] + +<!-- Initially generated with emacsconf-publish-talk-page and then left alone for manual editing --> +<!-- You can manually edit this file to update the abstract, add links, etc. ---> + + +# one.el: the static site generator for Emacs Lisp Programmers +Tony Aldon - <mailto:tony@tonyaldon.com> + +[[!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: + +- <https://lnroom.live> +- <https://tonyaldon.com> +- <https://posts.tonyaldon.com> + +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"]] + + |