metadata

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	METADATA_FILE = "metadata.json"

	PUBLIC_STATUS = "public"
	DRAFT_STATUS  = "draft"
)

Variables

This section is empty.

Functions

func GetMetadataPath

func GetMetadataPath(postPath string) string

Types

type Metadata

type Metadata struct {
	Title         string `json:"title"`
	Status        string `json:"status"`
	Static        bool   `json:"static"`
	CreatedAt     int64  `json:"createdAt"`
	FeaturedImage string `json:"featuredImage"`
}

*

  • Metadata *
  • The metadata.json stores additional information about
  • a blog post.

func Load

func Load(postPath string) (*Metadata, error)

func (Metadata) Save

func (m Metadata) Save(postPath string) error

Jump to

Keyboard shortcuts

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