staticweb

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 13 Imported by: 1

README

Static Web

Compile HTML and MD template files together into a static html website.

Installation

# install the go module
go get github.com/tkdeng/staticweb

# or install the binary
git clone https://github.com/tkdeng/staticweb.git &&\
cd staticweb &&\
make install &&\
cd ../ && rm -r staticweb

# install into /usr/bin
make install

# install locally (with dependencies)
make local

# build without dependency installation
make build

# install dependencies
make deps

# uninstall htmlc
make clean

Golang Usage


import (
  "github.com/tkdeng/staticweb"
)

func main(){
  // compile directory
  err := staticweb.Compile("./src", "./dist")
}

Binary Usage

staticweb ./src --out="./dist"

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugMode bool = false
View Source
var TemplateMode bool = false

Functions

func Compile

func Compile(src, dist string) error

Types

type Config

type Config struct {
	Vars map[string]string
	Meta map[string]string

	Styles []struct {
		Url   string
		Print bool
		Lazy  bool
	}

	Scripts []struct {
		Url    string
		Module bool
		Defer  bool
		Async  bool
	}
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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