Git Product home page Git Product logo

sculpin-calendarian-bundle's Introduction

Sculpin Calendarian Bundle

日本語 ENGLISH

What is this?

This is a Bundle that generates the index page to blog date directory for Sculpin.

Setup

Add this bundle in your sculpin.json file:

{
    // ...
    "require": {
        // ...
        "sharkpp/sculpin-calendarian-bundle": "dev-master"
    }
}

and install this bundle running sculpin update.

Now you can register the bundle in SculpinKernel class available on app/SculpinKernel.php file:

<?php

class SculpinKernel extends \Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel
{
    protected function getAdditionalSculpinBundles()
    {
        return array(
           'Sharkpp\Sculpin\Bundle\CalendarianBundle\SculpinCalendarianBundle'
        );
    }
}

How to use

For example, create a source/blog/date.html file:

---
generator: calendarian
---

<h2>
{% if page.calendarian.year %}{{ page.calendarian.year }}-{% endif %}
{% if page.calendarian.month %}{{ page.calendarian.month }}-{% endif %}
{% if page.calendarian.day %}{{ page.calendarian.day }}-{% endif %}
</h2>

<ul>
    {% for item in page.calendarian.items %}
        <li><a href="{{ item.url }}">{{ item.title }}</a></li>
    {% endfor %}
</ul>

By creating in such content, and http://your.site.url/blog/2015/08/09/hoge.html, when there is such a page, the page is created based on the content that was created to http://your.site.url/blog/2015/ and http://your.site.url/blog/2015/08/ and http://your.site.url/blog/2015/08/09/, it can be accessed.

License

© 2015 sharkpp

This software is released under the MIT License, see LICENSE.

sculpin-calendarian-bundle's People

Contributors

sharkpp avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.