Coder Social home page Coder Social logo

Comments (4)

ncanavan avatar ncanavan commented on June 11, 2024 1

@doowb you save me again. I really appreciate it.

from assemble.

assemblebot avatar assemblebot commented on June 11, 2024

@ncanavan Thanks for the issue! If you're reporting a bug, please be sure to include:

  • The version of assemble you are using.
  • Your assemblefile.js (This can be in a gist)
  • The commandline output. (Screenshot or gist is fine)
  • What you expected to happen instead.

If your issue is related to one of the following, please open an issue there:

  • grunt-assemble Issues with using assemble in grunt or the grunt-assemble library.
  • handlebars-helpers Issues with using handlebars helpers from the handlebars-helpers library.

from assemble.

doowb avatar doowb commented on June 11, 2024

TLDR;

try changing {{#IndexBU}} to {{#IndexBUs}}.

Longer version

Assemble has created 2 built-in helpers for you for each of your collections. One is a singular helper which will take the name of a view that's in the collection and return the view. The second is a plural helper that returns the entire collection as a list (or in the case of the block helper usage above uses the list as the context for the body of the block). To create the singular and plural versions of the helpers we use an inflection library to try to figure out what the names should be and in the case of passing in IndexBU it's probably setting the plural as IndexBUs. You can force the name of the singular and plural names by passing them on the options to .create:

app.create('IndexBU', { viewType: 'renderable', plural: 'IndexBU' }).load('_posts/!()/index.md');

Of the top of my head, I don't remember what happens if the singular and plural names conflict, but you can try it out if you want to use something other than IndexBUs as your plural name.

from assemble.

doowb avatar doowb commented on June 11, 2024

np

from assemble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.