GithubHelp home page GithubHelp logo

Comments (4)

stephenallred avatar stephenallred commented on May 12, 2024

Sounds good. I guess the view plugin's render method would have the same parameters as the render method on the content plugin currently?
How would the processed content be exposed to the templates?

Having to encode data processing logic like date ordering in templates has been the only negative I've had using Wintersmith (otherwise it's been brilliant, great work!).

from wintersmith.

jnordberg avatar jnordberg commented on May 12, 2024

Yeah, the processed content would be exposed to the templates by the view, the default view plugin could just be something like:

pageView = (plugin, locals, contents, templates, callback) ->
  template = templates[plugin.template]

  locals.page = plugin
  locals.contents = contents

  template.render locals, callback

from wintersmith.

gmaclennan avatar gmaclennan commented on May 12, 2024

Would this allow a view plugin to be written to expose processed data in the content tree? If a template could access "pre-processed" data in the content tree, like in Jekyll, it would simplify template logic and lower the barrier for getting started with Wintersmith.

Would it be possible to develop a paginator with a pageView? Or would this need a different effort?

from wintersmith.

jnordberg avatar jnordberg commented on May 12, 2024

Boom

from wintersmith.

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.