Adds dates, fixes orders of posts
This commit is contained in:
9
assets/wfot.css
Normal file
9
assets/wfot.css
Normal file
@@ -0,0 +1,9 @@
|
||||
.post-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.post-date {
|
||||
display: block;
|
||||
margin-right: 16px;
|
||||
min-width: 100px;
|
||||
}
|
||||
362
one.org
362
one.org
@@ -6,55 +6,6 @@
|
||||
|
||||
Here's what I'm thinking...
|
||||
|
||||
* HTTPS @ Homelab
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:CUSTOM_ID: /large-companies/
|
||||
:END:
|
||||
I run a lot of services at home.
|
||||
|
||||
This includes, but isn't limited to
|
||||
|
||||
- [[https://archivebox.io/][ArchiveBox]]
|
||||
- [[https://github.com/dani-garcia/vaultwarden][VaultWarden]]
|
||||
- [[https://github.com/navidrome/navidrome][Navidrome]]
|
||||
- [[https://plex.tv][Plex]]
|
||||
- [[https://github.com/LibrePhotos/librephotos][LibrePhotos]]
|
||||
- This blog
|
||||
|
||||
and a lot more.
|
||||
|
||||
Pretty much anything that's served up over HTTP is always nice if not
|
||||
necessary to have behind TLS.
|
||||
|
||||
[[https://letsencrypt.org/][LetsEncrypt]] long ago brought free certs to
|
||||
the masses and there are a lot of tools for automating that nowadays.
|
||||
|
||||
My preferred approach for getting all the unnecessary nonsense I
|
||||
self-host at home behind TLS is [[https://caddyserver.com][Caddy]].
|
||||
|
||||
I have a super straight forward setup, generally:
|
||||
|
||||
- Run Caddy in a docker container
|
||||
- Create a wildcard CNAME record in my DNS pointing at my home's
|
||||
(effectively) static IP
|
||||
- Add an entry in my Caddyfile for each services I'm running at home on
|
||||
its own subdomain
|
||||
- If it's a service then I add it with a =reverse_proxy= block
|
||||
- If it's a static site (like this) then there's a block for
|
||||
- If it's something I want only accessible on my home network then I put
|
||||
a block like
|
||||
|
||||
#+BEGIN_EXAMPLE
|
||||
@local_network {
|
||||
path *
|
||||
remote_ip
|
||||
}
|
||||
#+END_EXAMPLE
|
||||
|
||||
in the directive. And voila.
|
||||
|
||||
Then tell Caddy to reload the config and I'm done.
|
||||
* Multi-room audio setup
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
@@ -101,44 +52,60 @@ I'd like to get the podcast experience to a more seamless place but it's
|
||||
pretty OK right now using AirMusic on my phone to play audio to the
|
||||
speakers over AirPlay.
|
||||
|
||||
* vi-editing everywhere
|
||||
* HTTPS @ Homelab
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:CUSTOM_ID: /vi-everywhere/
|
||||
:DATE: 2022-11-08
|
||||
:CUSTOM_ID: /large-companies/
|
||||
:END:
|
||||
I run a lot of services at home.
|
||||
|
||||
For my sake, I prefer to have Vim bindings in as many places as
|
||||
possible.
|
||||
This includes, but isn't limited to
|
||||
|
||||
Most shells can be configured to use Vim bindings by putting =set -o vi=
|
||||
somewhere in your shell startup script.
|
||||
- [[https://archivebox.io/][ArchiveBox]]
|
||||
- [[https://github.com/dani-garcia/vaultwarden][VaultWarden]]
|
||||
- [[https://github.com/navidrome/navidrome][Navidrome]]
|
||||
- [[https://plex.tv][Plex]]
|
||||
- [[https://github.com/LibrePhotos/librephotos][LibrePhotos]]
|
||||
- This blog
|
||||
|
||||
If you're using ZSH then you'll probably want an additional binding to
|
||||
restore CTRL-R reverse history search.
|
||||
and a lot more.
|
||||
|
||||
=bindkey '^R' history-incremental-search-backward=
|
||||
Pretty much anything that's served up over HTTP is always nice if not
|
||||
necessary to have behind TLS.
|
||||
|
||||
For CLI tools that use the =readline= library then you can configure its
|
||||
input mode using a =.inputrc= file in your =$HOME= directory.
|
||||
[[https://letsencrypt.org/][LetsEncrypt]] long ago brought free certs to
|
||||
the masses and there are a lot of tools for automating that nowadays.
|
||||
|
||||
This affects REPLs like =ghci= and tools like =psql=.
|
||||
My preferred approach for getting all the unnecessary nonsense I
|
||||
self-host at home behind TLS is [[https://caddyserver.com][Caddy]].
|
||||
|
||||
#+begin_src txt
|
||||
set editing-mode vi
|
||||
$if mode=vi
|
||||
I have a super straight forward setup, generally:
|
||||
|
||||
set keymap vi-command
|
||||
# these are for vi-command mode
|
||||
Control-l: clear-screen
|
||||
- Run Caddy in a docker container
|
||||
- Create a wildcard CNAME record in my DNS pointing at my home's
|
||||
(effectively) static IP
|
||||
- Add an entry in my Caddyfile for each services I'm running at home on
|
||||
its own subdomain
|
||||
- If it's a service then I add it with a =reverse_proxy= block
|
||||
- If it's a static site (like this) then there's a block for
|
||||
- If it's something I want only accessible on my home network then I put
|
||||
a block like
|
||||
|
||||
set keymap vi-insert
|
||||
# these are for vi-insert mode
|
||||
Control-l: clear-screen
|
||||
$endif
|
||||
#+end_src
|
||||
#+BEGIN_EXAMPLE
|
||||
@local_network {
|
||||
path *
|
||||
remote_ip
|
||||
}
|
||||
#+END_EXAMPLE
|
||||
|
||||
in the directive. And voila.
|
||||
|
||||
Then tell Caddy to reload the config and I'm done.
|
||||
* AWS Cloudwatch Metric Filters
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:DATE: 2022-11-12
|
||||
:CUSTOM_ID: /large-companies/
|
||||
:END:
|
||||
|
||||
@@ -192,9 +159,65 @@ of your application code to take advantage of. Cloudwatch Metrics is one
|
||||
of those services and you can get a lot of value out of it with not much
|
||||
effort.
|
||||
|
||||
* vi-editing everywhere
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:DATE: 2022-11-13
|
||||
:CUSTOM_ID: /vi-everywhere/
|
||||
:END:
|
||||
|
||||
For my sake, I prefer to have Vim bindings in as many places as
|
||||
possible.
|
||||
|
||||
Most shells can be configured to use Vim bindings by putting =set -o vi=
|
||||
somewhere in your shell startup script.
|
||||
|
||||
If you're using ZSH then you'll probably want an additional binding to
|
||||
restore CTRL-R reverse history search.
|
||||
|
||||
=bindkey '^R' history-incremental-search-backward=
|
||||
|
||||
For CLI tools that use the =readline= library then you can configure its
|
||||
input mode using a =.inputrc= file in your =$HOME= directory.
|
||||
|
||||
This affects REPLs like =ghci= and tools like =psql=.
|
||||
|
||||
#+begin_src txt
|
||||
set editing-mode vi
|
||||
$if mode=vi
|
||||
|
||||
set keymap vi-command
|
||||
# these are for vi-command mode
|
||||
Control-l: clear-screen
|
||||
|
||||
set keymap vi-insert
|
||||
# these are for vi-insert mode
|
||||
Control-l: clear-screen
|
||||
$endif
|
||||
#+end_src
|
||||
* The problem with large companies
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:DATE: 2024-09-20
|
||||
:CUSTOM_ID: /large-companies/
|
||||
:END:
|
||||
|
||||
Organizing people is a difficult problem which only gets more difficult as youmore people need to be organized.
|
||||
|
||||
The larger a company is the more of its internal structures, rules, policies, history, etc are devoted _just_ to organizing people.
|
||||
|
||||
For me, realizing this was like the first time you hear a flourescent light buzzing in an otherwise quiet room.
|
||||
|
||||
Reasonable people can differ on this point, but for my own sake I'd much rather avoid all the people-organizing baggage that comes with large companies.
|
||||
|
||||
I don't have a hard-and-fast rule about the size of a place I want to work but the larger a place is then generally the more reason I need to want to be there.
|
||||
|
||||
Of course, this is all kind of theoretical at this point, as [[https://flipstone.com][Flipstone]] is my forever home.
|
||||
|
||||
* Simple CSS frameworks
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:DATE: 2024-09-29
|
||||
:CUSTOM_ID: /simple-css-frameworks/
|
||||
:END:
|
||||
|
||||
@@ -214,6 +237,7 @@ Using tacit is a matter of incluing this link tag in the page's HEAD element:
|
||||
* Let people fail
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:DATE: 2024-10-02
|
||||
:CUSTOM_ID: /let-people-fail/
|
||||
:END:
|
||||
|
||||
@@ -239,27 +263,108 @@ I'm _not_ saying all collaboration _requires_ building trust. There are times wh
|
||||
What I am saying is that people frequently misjudge the value in deliberately giving others the space to fail for the sake of fostering trust.
|
||||
|
||||
Building trust is important and we should do it deliberately.
|
||||
* The problem with large companies
|
||||
* TODO Managing Expectations
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:CUSTOM_ID: /large-companies/
|
||||
:DATE: 2024-10-04
|
||||
:CUSTOM_ID: /managing-expectations/
|
||||
:END:
|
||||
|
||||
Organizing people is a difficult problem which only gets more difficult as youmore people need to be organized.
|
||||
:DRAFT:
|
||||
|
||||
The larger a company is the more of its internal structures, rules, policies, history, etc are devoted _just_ to organizing people.
|
||||
I'll figure this out one day. Until then I'll just keep saying yes and burning myself out making everyone happy.
|
||||
:END:
|
||||
|
||||
For me, realizing this was like the first time you hear a flourescent light buzzing in an otherwise quiet room.
|
||||
* TODO Tools I love
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:DATE: 2024-10-07
|
||||
:CUSTOM_ID: /tools-i-love/
|
||||
:END:
|
||||
|
||||
Reasonable people can differ on this point, but for my own sake I'd much rather avoid all the people-organizing baggage that comes with large companies.
|
||||
I work on a computer all day. I do things from query databases, making
|
||||
a lot of HTTP API calls, parsing, transforming and generally munging
|
||||
structured and unstructured data of all kinds. I edit and compile
|
||||
code. I remote into servers and automate a lot of my daily tasks. I
|
||||
take, organize, search and refine notes.
|
||||
|
||||
I don't have a hard-and-fast rule about the size of a place I want to work but the larger a place is then generally the more reason I need to want to be there.
|
||||
I prefer terminal-based tools because I can use them on any of my
|
||||
machines remotely without much hassle. I also find that I'm just more
|
||||
efficient with text-input and keyboard driven interactions, especially
|
||||
if modal editing is available.
|
||||
|
||||
Of course, this is all kind of theoretical at this point, as [[https://flipstone.com][Flipstone]] is my forever home.
|
||||
Fortunately for me we're the golden age of terminal-based tools, IMHO.
|
||||
|
||||
Anyway, with all that said, I present the long list of tools I use daily and why I like them:
|
||||
|
||||
** Arch Linux
|
||||
I won't go into too much detail here. Rolling release, Arch Wiki and
|
||||
AUR. I run Arch with ZFS on 4 machines. My desktop install is over 10
|
||||
years old at this point. I rarely encounter any sort of bleeding edge
|
||||
breakage that people seem to think is common with Arch.
|
||||
** KDE Plasma
|
||||
It has just enough shortcuts for window management that I can do 90%
|
||||
of what I would do with tiling WMs like i3 and Sway and I prefer not
|
||||
having to spend time configuring one of the various i3bar-etc
|
||||
applications to get the system tray and all that working right.
|
||||
|
||||
KDE just works, it looks nice and lets me configure it as much as I want.
|
||||
|
||||
I do find myself WM/DE-curious and I try other things from time to
|
||||
time. [[https://github.com/paperwm/PaperWM][PaperWM]] is on my short list to try out.
|
||||
|
||||
** Emacs
|
||||
Won't elaborate here much either - I like Emacs mostly because of Evil
|
||||
mode and Org mode but there is a long-tail of other packages and
|
||||
configurability that also make me prefer it over Vim or Neovim.
|
||||
|
||||
I still use Neovim for quick one-off edits from time to time but 90%
|
||||
of my day is spent in Emacs.
|
||||
|
||||
I think newer editors like Helix are interesting, but without full Org
|
||||
mode support I couldn't imagine switching.
|
||||
|
||||
** Nushell
|
||||
[[https://www.nushell.sh/][Nushell]] is a modern shell written in Rust with first class support for
|
||||
structured data, syntax and semantics that draw a nice balance between
|
||||
reasonable programming language and an ergonomic shell UX.
|
||||
|
||||
I find myself being willing to automate more complex tasks using
|
||||
Nushell than I would with Z shell or Bash.
|
||||
|
||||
** VisiData
|
||||
[[https://www.visidata.org/][VisiData]] is a nice terminal spreadsheet and CSV tool. I don't have to
|
||||
_create_ a lot of spreadsheets but I do have to find data in them and
|
||||
CSVs often enough, for work, that having something that fits my normal
|
||||
workflow here is really nice.
|
||||
|
||||
While I don't think VisiData will write to XLSX files, it will let you
|
||||
edit sheets and save them as CSV or TSV.
|
||||
|
||||
This tool was the initial motivation for writing this post.
|
||||
|
||||
** Konsole
|
||||
Nothing super interesting to say about it. It just works.
|
||||
|
||||
All the modern terminals are nice, I like WezTerm, Alacritty and
|
||||
Kitty. I switch between them for one reason or another at different
|
||||
times, but I currently have Konsole bound to my terminal shortcut in
|
||||
KDE so it's my terminal of choice.
|
||||
** TODO Unison
|
||||
** Firefox
|
||||
There's not a whole lot, I think, that differentiates the browsers from one another these days
|
||||
** Chrome Emacs
|
||||
[[https://addons.mozilla.org/en-US/firefox/addon/chrome-emacs/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search][Chrome Emacs]] is both a Chrome and Firefox extension that lets you
|
||||
pretty seamlessly edit text areas in your browser from within
|
||||
Emacs. Since I find myself [[#/job-description/][writing a lot at work]] these days, it's nice
|
||||
to be able to edit story details in [[https://www.shorcut.com][Shortcut]] from Emacs with nice
|
||||
modal editing.
|
||||
|
||||
** TODO Syncthing
|
||||
* TODO Just what is it you do here?
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:DATE: 2024-10-08
|
||||
:CUSTOM_ID: /job-description/
|
||||
:END:
|
||||
|
||||
@@ -363,100 +468,3 @@ have helped with this immensely.
|
||||
However, at the same time we've grown the development team so now my
|
||||
other responsibility of feeding the machine (i.e. writing stories) has
|
||||
chipped away at some of the focus gains I've made.
|
||||
|
||||
* TODO Managing Expectations
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:CUSTOM_ID: /managing-expectations/
|
||||
:END:
|
||||
|
||||
:DRAFT:
|
||||
|
||||
I'll figure this out one day. Until then I'll just keep saying yes and burning myself out making everyone happy.
|
||||
:END:
|
||||
|
||||
* TODO Tools I love
|
||||
:PROPERTIES:
|
||||
:ONE: wfot-default
|
||||
:CUSTOM_ID: /tools-i-love/
|
||||
:END:
|
||||
|
||||
I work on a computer all day. I do things from query databases, making
|
||||
a lot of HTTP API calls, parsing, transforming and generally munging
|
||||
structured and unstructured data of all kinds. I edit and compile
|
||||
code. I remote into servers and automate a lot of my daily tasks. I
|
||||
take, organize, search and refine notes.
|
||||
|
||||
I prefer terminal-based tools because I can use them on any of my
|
||||
machines remotely without much hassle. I also find that I'm just more
|
||||
efficient with text-input and keyboard driven interactions, especially
|
||||
if modal editing is available.
|
||||
|
||||
Fortunately for me we're the golden age of terminal-based tools, IMHO.
|
||||
|
||||
Anyway, with all that said, I present the long list of tools I use daily and why I like them:
|
||||
|
||||
** Arch Linux
|
||||
I won't go into too much detail here. Rolling release, Arch Wiki and
|
||||
AUR. I run Arch with ZFS on 4 machines. My desktop install is over 10
|
||||
years old at this point. I rarely encounter any sort of bleeding edge
|
||||
breakage that people seem to think is common with Arch.
|
||||
** KDE Plasma
|
||||
It has just enough shortcuts for window management that I can do 90%
|
||||
of what I would do with tiling WMs like i3 and Sway and I prefer not
|
||||
having to spend time configuring one of the various i3bar-etc
|
||||
applications to get the system tray and all that working right.
|
||||
|
||||
KDE just works, it looks nice and lets me configure it as much as I want.
|
||||
|
||||
I do find myself WM/DE-curious and I try other things from time to
|
||||
time. [[https://github.com/paperwm/PaperWM][PaperWM]] is on my short list to try out.
|
||||
|
||||
** Emacs
|
||||
Won't elaborate here much either - I like Emacs mostly because of Evil
|
||||
mode and Org mode but there is a long-tail of other packages and
|
||||
configurability that also make me prefer it over Vim or Neovim.
|
||||
|
||||
I still use Neovim for quick one-off edits from time to time but 90%
|
||||
of my day is spent in Emacs.
|
||||
|
||||
I think newer editors like Helix are interesting, but without full Org
|
||||
mode support I couldn't imagine switching.
|
||||
|
||||
** Nushell
|
||||
[[https://www.nushell.sh/][Nushell]] is a modern shell written in Rust with first class support for
|
||||
structured data, syntax and semantics that draw a nice balance between
|
||||
reasonable programming language and an ergonomic shell UX.
|
||||
|
||||
I find myself being willing to automate more complex tasks using
|
||||
Nushell than I would with Z shell or Bash.
|
||||
|
||||
** VisiData
|
||||
[[https://www.visidata.org/][VisiData]] is a nice terminal spreadsheet and CSV tool. I don't have to
|
||||
_create_ a lot of spreadsheets but I do have to find data in them and
|
||||
CSVs often enough, for work, that having something that fits my normal
|
||||
workflow here is really nice.
|
||||
|
||||
While I don't think VisiData will write to XLSX files, it will let you
|
||||
edit sheets and save them as CSV or TSV.
|
||||
|
||||
This tool was the initial motivation for writing this post.
|
||||
|
||||
** Konsole
|
||||
Nothing super interesting to say about it. It just works.
|
||||
|
||||
All the modern terminals are nice, I like WezTerm, Alacritty and
|
||||
Kitty. I switch between them for one reason or another at different
|
||||
times, but I currently have Konsole bound to my terminal shortcut in
|
||||
KDE so it's my terminal of choice.
|
||||
** TODO Unison
|
||||
** Firefox
|
||||
There's not a whole lot, I think, that differentiates the browsers from one another these days
|
||||
** Chrome Emacs
|
||||
[[https://addons.mozilla.org/en-US/firefox/addon/chrome-emacs/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search][Chrome Emacs]] is both a Chrome and Firefox extension that lets you
|
||||
pretty seamlessly edit text areas in your browser from within
|
||||
Emacs. Since I find myself [[#/job-description/][writing a lot at work]] these days, it's nice
|
||||
to be able to edit story details in [[https://www.shorcut.com][Shortcut]] from Emacs with nice
|
||||
modal editing.
|
||||
|
||||
** TODO Syncthing
|
||||
|
||||
66
onerc.el
66
onerc.el
@@ -10,7 +10,7 @@
|
||||
(pico-fluid . "https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.fluid.classless.min.css")
|
||||
(pico . "https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.classless.min.css")))
|
||||
|
||||
(setq wfot-css (alist-get 'pico-amber wfot-styles))
|
||||
(setq primary-css (alist-get 'pico-amber wfot-styles))
|
||||
|
||||
(defun wfot-default (page-tree pages _global)
|
||||
"willfullyobtuse default render function
|
||||
@@ -28,7 +28,8 @@
|
||||
`(:html
|
||||
(:head
|
||||
(:meta (@ :name "viewport" :content "width=device-width,initial-scale=1"))
|
||||
(:link (@ :rel "stylesheet" :href wfot-css))
|
||||
(:link (@ :rel "stylesheet" :href primary-css))
|
||||
(:link (@ :rel "stylesheet" :href "wfot.css"))
|
||||
(:title ,title))
|
||||
(:body
|
||||
(:header (:a (@ :href "/") ,website-name))
|
||||
@@ -51,13 +52,14 @@ Also see `one-render-pages' and `one-default-css'."
|
||||
'one-ox nil))
|
||||
(website-name (one-default-website-name pages))
|
||||
;; All pages but the home pages
|
||||
(pages-list (one-default-pages pages "/.+")))
|
||||
(pages-list (wfot-default-pages pages "/.+")))
|
||||
(jack-html
|
||||
"<!DOCTYPE html>"
|
||||
`(:html
|
||||
(:head
|
||||
(:meta (@ :name "viewport" :content "width=device-width,initial-scale=1"))
|
||||
(:link (@ :rel "stylesheet" :type "text/css" :href wfot-css))
|
||||
(:link (@ :rel "stylesheet" :href primary-css))
|
||||
(:link (@ :rel "stylesheet" :href "wfot.css"))
|
||||
(:title ,title))
|
||||
(:body
|
||||
(:header (:a (@ :href "/") ,website-name))
|
||||
@@ -65,6 +67,52 @@ Also see `one-render-pages' and `one-default-css'."
|
||||
(:div/home-list-pages ,content)
|
||||
(:div/pages (:ul ,(reverse pages-list)))))))))
|
||||
|
||||
(defun wfot-default-pages (pages &optional filter)
|
||||
"Return `jack-html' list of PAGES component.
|
||||
|
||||
If FILTER is non-nil, a page is listed only when its path (value
|
||||
of `:one-path' property) matches FILTER regexp.
|
||||
|
||||
Evaluating the following form
|
||||
|
||||
(wfot-default-pages
|
||||
\\='((:one-title \"HOME\" :one-path \"/\")
|
||||
(:one-title \"FOO-1\" :one-path \"/foo-1/\")
|
||||
(:one-title \"FOO-2\" :one-path \"/foo-2/\")))
|
||||
|
||||
returns:
|
||||
|
||||
(:ul
|
||||
(:li (:a (@ :href \"/\") \"HOME\"))
|
||||
(:li (:a (@ :href \"/foo-1/\") \"FOO-1\"))
|
||||
(:li (:a (@ :href \"/foo-2/\") \"FOO-2\")))
|
||||
|
||||
And evaluating the following form with the filter \"/.+\"
|
||||
|
||||
(wfot-default-pages
|
||||
\\='((:one-title \"HOME\" :one-path \"/\")
|
||||
(:one-title \"FOO-1\" :one-path \"/foo-1/\")
|
||||
(:one-title \"FOO-2\" :one-path \"/foo-2/\"))
|
||||
\"/.+\")
|
||||
|
||||
returns a list which doesn't include the home page:
|
||||
|
||||
(:ul
|
||||
(:li (:a (@ :href \"/foo-1/\") \"FOO-1\"))
|
||||
(:li (:a (@ :href \"/foo-2/\") \"FOO-2\")))"
|
||||
(when-let ((li-items
|
||||
(delq nil
|
||||
(mapcar
|
||||
(lambda (page)
|
||||
(let ((href (plist-get page :one-path))
|
||||
(title (plist-get page :one-title))
|
||||
(date (org-element-property :DATE (plist-get page :one-page-tree))))
|
||||
(when (string-match-p (or filter ".*") href)
|
||||
`(:li (@ :class "post-item") (:div (@ :class "post-date") ,date) (:a (@ :href ,href) (:span ,title)) ))))
|
||||
pages))))
|
||||
`(:ul ,@li-items)))
|
||||
|
||||
|
||||
(defun wfot-default-home (page-tree pages _global)
|
||||
"Default render function to use in the home page.
|
||||
|
||||
@@ -81,7 +129,8 @@ Also see `one-render-pages' and `one-default-css'."
|
||||
`(:html
|
||||
(:head
|
||||
(:meta (@ :name "viewport" :content "width=device-width,initial-scale=1"))
|
||||
(:link (@ :rel "stylesheet" :type "text/css" :href wfot-css))
|
||||
(:link (@ :rel "stylesheet" :href primary-css))
|
||||
(:link (@ :rel "stylesheet" :href "wfot.css"))
|
||||
(:title ,title))
|
||||
(:body
|
||||
(:header ,website-name)
|
||||
@@ -108,14 +157,14 @@ in the HTML string.
|
||||
This function is meant to be used by `one-default-with-sidebar'
|
||||
and `one-default-doc' render functions.
|
||||
|
||||
See `one-render-pages', `one-default-css' and `one-default-pages'."
|
||||
See `one-render-pages', `one-default-css' and `wfot-default-pages'."
|
||||
(let* ((title (org-element-property :raw-value page-tree))
|
||||
(path (org-element-property :CUSTOM_ID page-tree))
|
||||
(content (org-export-data-with-backend
|
||||
(org-element-contents page-tree)
|
||||
'one-ox nil))
|
||||
(website-name (one-default-website-name pages))
|
||||
(pages-list (one-default-pages pages))
|
||||
(pages-list (wfot-default-pages pages))
|
||||
(headlines (cdr (one-default-list-headlines page-tree)))
|
||||
(toc (one-default-toc-component headlines))
|
||||
(nav (one-default-nav path pages)))
|
||||
@@ -124,7 +173,8 @@ See `one-render-pages', `one-default-css' and `one-default-pages'."
|
||||
`(:html
|
||||
(:head
|
||||
(:meta (@ :name "viewport" :content "width=device-width,initial-scale=1"))
|
||||
(:link (@ :rel "stylesheet" :type "text/css" :href wfot-css))
|
||||
(:link (@ :rel "stylesheet" :href primary-css))
|
||||
(:link (@ :rel "stylesheet" :href "wfot.css"))
|
||||
(:title ,title))
|
||||
(:body
|
||||
;; sidebar-left and sidebar-main are for small devices
|
||||
|
||||
Reference in New Issue
Block a user