pagefind

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Overview

Package pagefind provides access to the pagefind CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	// Pagefind is the path to the pagefind executable.
	// If unset, we'll search $PATH.
	Pagefind string

	// Log is the logger to use for the output of the pagefind command.
	Log *log.Logger
}

CLI is a handle to the pagefind CLI, which is used to generate a search index for the documentation.

func (*CLI) Index

func (c *CLI) Index(ctx context.Context, req IndexRequest) error

Index generates a search index for a provided website.

type IndexRequest

type IndexRequest struct {
	// SiteDir is the path to the static website to index.
	SiteDir string // required

	// Path to the directory where pagefind assets are stored
	// relative to SiteDir.
	AssetSubdir string
}

IndexRequest is a request to generate a search index for a website.

Jump to

Keyboard shortcuts

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