Coder Social home page Coder Social logo

daybookr's Introduction

daybookr

Simple static site generator. Quick and dirty, extremely barebones. Great for scatterbrained people in a rush.

Installation

$ go get -u github.com/figglewatts/daybookr/cmd/daybookr

Usage

NAME:
   daybookr - generate a static site based on some content, config and templates

USAGE:
   daybookr [global options] COMMAND [options]

VERSION:
   2.0.4

AUTHOR:
   Figglewatts

COMMANDS:
   generate  generate the site
   new       create a new site
   open      open a daybookr site in a browser
   help, h   Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)

COPYRIGHT:
   (c) 2020 Figglewatts

Advanced usage

Using custom config fields in layouts

If you have custom fields in your daybook.yml file, i.e.:

custom_field: this is a string

These can be accessed in a layout by doing something like this:

<h1>{{(.Site.Conf.Get "custom_field").String}}</h1>

Resulting in:

<h1>this is a string</h1>

The config file is parsed with the simpleyaml package. For more information on how to get all kinds of YAML values from the config file (i.e. not just a string as above), please see their documentation.

daybookr's People

Contributors

figglewatts avatar

Watchers

 avatar  avatar

daybookr's Issues

Support for non blog style sites

When running daybookr without a 'posts' directory, this error occurs:

ERROR: could not create site: could not load posts: open site/posts: no such file or directory

Would be good to support any kind of site.
Could be made more generic by just taking markdown documents and turning them into collections of site areas. Doesn't matter if they're posts, pages, or whatever.

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.