docs

package
v0.0.0-...-60192f8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package docs handles Readeck's documentation files and HTTP routes.

Index

Constants

This section is empty.

Variables

Files contains all the generated help files as an http.FS instance.

Functions

func SetupRoutes

func SetupRoutes(s *server.Server)

SetupRoutes mounts the routes for the auth domain.

Types

type File

type File struct {
	Route      string         `json:"route"`
	Aliases    []string       `json:"aliases"`
	File       string         `json:"file"`
	Etag       string         `json:"etag"`
	IsDocument bool           `json:"is_document"`
	Title      string         `json:"title"`
	Meta       map[string]any `json:"meta"`
}

File is a documentation file.

func (*File) GetSumStrings

func (f *File) GetSumStrings() []string

GetSumStrings implements the Etager interface.

type Manifest

type Manifest struct {
	Files    map[string]*File    `json:"files"`
	Sections map[string]*Section `json:"sections"`
}

Manifest is the documentation files manifest.

type Section

type Section struct {
	Files map[string]*File `json:"files"`
	TOC   [][2]string      `json:"toc"`
}

Section is a documentation language section.

Jump to

Keyboard shortcuts

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