Versions in this module Expand all Collapse all v0 v0.18.1 Dec 29, 2016 Changes in this version + const FilePathSeparator + const HugoPatchVersion + const HugoVersionNumber + const HugoVersionSuffix + var DistinctErrorLog = NewDistinctErrorLogger() + var DistinctFeedbackLog = NewDistinctFeedbackLogger() + var ErrWalkRootTooShort = errors.New("Path too short. Stop walking.") + var SummaryDivider = []byte("<!--more-->") + var SummaryLength = 70 + func AbsPathify(inPath string) string + func AddContextRoot(baseURL, relativePath string) string + func BytesToHTML(b []byte) template.HTML + func Deprecated(object, item, alternative string, err bool) + func DiffStringSlices(slice1 []string, slice2 []string) []string + func DirExists(path string, fs afero.Fs) (bool, error) + func DoArithmetic(a, b interface{}, op rune) (interface{}, error) + func Emojify(source []byte) []byte + func Exists(path string, fs afero.Fs) (bool, error) + func ExtractRootPaths(paths []string) []string + func ExtractTOC(content []byte) (newcontent []byte, toc []byte) + func FileContains(filename string, subslice []byte, fs afero.Fs) (bool, error) + func FileContainsAny(filename string, subslices [][]byte, fs afero.Fs) (bool, error) + func Filename(in string) (name string) + func FindAvailablePort() (*net.TCPAddr, error) + func FindCWD() (string, error) + func FirstUpper(s string) string + func GetDottedRelativePath(inPath string) string + func GetLayoutDirPath() string + func GetRealPath(fs afero.Fs, path string) (string, error) + func GetRelativePath(path, base string) (final string, err error) + func GetRelativeThemeDir() string + func GetStaticDirPath() string + func GetTempDir(subPath string, fs afero.Fs) string + func GetThemeDataDirPath() (string, error) + func GetThemeDir() string + func GetThemeI18nDirPath() (string, error) + func GetThemeStaticDirPath() (string, error) + func GetThemesDirPath() string + func GuessSection(in string) string + func GuessType(in string) string + func HasAsciidoc() bool + func HasPygments() bool + func HasRst() bool + func Highlight(code, lang, optsStr string) string + func HugoReleaseVersion() string + func HugoVersion() string + func InStringArray(arr []string, el string) bool + func InitConfigProviderForCurrentContentLanguage() + func InitLoggers() + func IsAbsURL(path string) bool + func IsDir(path string, fs afero.Fs) (bool, error) + func IsEmpty(path string, fs afero.Fs) (bool, error) + func IsWhitespace(r rune) bool + func MakePermalink(host, plink string) *url.URL + func MakeStaticPathRelative(inPath string) (string, error) + func MakeTitle(inpath string) string + func Md5String(f string) string + func NextHugoReleaseVersion() string + func NormalizeHugoFlags(f *pflag.FlagSet, name string) pflag.NormalizedName + func PaginateAliasPath(base string, page int) string + func PathPrep(ugly bool, in string) string + func PrettifyPath(in string) string + func PrettifyURL(in string) string + func PrettifyURLPath(in string) string + func ReaderContains(r io.Reader, subslice []byte) bool + func ReaderToBytes(lines io.Reader) []byte + func ReaderToString(lines io.Reader) string + func RenderBytes(ctx *RenderingContext) []byte + func ReplaceExtension(path string, newExt string) string + func ResetConfigProvider() + func SafeWriteToDisk(inpath string, r io.Reader, fs afero.Fs) (err error) + func SanitizeURL(in string) string + func SanitizeURLKeepTrailingSlash(in string) string + func Seq(args ...interface{}) ([]int, error) + func SliceToLower(s []string) []string + func StripHTML(s string) string + func SymbolicWalk(fs afero.Fs, root string, walker filepath.WalkFunc) error + func ThemeSet() bool + func ToLowerMap(m map[string]interface{}) + func TotalWords(s string) int + func TruncateWordsByRune(words []string, max int) (string, bool) + func TruncateWordsToWholeSentence(s string, max int) (string, bool) + func Uglify(in string) string + func UniqueStrings(s []string) []string + func WordCount(s string) map[string]int + func WriteToDisk(inpath string, r io.Reader, fs afero.Fs) (err error) + type Blackfriday struct + AngledQuotes bool + Extensions []string + ExtensionsMask []string + Fractions bool + HrefTargetBlank bool + LatexDashes bool + PlainIDAnchors bool + SmartDashes bool + Smartypants bool + SourceRelativeLinksEval bool + SourceRelativeLinksProjectFolder string + TaskLists bool + func NewBlackfriday(c ConfigProvider) *Blackfriday + type ConfigProvider interface + Get func(key string) interface{} + GetBool func(key string) bool + GetInt func(key string) int + GetString func(key string) string + GetStringMap func(key string) map[string]interface{} + GetStringMapString func(key string) map[string]string + func Config() ConfigProvider + type DistinctLogger struct + func NewDistinctErrorLogger() *DistinctLogger + func NewDistinctFeedbackLogger() *DistinctLogger + func (l *DistinctLogger) Printf(format string, v ...interface{}) + func (l *DistinctLogger) Println(v ...interface{}) + type FileResolverFunc func(ref string) (string, error) + type HugoHTMLRenderer struct + func (renderer *HugoHTMLRenderer) BlockCode(out *bytes.Buffer, text []byte, lang string) + func (renderer *HugoHTMLRenderer) Image(out *bytes.Buffer, link []byte, title []byte, alt []byte) + func (renderer *HugoHTMLRenderer) Link(out *bytes.Buffer, link []byte, title []byte, content []byte) + func (renderer *HugoHTMLRenderer) List(out *bytes.Buffer, text func() bool, flags int) + func (renderer *HugoHTMLRenderer) ListItem(out *bytes.Buffer, text []byte, flags int) + type HugoMmarkHTMLRenderer struct + func (renderer *HugoMmarkHTMLRenderer) BlockCode(out *bytes.Buffer, text []byte, lang string, caption []byte, subfigure bool, ...) + type Language struct + Lang string + LanguageName string + Title string + Weight int + func NewDefaultLanguage() *Language + func NewLanguage(lang string) *Language + func (l *Language) Get(key string) interface{} + func (l *Language) GetBool(key string) bool + func (l *Language) GetInt(key string) int + func (l *Language) GetString(key string) string + func (l *Language) GetStringMap(key string) map[string]interface{} + func (l *Language) GetStringMapString(key string) map[string]string + func (l *Language) Params() map[string]interface{} + func (l *Language) SetParam(k string, v interface{}) + func (l *Language) String() string + type Languages []*Language + func NewLanguages(l ...*Language) Languages + func (l Languages) Len() int + func (l Languages) Less(i, j int) bool + func (l Languages) Swap(i, j int) + type LinkResolverFunc func(ref string) (string, error) + type PathSpec struct + func CurrentPathSpec() *PathSpec + func NewPathSpecFromConfig(config ConfigProvider) *PathSpec + func (p *PathSpec) AbsURL(in string, addLanguage bool) string + func (p *PathSpec) MakePath(s string) string + func (p *PathSpec) MakePathSanitized(s string) string + func (p *PathSpec) PaginatePath() string + func (p *PathSpec) RelURL(in string, addLanguage bool) string + func (p *PathSpec) URLPrep(in string) string + func (p *PathSpec) URLize(uri string) string + func (p *PathSpec) URLizeAndPrep(in string) string + func (p *PathSpec) UnicodeSanitize(s string) string + type RenderingContext struct + Config *Blackfriday + ConfigProvider ConfigProvider + Content []byte + DocumentID string + DocumentName string + FileResolver FileResolverFunc + LinkResolver LinkResolverFunc + PageFmt string + RenderTOC bool