server

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(multiProc bool)

Types

type Post

type Post struct {
	Title          string    `json:"title" yaml:"title"`
	Subtitle       string    `json:"subtitle" yaml:"subtitle,omitempty"`
	Author         string    `json:"author" yaml:"author,omitempty"`
	Description    string    `json:"description" yaml:"description"`
	Keywords       []string  `json:"keywords" yaml:"keywords"`
	HeaderImg      string    `json:"header_img" yaml:"header_img,omitempty"`
	Body           string    `json:"body" yaml:"body,omitempty"`
	Slug           string    `json:"slug" yaml:"slug,omitempty"`
	PublishDate    time.Time `json:"publish_date" yaml:"publish_date"`
	OgVideo        string    `json:"og_video" yaml:"og_video,omitempty"`
	Section        string    `json:"section" yaml:"section,omitempty"`
	ModifiedTime   time.Time `json:"modifiedTime" yaml:"modifiedTime,omitempty"`
	ExpirationTime time.Time `json:"expirationTime" yaml:"expirationTime,omitempty"`
	// TwAuthorHandle is your publication's Twitter handle
	TwAuthorHandle string `json:"tw_author_handle" yaml:"tw_author_handle,omitempty"`
	// TwPreviewImage defaults to SiteImg if not specified
	TwPreviewImage string `json:"tw_preview_image" yaml:"tw_preview_image,omitempty"`
	TwVidAudPlayer string `json:"tw_vid_aud_player" yaml:"tw_vid_aud_player,omitempty"`
}

type Router added in v0.0.8

type Router map[string]Post

func (Router) GetPosts added in v0.0.8

func (r Router) GetPosts() []Post

type Settings

type Settings struct {
	Title       string   `json:"title" yaml:"title"`
	Author      string   `json:"author" yaml:"author"`
	Email       string   `json:"email" yaml:"email"`
	Description string   `json:"description" yaml:"description"`
	Keywords    []string `json:"keywords" yaml:"keywords"`
	Theme       string   `json:"theme" yaml:"theme"`
	Url         string   `json:"url" yaml:"url"`
	Locale      string   `json:"locale" yaml:"locale"`
	FbUserId    string   `json:"fb_user_id" yaml:"fb_user_id"`
	FbAppId     string   `json:"fb_app_id" yaml:"fb_app_id"`
	// TwPubHandle is your publication's Twitter handle
	TwPubHandle string `json:"tw_pub_handle" yaml:"tw_pub_handle"`
	// TwAuthorHandle is your publication's Twitter handle
	TwAuthorHandle string `json:"tw_author_handle" yaml:"tw_author_handle"`
}

func LoadSettings

func LoadSettings() (*Settings, error)

Jump to

Keyboard shortcuts

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