fuel

command module
v0.0.0-...-8c447f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2015 License: MPL-2.0 Imports: 4 Imported by: 0

README

Build Status GoDoc

Background

Purpose

Fuel is a static website creator -- it takes in markdown files and produces a static html site you can host from github pages, Amazon S3, or any web host. Several tools already support this, notably Jekyl and Hugo.

So what makes Fuel different?

Fuel also has the ability to take in JSON-enhanced markdown (I should totally trademark that) and:

  1. use the JSON in your website as variables
  2. store the JSON and content into a database

How does it work?

Given a normal markdown file or (as in the example below) a JSON-enahanced markdown file:

{
  "breed": "Labrador Retriever"
  "colors": [
    "black",
    "yellow",
    "chocolate"
  "]
}
\~~~
# Breed: Labrador Retriever

The Labrador Retriever, also known as simply Labrador or Lab, is one of several
kinds of retrievers, a type of [gun dog](https://en.wikipedia.org/wiki/Gun_dog).
 Labradors are athletic, playful, and the most popular breed of dog by registered
 ownership in Australia, Canada, New Zealand,[4] the United Kingdom,[5] and
 the United States (since 1991).[6]

[via Wikipedia](https://en.wikipedia.org/wiki/Labrador_Retriever)

fuel will convert it into a HTML file.

Installation

Type the following commands into your Terminal.

  1. Install homebrew (see http://brew.sh/)
  2. Install go
$ brew install go
  1. Complete the go installation instructions.
  2. Get fuel
$ go get github.com/fblecha/fuel
$ cd $GOPATH/src/github.com/fblecha/fuel
  1. Install fuel

This will install fuel into your $GOPATH/bin directory.

$ go install

How do you run it?

Fuel is a command-line application, so you'll run it via a terminal window.

If you want to create a blog devoted to dogs, then you would do the following steps:

# to create a new blog
$ fuel my_new_dog_blog
$ cd my_new_dog_blog

# create some markdown files under my_new_dog_blog/content
# create some layout.html files under my_new_dog_blog/views
# optionally put any css/images/etc you need under my_new_dog_blog/style

$ fuel run

# load my_new_dog_blog/public in a web server

What happens when fuel is run?

Fuel does the following:

  1. It creates a public directory. This directory will be the home of your website.
  2. it copies everything from ./style over to ./public/style. If you want to copy over CSS, JavaScript, or anything else, put it in your style directory and refer to it as "/style/someting" in your html files.
  3. It looks for each markdown file under ./content and applies a layout (a HTML file) to it so that you end up with ./public/something.html

How do layouts work?

Insert

Developers

What databases are supported?

  • (Not started) postgresql
  • (Not started) DynamoDB

What else needs to be done?

see the Todo file

Documentation

Overview

fuel generates a static html site from a markdown dialect, while also putting metadata into a datastore.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL