docs

package
v1.0.1-0...-a4f66ab Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

README

docs

This pkg is currently design markdown IN and spits out HTML.

Currently is dynamic.

Plan is to allow it to work off any folder that is the docs root.

we then any github repo with a .docs in it is well known to the system. We might have to introduce the concept of a spurce reposity though, so that anyone using this, can configure a repo and Infra will pull it and use the docs inside the repo. Lets first wprk it ut properly though.

i suspect we need to get caddy into the system first, so that on FLY caddy is running . CADDY is part of the pkg/cmd but i am not sure its right for it to be there.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NavItem struct {
	Title string
	Path  string
}

NavItem represents a navigation item

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer handles markdown to HTML conversion

func NewRenderer

func NewRenderer() *Renderer

NewRenderer creates a new markdown renderer

func (*Renderer) RenderToHTML

func (r *Renderer) RenderToHTML(markdown []byte) (string, error)

RenderToHTML converts markdown content to HTML

func (*Renderer) RenderToHTMLPage

func (r *Renderer) RenderToHTMLPage(title string, htmlContent string, nav []NavItem) string

RenderToHTMLPage wraps HTML content in a basic HTML page structure

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service handles documentation serving from both filesystem and embedded sources

func New

func New(devMode bool, docsDir string) *Service

New creates a new docs service

func (*Service) GetNavigation

func (s *Service) GetNavigation() []NavItem

GetNavigation returns the navigation items

func (*Service) ReadFile

func (s *Service) ReadFile(filePath string) ([]byte, error)

ReadFile reads a document file from either filesystem or embedded source

Jump to

Keyboard shortcuts

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