Documentation
¶
Index ¶
- Constants
- func CheckErr(err error)
- func CreateHistoryHtmlAndSitemap(historyPath string)
- func GenDailyWordHtmlFromJson(dailyNewWordJsonFilePath string, historyPath string)
- func GetDailyFileName() string
- func GetDateFromFilename(filename string) string
- func GetFilenameNoExt(filename string) string
- func GetHistoryFilenameFromFolder(historyPath string) []string
- func GetTodaysDate() string
- func GetTodaysDateWithFormat(format string) string
- type History
- type Sitemap
- type URL
- type Word
Constants ¶
View Source
const ( ChangeFreqAlways = "always" ChangeFreqHourly = "hourly" ChangeFreqDaily = "daily" ChangeFreqWeekly = "weekly" ChangeFreqMonthly = "monthly" ChangeFreqYearly = "yearly" ChangeFreqNever = "never" )
ChangeFreq constants for sitemap
View Source
const BASE_HISTORY_URL string = "https://matthias2wym.com/history/"
View Source
const DIV_ALL_HISTORY_ITEMS string = ` <div class="starter-template"> <h1>History</h1> </div> <div class="container"> <div class="row"> {{range .Items}} <div class="col-lg-3 col-md-4 col-sm-6 mb-3"> <a href="` + BASE_HISTORY_URL + `{{.Filename}}.html" class="d-block p-3 border rounded text-center" style="font-size: 1.25rem; text-decoration: none;">{{.Date}}</a> </div> {{else}}{{end}} </div> </div> `
View Source
const DIV_NEW_WORD_ITEM_TEMPLATE = `` /* 968-byte string literal not displayed */
View Source
const HISTORY_HEADER string = `` /* 3460-byte string literal not displayed */
View Source
const HISTORY_PATH string = "../public/history/"
View Source
const PUBLIC_PATH string = "../public/"
View Source
const WORD_INDEX_FOOTER string = `` /* 1010-byte string literal not displayed */
View Source
const WORD_INDEX_HEADER string = `` /* 3591-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func CreateHistoryHtmlAndSitemap ¶
func CreateHistoryHtmlAndSitemap(historyPath string)
func GetDailyFileName ¶
func GetDailyFileName() string
func GetDateFromFilename ¶
func GetFilenameNoExt ¶
func GetTodaysDate ¶
func GetTodaysDate() string
func GetTodaysDateWithFormat ¶
Types ¶
type Sitemap ¶
type Sitemap struct {
URLs []URL
}
Sitemap represents a sitemap with URLs
func (*Sitemap) GenerateToString ¶
GenerateToString returns the sitemap as a string
Click to show internal directories.
Click to hide internal directories.