Open sahilk opened 3 years ago
Hi, it is indeed a bug, datapage_url
is not able to manage name_expr
. Thanks for reporting, I will look into it.
To give a bit of context, datapage_url
has not been updated for a while and, in particular, it is not "aware" of name_expr
.
Problem: the value of name_expr
cannot be directly used in Liquid.
To generate the link, therefore, we need to:
page_gen
and applying the appropriate piece of code to data; that is, getting name or executing name_expr)Current syntax of datapage_url
is inadequate. Proposal for new syntax:
{{
where:
Not sure if I'm using it correctly.
{{ page_name | datapage_url: dir }}
is mentioned in the docs for generating links to generated pages. I usename_expr
in _config.yml to generate the files in anacts
folder, so is{{ name_expr | datapage_url: acts }}
the right way to do this?Would you like to see the
--trace
output as well?(Sorry, but I'm also not entirely clear on how to use this liquid tag in my template to generate links for each of the items from the data file.)
As a fallback, I'm currently using
slugify
to create the page URLs manually, which works just fine, but raising this here to be sure if I'm doing something wrong or if there's a bug.