Coder Social home page Coder Social logo

sprig's People

Contributors

crissoca avatar zach-adams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sprig's Issues

Can't pass variables to twig template

According to Twigpress doc and sprig-dir/inc/twigpress.php, you can pass variables to the template with twigpress_render_twig_template($vals = array(), $template = false, $echo = true).

I'm trying to pass variables to the template with the following code but it doesn't work. What am I doing wrong?

single.php:

$vals = array( 'foo' => 'bar' );
twigpress_render_twig_template($vals);

single.twig:

{{ vals.foo }} # Does not print anything #
{{ foo }} # Same #
{{ dump(vals) }} # Prints 'null' #

Please enlighten a n00b! Thanks. :)

Theme needs to be re-activated before changes to the twig template show up.

I've been trying to develop with the sprig theme but it seems that the twig rendered does not activate when changes are made. Before it shows up I have to activate other themes then activate sprig theme again.

Is gulp suppose to regenerate the twig template automatically? If so then it is not working right on my side.

Update: The changes not reflected are only from the "header.twig" and "head.twig"

How to render a single page template

I have tried a couple of way but so far the closest I've got is getting all the pages to show up with the title as the home page.

Here is what i wrote on the template, how do I set the proper titles for the pages.

{% extends 'layouts/base.twig' %}

{% block content %} 
 {% for page in pages() %}{{ set_up_page(page) }}                               
                {% include 'content/content-' ~ page.post_name ~ '.twig' %}
 {% endfor %}

{% endblock %}

Use NPM for dependencies, instead of Bower

There's no need to have a second package manager when NPM can handle adding in jQuery and Bootstrap. Prior to NPM 3, the only real benefit of Bower was the flat dependency tree, but now with NPM 3+, that is no longer the case.

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.