Help us shape the future of Go! Take the 2026 Go Developer Survey

pages

package
v3.1.61 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LandingConfigPath is the path to the landing page configuration file
	LandingConfigPath = ".gitea/landing.yaml"
	// LandingConfigPathAlt is an alternative path for the configuration file
	LandingConfigPathAlt = ".gitea/landing.yml"
)

Variables

This section is empty.

Functions

func AddPagesDomain

func AddPagesDomain(ctx context.Context, repoID int64, domain string, sslExternal bool) (*repo_model.PagesDomain, error)

AddPagesDomain adds a custom domain for pages

func DisablePages

func DisablePages(ctx context.Context, repo *repo_model.Repository) error

DisablePages disables pages for a repository

func EnablePages

func EnablePages(ctx context.Context, repo *repo_model.Repository, template string) error

EnablePages enables pages for a repository with default config

func GetPagesConfig

func GetPagesConfig(ctx context.Context, repo *repo_model.Repository) (*pages_module.LandingConfig, error)

GetPagesConfig returns the pages configuration for a repository It first tries to load from the database cache, then falls back to parsing the file

func GetPagesDomains

func GetPagesDomains(ctx context.Context, repoID int64) ([]*repo_model.PagesDomain, error)

GetPagesDomains returns all custom domains for a repository's pages

func GetPagesSubdomain

func GetPagesSubdomain(repo *repo_model.Repository) string

GetPagesSubdomain returns the subdomain for a repository's pages

func GetPagesURL

func GetPagesURL(repo *repo_model.Repository) string

GetPagesURL returns the full URL for a repository's pages

func GetRepoByPagesDomain

func GetRepoByPagesDomain(ctx context.Context, domainName string) (*repo_model.Repository, error)

GetRepoByPagesDomain returns the repository for a pages domain

func HasPublicLanding

func HasPublicLanding(ctx context.Context, repo *repo_model.Repository) bool

HasPublicLanding checks if a repository has public landing enabled This allows private repos to have a public-facing landing page

func HasPublicReleases

func HasPublicReleases(ctx context.Context, repo *repo_model.Repository) bool

HasPublicReleases checks if a repository has public releases enabled This allows private repos to have publicly accessible releases

func IsPagesEnabled

func IsPagesEnabled(ctx context.Context, repo *repo_model.Repository) (bool, error)

IsPagesEnabled checks if pages is enabled for a repository

func RemovePagesDomain

func RemovePagesDomain(ctx context.Context, repoID, domainID int64) error

RemovePagesDomain removes a custom domain

func VerifyDomain

func VerifyDomain(ctx context.Context, domainID int64) error

VerifyDomain verifies a custom domain by checking DNS records

Types

This section is empty.

Source Files

  • pages.go

Jump to

Keyboard shortcuts

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