page

package
v0.0.0-...-5a5ee98 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

package page provides mechanisms and data for generating a WriteFreely page.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StaticPage

type StaticPage struct {
	// App configuration
	config.AppCfg
	Version   string
	HeaderNav bool
	CustomCSS bool

	// Request values
	Path          string
	Username      string
	Values        map[string]string
	Flashes       []string
	CanViewReader bool
	IsAdmin       bool
	CanInvite     bool
}

func (StaticPage) OfficialVersion

func (sp StaticPage) OfficialVersion() string

func (*StaticPage) SanitizeHost

func (sp *StaticPage) SanitizeHost(cfg *config.Config)

SanitizeHost alters the StaticPage to contain a real hostname. This is especially important for the Tor hidden service, as it can be served over proxies, messing up the apparent hostname.

Jump to

Keyboard shortcuts

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