ciigo

package module
v0.0.0-...-ba1ba55 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Overview

Package ciigo is a program to write static web server with embedded files using asciidoc and markdown markup languages.

For more information see the README file at the page repository https://github.com/shuLhan/ciigo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(dir, htmlTemplate string)

Convert all markup files inside directory, recursively, into HTML files using "htmlTemplate" file as template.

func Generate

func Generate(root, out, htmlTemplate string)

Generate a static Go file to be used for building binary.

It will convert all markup files inside root directory into HTML files, recursively; and read all the HTML files and files in "content/assets" and convert them into Go file in "out".

Types

type Server

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

Server contains the HTTP server.

func NewServer

func NewServer(root, address, htmlTemplate string) (srv *Server)

NewServer create an HTTP server to serve HTML files in directory "root".

The address parameter is optional, if not set its default to ":8080". The htmlTemplate parameter is optional, if not set its default to "templates/html.tmpl" in current directory.

func (*Server) Start

func (srv *Server) Start()

Start the web server.

Directories

Path Synopsis
cmd
ciigo
ciigo is a CLI to convert, generate, and/or serve a directory that contains markup files, as HTML files.
ciigo is a CLI to convert, generate, and/or serve a directory that contains markup files, as HTML files.
ciigo-example
Program ciigo-example provide an example on how to build a binary that include the static, generated .go file.
Program ciigo-example provide an example on how to build a binary that include the static, generated .go file.

Jump to

Keyboard shortcuts

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