baja

package
v0.0.0-...-9e8b894 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 31 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"`
	SelfHosted []Link `yaml:"self_hosted"`

	Name             string          `yaml:"name"`
	PubTime          time.Time       `yaml:"pub_time"`
	Draft            bool            `yaml:"draft"`
	Description      template.HTML   `yaml:"description"`
	ExternalSnippets []template.HTML `yaml:"external_snippets"`
}

func (Issue) FormatPubTime

func (issue Issue) FormatPubTime() string

func (*Issue) Utmify

func (issue *Issue) Utmify(medium 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"`
	UtmURI      string        `yaml:"-"`
	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
	Post   Post
	Posts  Posts
}

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

type Post

type Post struct {
	Title       string `yaml:"title"`
	Description string `yaml:"description"`
	Date        string `yaml:"date"`
	Draft       bool   `yaml:"draft"`

	Slug    string        `yaml:"-"`
	PubTime time.Time     `yaml:"-"`
	Body    template.HTML `yaml:"-"`
	TOC     template.HTML `yaml:"-"`
}

func (Post) FormatPubTime

func (p Post) FormatPubTime() string

func (Post) ReadingTime

func (p Post) ReadingTime() int

type Posts

type Posts []Post

func (Posts) Len

func (p Posts) Len() int

func (Posts) Less

func (p Posts) Less(i, j int) bool

func (Posts) Swap

func (p Posts) Swap(i, j int)

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