Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

fblecha/fuel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A static web site generator that can also persist data to a database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published