Documentation ¶
Index ¶
- Variables
- func ConvertExt(file string, ext string) string
- func CreateHTMLFile(publDir, postDir string, filePath *string) (file *os.File, err error)
- func CreateIndex(conf *config.General, directory string) error
- func Execute(conf *config.General) error
- func GetFilename(path string) string
- func ListFiles(dir string, withDir bool) (files []string, err error)
- func MakePost(post string, wg *sync.WaitGroup, conf *config.General)
- func ParseTemplates(TemplateDir string) (tpl *template.Template, err error)
- func TrimDir(path, dir string) string
- func TrimFileExt(path string) string
- type Index
- type IndexTree
- type Post
Constants ¶
This section is empty.
Variables ¶
var Written uint
Written count the number of file written
Functions ¶
func ConvertExt ¶
ConvertExt changes a file's extension to the given ext, for example "html".
func CreateHTMLFile ¶
CreateHTMLFile create an html file in the publDir that has the same path and name as the filepath input
func CreateIndex ¶
CreateIndex creates an index file in every directory, made for navigation purposes
func Execute ¶
Execute is used to run the whole post making process TODO : Add more options to run and make it extensible
func GetFilename ¶
GetFilename is used to retrieve the the filename of a file from a path, returns the extension too
func ListFiles ¶
ListFiles list all files in a directory and subdirectories. Returns relative path of all files except those starting with a `.`
func ParseTemplates ¶
ParseTemplates is used to parse all the templates inside the given directory
func TrimFileExt ¶
TrimFileExt returns the path without the fileExt