Documentation ¶
Index ¶
- func CopyExtraFiles(inDir string, outDir string, files map[string]bool) error
- func EnsureDir(dirName string) error
- func GetCrumbs(f string, inDir string, isExt bool) ([]string, []string)
- func GetDepth(dir string) int
- func GetFileBase(f string) string
- func GetFileExt(f string) string
- func GetFileName(f string) string
- func GetFilePath(f string) string
- func GetRelativeFilePath(f string, root string) string
- func IsEntryPresent(f string) (bool, error)
- func IsFileExist(f string) (bool, error)
- func RemoveContents(contents []string) error
- func RemoveExtension(f string) string
- func ReorderFiles(files []string) []string
- func ResolveDate(d string) (string, string, error)
- func ResolveHref(f string, inDir string, prefixSlash bool) string
- func ResolveOutPath(f string, inDir string, outDir string, newExt string) string
- func ResolveTitle(mt string, fn string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyExtraFiles ¶
Move extra files like assets (images, fonts, css) over to output, preserving the structure.
func GetCrumbs ¶
If link is "/foo/bar/hello.md"
crumbs is {"foo", "bar"}
crumbLinks is {"/foo", "/foo/bar"}
func GetFileName ¶
Given /path/to/filename.ext, return filename.ext
func GetRelativeFilePath ¶
Given /abs/path/to/fileOrDir, where root is /abs/path, return to/fileOrDir
func IsEntryPresent ¶
func IsFileExist ¶
Return true/false if a path exists/doesn't exist
func ReorderFiles ¶
Move all index.md from files to the end so they are processed last
func ResolveDate ¶
Resolve the date d from format YYYY-MM-DD Returns a pretty date and a machine date
func ResolveHref ¶
Return the href
func ResolveOutPath ¶
Resolve out path of file or directory given absolute path f
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.