2

I'm working in a node/wintersmith/jade stack and am attempting to loop through a series of markdown files and pull out metadata to create dynamic file paths. I've read Use a variable in a Jade include and realize that dynamic includes isn't possible in Jade but I'm curious if anyone has found any work around, I don't feel like the answers presented in the other post are appropriate.

- var people = _.chain(contents['people']._.pages, function(item) {
-   return item
- }).value()
      dl
      each person in people
          - var bio = "assets/bio/" + person.metadata.bio
          dt
              != person.html
          dd
              include:md bio
4

0 回答 0