Giter VIP home page Giter VIP logo

balrog's Introduction

Balrog

The tiny static site generator written in lisphp.

Usage

To start a new site, just add the dependency via composer:

$ composer init --require igorw/balrog:dev-master -n

Now you can add the following directories:

  • assets: All of these files will be copied to the web directory. You can add JavaScript, CSS and images in here.

  • layouts: The layouts are used to render the pages. They have a .html.twig suffix. You can create base templates and have more specific ones that extend them using the extends tag.

    Layouts get access to following variables:

    • post: Contains the data of the current post (it is not set on the index page). A post has title, body and any additional front-matter meta data. body contains the markdown body rendered as html.

    • posts: A listing of all posts in reverse order of publication.

    Filenames that follow the index.$format.twig naming scheme will get compiled to an index.$format file.

  • posts: Markdown files representing blog posts. Must be in the format of YYYY-mm-dd-slug.md, e.g. 2012-09-20-like-a-hacker.md. Each one must begin with a YAML front matter. Here is a sample blog post:

      ---
      layout: post
      title: Blogging Like a Hacker
      ---
    
      # Blogging Like a Hacker
    
      * Iā€™m bloggin yo!
      * ORLY?
      * YARLY!
    

    The following fields are defined:

    • title: Title of the blog post for display on the index.
    • layout: Layout to be used for rendering this post. Defaults to default, which means layouts/default.html.twig is rendered unless specified otherwise.
    • hidden: Set this to true to hide a post from the index.

    Other fields can be defined at will and used in the template.

In order to build the site, you can use the balrog build command:

$ vendor/bin/balrog build

This will populate the static directory with a set of files that can be deployed onto any static web server.

Quote of the day

"Fly, you fools!" - Gandalf

balrog's People

Contributors

igorw 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

Watchers

 avatar  avatar  avatar

Forkers

asm89 gobb ajbm6

balrog's Issues

2 issues

hi.

as3:/balrog-site# ls
bin composer.json composer.lock LICENSE README.md src static vendor
as3:
/balrog-site# ls bin
balrog
as3:/balrog-site# ls vendor/bin
lisphp
as3:
/balrog-site#

there isn't balrog file in ~/balrog-site/vendor/bin/ at all,why u say:
"In order to build the site, you can use the balrog build command:
$ vendor/bin/balrog build" ?

  1. can u make a example site built with balrog? and upload the example site's source code
    to github for users to clone?

tks a lot!

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.