ghosttohugo

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDateFormat

func WithDateFormat(format string) func(*Converter)

WithDateFormat sets the date format to use for ghost imports

func WithForce

func WithForce() func(*Converter)

WithForce sets the converter to forcefully overwrite a Hugo site.

func WithHugoPath

func WithHugoPath(path string) func(*Converter)

WithHugoPath sets the path to the Hugo project being created

func WithLocation

func WithLocation(location *time.Location) func(*Converter)

WithLocation sets the location used when working with timestamps

Types

type Converter

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

Converter is responsible for importing a Ghost blog export and converting it to a Hugo site.

func New

func New(options ...func(*Converter)) (*Converter, error)

New creates a new Converter configured with optional settings.

func (*Converter) Convert

func (c *Converter) Convert(r io.ReadSeeker) (int, error)

Convert is the main function of this package. It takes an io.ReadSeeker to the Ghost Blog export and converts that into a new Hugo site.

Jump to

Keyboard shortcuts

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