Help

Provides Markdown help files that integrate into the UI

Technology

The help module provides integrated contextual help for Project Forge applications. It enables developers to embed Markdown-based documentation directly into their applications, with automatic help links and modal displays. When available for a page, a help icon will be included in the UI, no JavaScript required.

Overview

This module provides:

Key Features

Automatic Help Links

Markdown Processing

Flexible Content Organization

Usage

Controller Integration

Each controller action can automatically display help by matching the action key to a help file:

1
2
3
4
5
6
func HomeAction(w http.ResponseWriter, r *http.Request) {
controller.Act("home", w, r, func(as *app.State, ps *cutil.PageState) (string, error) {
// If help/home.md exists, a help link will appear in navigation
return controller.Render(r, as, page, ps)
})
}

In this case, it would attempt to read help/home.md and show an icon in the header of the UI.

Help File Structure

Help files are organized in the help/ directory:

help/
├── home.md         # Help for "home" action key
├── about.md        # Help for "about" action key  
├── _header.md      # Optional global header content
└── _footer.md      # Optional global footer content

Content Templates

Help files support Go template syntax with project data:

1
2
3
# Welcome to {{{ .Name }}}

This application was generated by Project Forge and includes...

Conditional Generation

Files prefixed with ! in the header are disabled by default:

1
2
3
# !About Page

Remove the `!` prefix to enable this help file.

Best Practices

Help Content Organization

Markdown Guidelines

User Experience

Source Code

See Also