Git Product home page Git Product logo

sitegen's Introduction

sitegen

Sitegen is a simple but flexible static site generator.

Setup

Download the sitegen bundles from release page.

Bundled with the executables is a sample website that you can start with. Extract the zip file then run the command below.

# Run sitegen with development server
sitegen -serve
# Run final build
sitegen
# Build for github pages, just add -serve to test & add  -minify to minify output
sitegen -public ./docs
# Build in dist but serve under a subdirectory blog
sitegen -public ./dist  -base /blog
# For more options
sitegen -help

Built with sitegen

File Handlers

File handlers is a way to process any file differently when it changes by running a specific command.

If you want to run npm run build:css when it's development and npm run build:prod:css for final build add this to the css file:

/*
---
serve: npm run build:css
build: npm run build:prod:css
---
*/

Template functions

Uses go html template.

  • path - prefixes any path with base path
  • sources "(Path|Local|Filename|Meta.*)" "Pattern" - returns source array that matches pattern
  • data "file.json" - loads any data under data dir
  • json - converts data to json for javascript/json use
  • js - no escape js
  • html - no escape html
  • css - no escape
  • sort "(Path|Local|Filename|Meta.*)" "(asc|desc) - orders sources
  • limit n - limits sources
  • offset n - offsets sources

sitegen's People

Contributors

faisalraja avatar

Watchers

James Cloos 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.