convert

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Transform various data strings to other data strings

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Date

func Date(date string) (string, string, error)

Resolve the date d from format YYYY-MM-DD Returns a pretty date and a machine date

func FileBase

func FileBase(f string) string

Given /path/to/filename.ext, return filename

func Href

func Href(f string, inDir string, prefixSlash bool) string

Return the href inDir/a/b/c/file.md -> a/b/c/file

func NavCrumbs(f string, inDir string, isExt bool) ([]string, []string)

If link is "/a/b/c/file.md"

crumbsTitle: {"a", "b", "c"}

crumbsLink: {"a/index.html", "a/b/index.html", "a/b/c/index.html"}

func Title

func Title(metadataTitle string, filename string) string

Return title mt else fn

Types

This section is empty.

Jump to

Keyboard shortcuts

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