Documentation
¶
Overview ¶
Package generator provides functions to generate manifest.json and llms.txt files.
Index ¶
- func WriteLLMsFull(path string, docs []*Document, project config.ProjectConfig, dryRun bool) error
- func WriteLLMsTxt(path string, docs []*Document, cfg *config.Config, dryRun bool) error
- func WriteManifest(path string, m *Manifest, dryRun bool) error
- func WriteTags(path string, tags *TagsFile, dryRun bool) error
- type Document
- type Manifest
- type TagInfo
- type TagsFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteLLMsFull ¶
WriteLLMsFull generates the complete document index file.
func WriteLLMsTxt ¶
WriteLLMsTxt generates or updates the root llms.txt navigation file. If the file already exists, it is not overwritten unless force is true.
func WriteManifest ¶
WriteManifest writes the manifest to disk.
Types ¶
type Document ¶
type Document struct {
Path string
Frontmatter *docparser.Frontmatter
Section string // From SUMMARY.md structure
}
Document represents a processed documentation file.
type Manifest ¶
type Manifest struct {
KnowledgeBase map[string]any `json:"knowledgeBase"`
Documents []map[string]any `json:"documents"`
Sections map[string]any `json:"sections"`
Metadata map[string]any `json:"metadata"`
}
Manifest represents the complete manifest.json structure.
func GenerateManifest ¶
func GenerateManifest(docs []*Document, project config.ProjectConfig) *Manifest
GenerateManifest creates a manifest from processed documents.
Click to show internal directories.
Click to hide internal directories.