avillafiorita / jekyll-datapage_gen

Generate one page per yaml record in Jekyll sites.
369 stars 80 forks source link

`name_expr` seems to be overriding `title` or `title_expr` #79

Closed sahilk closed 3 years ago

sahilk commented 4 years ago

name_expr seems to be taking precedence for me. Doesn't matter if I use title or title_expr, name_expr is what's being returned for {{ page.title }}.

This is what's in my config.yml:

page_gen:
- data: acts.records
  template: page-act
  dir: acts
  name_expr: record['fields']['act_name'] + "-" + record['id']
  title_expr: record['fields']['act_name']

_Originally posted by @sahilk in https://github.com/avillafiorita/jekyll-datapage_gen/issues/72#issuecomment-664029165_

avillafiorita commented 4 years ago

Hi, probably due to the Github repo and gem not being in sync.

I just released a new version which should fix the issue you were experiencing.

See https://github.com/avillafiorita/jekyll-datapage_gen/tree/master/test_cases/issue-79 for an example similar to the case you are reporting.

The new debug option allows to check what goes on during page generation.

Let me know if this update solves your issue!

sahilk commented 3 years ago

@avillafiorita Thank you! Updated the gem and this works flawlessly now.