2020-12-04 12:50:20 +01:00
|
|
|
package site
|
|
|
|
|
2020-12-21 07:36:45 +01:00
|
|
|
import (
|
|
|
|
"git.sr.ht/~ewintr/shitty-ssg/pkg/adoc"
|
|
|
|
)
|
|
|
|
|
2020-12-04 12:50:20 +01:00
|
|
|
const (
|
|
|
|
KIND_NOTE = Kind("note")
|
|
|
|
KIND_STORY = Kind("story")
|
|
|
|
KIND_ARTICLE = Kind("article")
|
|
|
|
KIND_INVALID = Kind("")
|
|
|
|
)
|
|
|
|
|
|
|
|
type Kind string
|
|
|
|
|
|
|
|
const (
|
|
|
|
LANGUAGE_EN = Language("en")
|
|
|
|
LANGUAGE_NL = Language("nl")
|
|
|
|
LANGUAGE_INVALID = Language("")
|
|
|
|
)
|
|
|
|
|
|
|
|
type Language string
|
|
|
|
|
2020-12-21 07:36:45 +01:00
|
|
|
func NewLanguage(ln adoc.Language) Language {
|
|
|
|
switch ln {
|
|
|
|
case adoc.LANGUAGE_NL:
|
2020-12-04 12:50:20 +01:00
|
|
|
return LANGUAGE_NL
|
2020-12-21 07:36:45 +01:00
|
|
|
case adoc.LANGUAGE_EN:
|
2020-12-04 12:50:20 +01:00
|
|
|
fallthrough
|
|
|
|
default:
|
|
|
|
return LANGUAGE_EN
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Tag string
|
|
|
|
|
|
|
|
const (
|
|
|
|
DATE_SHORT DateFormat = iota
|
|
|
|
DATE_LONG
|
|
|
|
DATE_FORMAL //Sat, 12 Sep 2020 12:32:00 +0200
|
|
|
|
)
|
|
|
|
|
|
|
|
type DateFormat int
|