Fork me on GitHub
#biff
<
2022-05-05
>
Jacob O'Bryant10:05:21

just redid the theme system. A theme is a directory which at a minimum contains a theme script (I'm using babashka for it, but theoretically could use python or any other scripting language). the script reads the posts and site config from a _input.edn file then writes html and css files to the current directory. You can include other files in the directory as additional config for the script. e.g. tailwind.css and tailwind.config.js files, so that the script can use them to generate the css. For images etc, currently you can include a _files file, where each line is a path followed by a url. Platypub fetches the urls and stores the results in the paths you give. So for now you have to do object storage externally. (Though the CMS does do image storage already.) For now this all runs unsandboxed, but hopefully this structure makes sandboxing feasible. e.g. create an aws lambda fn with babashka + tailwind preinstalled. Send it a post request with the contents of the theme directory + _input.edn, get back the generated files. Should run within a few seconds. Copying the files specified in _files can happen after the sandboxed code runs. It'd be great if we could do the sandboxing locally somehow, but from a bit of googling it looked like docker containers aren't really cut out to be used as a security sandbox (?). Speaking of which, http://biffweb.com is now deployed with platypub! I uploaded the theme here: https://github.com/jacobobryant/platypub-biffweb-theme

Jacob O'Bryant10:05:17

also I made some breaking schema changes, so if you already cloned, might want to just reset the db (remove the storage directory)

Jacob O'Bryant10:05:59

Last thing I have to have for my own use is newsletters, which I'll start working on now. After that I'll add a bunch of issues and try to get other people to work on them

Bhougland11:05:44

oops. hold on

Bhougland11:05:05

Are you going to provide screen cast for how to use Biff and Platypub? I love the idea of a non trival project like Platypub to learn with, but as a beginning Clojure developer a simple "clone twitter" would also be helpful. After looking at the clojure ecosystem I was thinking about the libraries I would want to use and Biff really nails the set I was most interested in. I can't wait to learn more, your projects look really interesting. Good work!

Jacob O'Bryant02:05:56

Glad you like them! I am planning to do some pair programming screencasts for platypub after the first release is done. there are a couple screencasts here as well in case you haven't seen them already (the ones titled "Biff demo: ...") : https://biffweb.com/newsletter/