onepagestaticsite

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2019 License: MIT Imports: 7 Imported by: 0

README

One Page Static Site

Coverage Status Build Status Go Report Card GoDoc

Opinionated and simple tool to build one page static site with content written in markdown and Go templates.

Goal

It's basically to satisfies my own needs, so there isn't an aim to have flexibility in thing that I want to keep them as I personal want.

Usage

The same binary has the help message which explains what it does and because, so far, it's so simple, there is no need to have further information. Hence, download it and use it.

License

MIT, read the license file for more information.

Documentation

Overview

Package onepagestaticsite provides the API required by the binary under the subpackage cmd

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(tplfp string, ctnfp string, outfp string) error

Render generate the HTML file on the outfp file path using the Go HTML template on the tplfp file path and placing the HTML content in the {{.Content}} of the template, which is obtained from the Markdown file in the cntfp file path. NOTE that if the outfp file exists, it will be overwritten. It returns an errors if the template file doesn't exits, if any of the files paths cntfp or outfp don't exists or any error happens during the operations performed.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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