baja

package
v0.0.0-...-80338ce Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDupe

func CheckDupe(reporter reporterFunc)

func Clean

func Clean(action, dir string)

func Compile

func Compile(source string) error

TODO Move theme reference to config with DI

func CopyDir

func CopyDir(src string, dst string) (err error)

CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.

func CopyFile

func CopyFile(src, dst string) (err error)

func Deploy

func Deploy(source string) error

func DeploySSH

func DeploySSH(host, dest string) error

func Fanout

func Fanout(issueNumber string, mode string, confirm bool)

func Schedule

func Schedule(issue int) error

func Serve

func Serve(cwd, addr string)

Types

type Config

type Config struct {
	Theme string
}

type Indexer

type Indexer struct {
	AlgoliaAppID string
	AlgoliaKey   string
}

func (*Indexer) Index

func (i *Indexer) Index(dir string)

type Issue

type Issue struct {
	Subject     string        `yaml:"subject"`
	Time        string        `yaml:"time"`
	Links       []Link        `yaml:"links"`
	CodeToRead  []Link        `yaml:"read_code"`
	Tools       []Link        `yaml:"tool"`
	Briefs      []Link        `yaml:"brief"`
	Videos      []Link        `yaml:"video"`
	Name        string        `yaml:"name"`
	PubTime     time.Time     `yaml:"pub_time"`
	Draft       bool          `yaml:"draft"`
	Description template.HTML `yaml:"description"`
}

func (Issue) FormatPubTime

func (issue Issue) FormatPubTime() string

type Issues

type Issues []Issue

func (Issues) Len

func (issue Issues) Len() int

func (Issues) Less

func (issue Issues) Less(i, j int) bool

func (Issues) Swap

func (issue Issues) Swap(ii, j int)
type Link struct {
	URI         string        `yaml:"url"`
	Title       string        `yaml:"title"`
	Description template.HTML `yaml:"description"`
	Category    []string      `yaml:"category"`
	Action      string        `yaml:"action"`
}

func (*Link) IsSponsor

func (l *Link) IsSponsor() bool

type Page

type Page struct {
	Site   Site
	Time   time.Time
	Issue  Issue
	Issues Issues
}

Page holds the whole state of current page, including config, site etc

type Site

type Site struct {
	Name string
}

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(cwd string) *Watcher

func (*Watcher) Run

func (w *Watcher) Run()

Directories

Path Synopsis
https://github.com/rjz/githubhook/blob/master/githubhook.go
https://github.com/rjz/githubhook/blob/master/githubhook.go

Jump to

Keyboard shortcuts

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