Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow specifying generic lists of files for use in templates #12

Open
maks opened this issue Jun 7, 2020 · 0 comments
Open

allow specifying generic lists of files for use in templates #12

maks opened this issue Jun 7, 2020 · 0 comments

Comments

@maks
Copy link

maks commented Jun 7, 2020

Tota looks great! and I would love to move over to tota for my current static site, but the current minimal JS based static site gen I currentl use has the concept of specifying lists in its (json based) config, eg.

"lists": {
    "projects": {
      "filter": "file.path = projects/p/*",
      "sort": "display-order ASC"
    },
    "talks": {
      "filter": "file.path = talks/items/*",
      "sort"   : "file.modified DESC"
    }
  }

which I can then make use of in moustache template partials like so:

 {{#talks}}                 
      <li>
       {{#url}}
        <video class="img-responsive talk-video-asset" width="320" height="240" controls >
          <source src=" {{{ url }}}">
        </video>
        {{/url}}

       <div class="caption">
          <strong>{{ title }}</strong> 
            <p>{{{ md }}}</p>
               {{#slides}}
               Slides are available <a href="{{{ slides }}}">here</a>
               {{/slides}}
               {{^slides}}
               Unfortunately the slides for this talk are not available.
               {{/slides}} 
            <p/>
          </div>
       </li>
{{/talks}}

So this would be somewhat like making the current special case of posts more generic.

Would you be open to adding this to tota or accepting a contribution to add this functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant