Files
aego/engine/docs/navigation_icons.go
sanspie 768a59fdd6
ci-platforms / darwin amd64 smoke (push) Skipped
ci-platforms / windows amd64 smoke (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
GitHub / windows amd64 native GitHub-hosted native CI: failure
GitHub / darwin arm64 native GitHub-hosted native CI: failure
GitHub / darwin amd64 native GitHub-hosted native CI: failure
GitHub / linux amd64 native GitHub-hosted native CI: success
github-native / gitea-pending (push) Skipped
github-native / darwin amd64 native (push) Skipped
github-native / linux amd64 native (push) Skipped
github-native / windows amd64 native (push) Skipped
github-native / darwin arm64 native (push) Skipped
github-native / gitea-result (push) Skipped
ci / checks (push) Failing after 25m31s
ci / build (amd64, linux, ubuntu-24.04) (push) Failing after 9m28s
ci / release (push) Skipped
editor: show documentation navigation icons
2026-11-10 02:20:58 +03:00

30 lines
818 B
Go

//go:build !aego_runtime
package docs
import "maps"
// SetNavigationIcons installs host-provided presentation overrides. It copies
// the maps so a caller cannot change a registry by retaining its inputs.
// Configure a registry before it is used by a documentation view.
func (r *Registry) SetNavigationIcons(tasks, references map[string]string) {
r.navTasks = maps.Clone(tasks)
r.navReferences = maps.Clone(references)
}
// NavigationTaskIcon is the task-specific override, before entry metadata.
func (r *Registry) NavigationTaskIcon(id string) string {
if r == nil {
return ""
}
return r.navTasks[id]
}
// NavigationReferenceIcon is the reference override, after entry metadata.
func (r *Registry) NavigationReferenceIcon(id string) string {
if r == nil {
return ""
}
return r.navReferences[id]
}