Soupault 1.11 preview release

Message ID
DKIM signature
Download raw message
Hi everyone,

I've made an 1.11.0 preview release for everyone to test.

You can fine prebuilt binaries at
https://files.baturin.org/software/soupault/1.11.0/ or build from master.

New features:

Plugin functions to simplify working with element attributes (suggested
by Aoirthoir):

HTML.delete_attribute(elem, attr_name) -- deletes attribute
HTML.list_attributes(elem) -- lists names of all attributes an element has
HTML.clear_attributes(elem) -- deletes all attributes from an element

There's also String.join(delimeter, strings) function now.

Support for multiple page templates (suggested by Jonah):

  file = "templates/serious.html"
  section = "serious-business"

  file = "templates/fun.html"
  path_regex = "(.*)/funny-(.*)"

You can use any of page/section/path_regex and their exclude_*
counterparts for targeting custom templates, just like in widget and
index settings.
Note that those options are not _required_ now, and multiple templates
matching the same page is undefined behaviour (i.e. you can't predict
which template wins). It's your responsibility to make sure that
targeting is precise.
However, to aid debugging, there are INFO level log messages that tell
you which template soupault used for every page.

Support for extracting element attribute values (suggested by Jonah):

  post_image = { selector = "img#post-image", extract_attribute = "src" }
  post_date = { selector = "time#post-date", extract_attribute =
"datetime" }

It's also possible to pass lists of strings, integers, and booleans to
plugins now.
Note that it's impossible to pass lists of anything _but_ strings, or
heterogenous lists yet. That is blocked by the current TOML library and
will need to wait for a better implementation.

Please test the release, and if you don't find any issues, I'll make it
Message ID
<adcd896b-a09b-aff5-3fb5-3ada44a419ec@baturin.org> (view parent)
DKIM signature
Download raw message
I will test that tomorrow. Tonight I am going to clean up my code 
again... got a small list.

For the Templates its a great idea and implementation.. an added 
possibility, take a look at my plugin:

tree-template-include.lua .. it allows us to mimic the tree structure of 
site and then chooses files based on where in the tree the page is... 
this will work with any includes we want except, the site or section 
template... in the usual case main.html...

so imagine site is like this:


and imagine templates like this:


then everything under fun/ including fun/ and fun/cats would use 

but everything else would just use templates/main.html

This makes a quick easy code free way to change templates on sections... 
just mkdir, copy file...bam.

Of course both methods could be used .

All the changes, including the way you implemented section templates, 
look awesome!

Thanks again!
Message ID
<b82f076e-a27f-7c8f-0b54-a32ff7d8eb5d@aoirthoir.com> (view parent)
DKIM signature
Download raw message
Tested everything  but the custom fields...it all works.. nothing was 
Export thread (mbox)