blorg

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

blorg is a very minimal and broken static site generator. Don't use this. I initially wrote go-org to use Org mode in hugo and non crazy people should keep using hugo. I just like the idea of not having dependencies / following 80/20 rule. And blorg gives me what I need for a blog in a fraction of the LOC (hugo is a whooping 80k+ excluding dependencies - this will very likely stay <5k).

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig string
View Source
var DefaultConfigFile = "blorg.org"
View Source
var TemplateFuncs = map[string]interface{}{
	"Slugify": slugify,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	ConfigFile string
	ContentDir string
	PublicDir  string
	Address    string
	BaseUrl    string
	Template   *template.Template
	OrgConfig  *org.Configuration
}

func ReadConfig

func ReadConfig(configFile string) (*Config, error)

func (*Config) Render

func (c *Config) Render() error

func (*Config) RenderContent

func (c *Config) RenderContent() ([]*Page, error)

func (*Config) RenderList

func (c *Config) RenderList(list, sublist string, m map[string]interface{}) error

func (*Config) RenderLists

func (c *Config) RenderLists(pages []*Page) error

func (*Config) Serve

func (c *Config) Serve() error

type Page

type Page struct {
	*Config
	Document       *org.Document
	Info           os.FileInfo
	PermaLink      string
	Date           time.Time
	Content        template.HTML
	BufferSettings map[string]string
}

func NewPage

func NewPage(c *Config, path string, info os.FileInfo) (*Page, error)

func (*Page) Render

func (p *Page) Render(path string) error

func (*Page) Summary

func (p *Page) Summary() template.HTML

Jump to

Keyboard shortcuts

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