pages

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const Tag feature.Tag = "fs-editor-pages"

Variables

View Source
var (
	DefaultEditorType = "page"
	DefaultEditorKey  = "pages"
)

Functions

func AreVariablesAllowed

func AreVariablesAllowed(key, format string, fields page_fields.Fields) (allowed bool)

func IsTmplPage

func IsTmplPage(format string) (yes bool)

func SanitizeKeyName

func SanitizeKeyName(input string) (cleaned string)

Types

type CFeature

type CFeature struct {
	fs_editor.CEditorFeature[MakeFeature]
	// contains filtered or unexported fields
}

func (*CFeature) AddContentFileSystems

func (f *CFeature) AddContentFileSystems(tags ...feature.Tag) MakeFeature

func (*CFeature) AddIndexing

func (f *CFeature) AddIndexing(info *feature.EditorFile)

func (*CFeature) Build

func (f *CFeature) Build(b feature.Buildable) (err error)

func (*CFeature) EditorMenu

func (f *CFeature) EditorMenu(r *http.Request) (m menu.Menu)

func (*CFeature) FinalizeRenderFileEditor

func (f *CFeature) FinalizeRenderFileEditor(r *http.Request, eid string, pg feature.Page, pm *matter.PageMatter, ctx context.Context, info *feature.EditorFile) (modified *http.Request, err error)

func (*CFeature) GetTranslatedLocales

func (f *CFeature) GetTranslatedLocales(info *feature.EditorFile) (translations map[language.Tag]string)

func (*CFeature) GetUntranslatedLocales

func (f *CFeature) GetUntranslatedLocales(info *feature.EditorFile) (locales []language.Tag)

func (*CFeature) HasIndexing

func (f *CFeature) HasIndexing(info *feature.EditorFile) (indexed bool)

func (*CFeature) InfoRenderCheck

func (f *CFeature) InfoRenderCheck(info *feature.EditorFile) (p feature.Page, pm *matter.PageMatter, err error)

func (*CFeature) Init

func (f *CFeature) Init(this interface{})

func (*CFeature) Make

func (f *CFeature) Make() (feat Feature)

func (*CFeature) MakePageArchetypeContextFields

func (f *CFeature) MakePageArchetypeContextFields(r *http.Request, name string) (list page_fields.Fields)

func (*CFeature) MakePageContextFields

func (f *CFeature) MakePageContextFields(r *http.Request, archetype string) (list page_fields.Fields)

func (*CFeature) NotifyErrors

func (f *CFeature) NotifyErrors(eid string, printer *message.Printer, errs map[string]error)

func (*CFeature) OpChangeHandler

func (f *CFeature) OpChangeHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (redirect string)

func (*CFeature) OpChangeValidate

func (f *CFeature) OpChangeValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (err error)

func (*CFeature) OpFileCommitHandler

func (f *CFeature) OpFileCommitHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (redirect string)

func (*CFeature) OpFileCommitValidate

func (f *CFeature) OpFileCommitValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (err error)

func (*CFeature) OpFileDeIndexHandler

func (f *CFeature) OpFileDeIndexHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (redirect string)

func (*CFeature) OpFileDeIndexValidate

func (f *CFeature) OpFileDeIndexValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (err error)

func (*CFeature) OpFileDeleteHandler

func (f *CFeature) OpFileDeleteHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (redirect string)

func (*CFeature) OpFileIndexHandler

func (f *CFeature) OpFileIndexHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (redirect string)

func (*CFeature) OpFileIndexValidate

func (f *CFeature) OpFileIndexValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (err error)

func (*CFeature) OpFilePublishHandler

func (f *CFeature) OpFilePublishHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (redirect string)

func (*CFeature) OpFilePublishValidate

func (f *CFeature) OpFilePublishValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (err error)

func (*CFeature) OpFileTranslateHandler

func (f *CFeature) OpFileTranslateHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (redirect string)

func (*CFeature) OpPageCreateHandler

func (f *CFeature) OpPageCreateHandler(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (redirect string)

func (*CFeature) OpPageCreateValidate

func (f *CFeature) OpPageCreateValidate(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string) (err error)

func (*CFeature) PageRenderCheck

func (f *CFeature) PageRenderCheck(p feature.Page) (err error)

func (*CFeature) ParseCreatePageForm

func (f *CFeature) ParseCreatePageForm(r *http.Request, pg feature.Page, ctx, form context.Context, info *feature.EditorFile, eid string, redirect *string) (dstUri, dstFormat, dstArchetype string, dstInfo *feature.EditorFile, dstFS feature.FileSystemFeature, dstMP *feature.CMountPoint, dstExists bool, stop bool)

func (*CFeature) ParseFormToDraft

func (f *CFeature) ParseFormToDraft(pm *matter.PageMatter, fields page_fields.Fields, form context.Context, info *feature.EditorFile, r *http.Request) (modified *matter.PageMatter, redirect string, errs map[string]error)

func (*CFeature) PublishDraftPage

func (f *CFeature) PublishDraftPage(info *feature.EditorFile) (err error)

func (*CFeature) ReadDraftPage

func (f *CFeature) ReadDraftPage(info *feature.EditorFile) (pm *matter.PageMatter, err error)

func (*CFeature) ReadPageMatter

func (f *CFeature) ReadPageMatter(info *feature.EditorFile) (pm *matter.PageMatter, err error)

func (*CFeature) RemoveIndexing

func (f *CFeature) RemoveIndexing(info *feature.EditorFile)

func (*CFeature) RemovePage

func (f *CFeature) RemovePage(info *feature.EditorFile, pm *matter.PageMatter) (err error)

func (*CFeature) RenderFileEditor

func (f *CFeature) RenderFileEditor(w http.ResponseWriter, r *http.Request)

func (*CFeature) RenderFilePreview

func (f *CFeature) RenderFilePreview(w http.ResponseWriter, r *http.Request)

func (*CFeature) ServePreparedEditPage

func (f *CFeature) ServePreparedEditPage(pg feature.Page, ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*CFeature) ServePreviewEditPage

func (f *CFeature) ServePreviewEditPage(pg feature.Page, ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*CFeature) SetupEditor

func (f *CFeature) SetupEditor(es feature.EditorSite)

func (*CFeature) SetupEditorRoute

func (f *CFeature) SetupEditorRoute(r chi.Router)

func (*CFeature) SiteFeatureMenu

func (f *CFeature) SiteFeatureMenu(r *http.Request) (m menu.Menu)

func (*CFeature) Startup

func (f *CFeature) Startup(ctx *cli.Context) (err error)

func (*CFeature) UpdateFileInfo

func (f *CFeature) UpdateFileInfo(info *feature.EditorFile, r *http.Request)

func (*CFeature) UpdateFileInfoForEditing

func (f *CFeature) UpdateFileInfoForEditing(info *feature.EditorFile, r *http.Request)

func (*CFeature) UpdatePathInfo

func (f *CFeature) UpdatePathInfo(info *feature.EditorFile, r *http.Request)

func (*CFeature) WriteDraftPage

func (f *CFeature) WriteDraftPage(info *feature.EditorFile, pm *matter.PageMatter) (err error)

func (*CFeature) WritePage

func (f *CFeature) WritePage(info *feature.EditorFile, pm *matter.PageMatter) (err error)

type Feature

type Feature interface {
	feature.EditorFeature
}

type MakeFeature

type MakeFeature interface {
	feature.EditorMakeFeature[MakeFeature]

	Make() Feature

	AddContentFileSystems(tags ...feature.Tag) MakeFeature
}

func New

func New() MakeFeature

func NewTagged

func NewTagged(tag feature.Tag) MakeFeature

Jump to

Keyboard shortcuts

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