site

package
v0.0.0-...-91e4906 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Overview

Package site implements generation of content for serving from go.dev. It is meant to support a transition from being a Hugo-based web site to being a site compatible with x/website.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Site

type Site struct {
	URL   string
	Title string
	// contains filtered or unexported fields
}

A Site holds metadata about the entire site.

func Load

func Load(dir string) (*Site, error)

Load loads and returns the site in the directory rooted at dir.

func (*Site) Open

func (site *Site) Open(name string) (http.File, error)

Open returns the content to serve at the given path. This function makes Site an http.FileServer, for easy HTTP serving.

Jump to

Keyboard shortcuts

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