gomks

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: BSD-3-Clause Imports: 17 Imported by: 0

README

gomks

PkgGoDev Build Status Go Report Card

Scriptable static website generator using mattn/anko Go interpreter.

All the work is totally and almost unhonestly stolen (inspired?) from sunainapai/makesite. Thanks to the authors for their great and inspirational work.

Documentation

Overview

Package gomks implements an scriptable static website generator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copytree

func Copytree(srcpath, dstpath string)

func Fread

func Fread(filename string) string

func Getenv

func Getenv(key string)

func Log

func Log(format string, v ...interface{})

func MakeList

func MakeList(pages *Pages, dst string, listLayout string, itemLayout string, params paramMap)

func NewVM

func NewVM() *vms

func Panic

func Panic(v interface{})

func Panicf

func Panicf(format string, v ...interface{})

func ParamsNew

func ParamsNew() paramMap

func PathIsFile

func PathIsFile(path string) bool

func Render

func Render(tpl string, params paramMap) string

func Rmtree

func Rmtree(path string)

func SetenvDefault

func SetenvDefault(key, val string)

func Version

func Version() string

Types

type Env

type Env interface {
	Define(symbol string, value interface{}) error
}

type Pages

type Pages struct {
	// contains filtered or unexported fields
}

func MakePages

func MakePages(src, dst string, layout string, params paramMap) *Pages

func (*Pages) Add

func (p *Pages) Add(c paramMap)

func (*Pages) Sort

func (p *Pages) Sort()

type VM

type VM interface {
	Execute(script string) error
	Eval(filename string) error
}

Directories

Path Synopsis
cmd
mks
Package main implements the mks command line tool.
Package main implements the mks command line tool.

Jump to

Keyboard shortcuts

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