Documentation
¶
Index ¶
- type Layout
- func (l *Layout) AddCSSFile(file string) *Layout
- func (l *Layout) AddJSFile(file string) *Layout
- func (l *Layout) AddNavItem(item NavItem) *Layout
- func (l *Layout) EnableSearchFunction(enable bool) *Layout
- func (l *Layout) GenerateLayout() error
- func (l *Layout) RenderPage(content template.HTML, outputPath string) error
- func (l *Layout) SetBaseURL(url string) *Layout
- func (l *Layout) SetCustomCSS(css string) *Layout
- func (l *Layout) SetCustomJS(js string) *Layout
- func (l *Layout) SetDocTitle(title string) *Layout
- func (l *Layout) SetFooter(footer string) *Layout
- func (l *Layout) SetGoogleAnalyticsID(id string) *Layout
- func (l *Layout) SetLogoURL(url string) *Layout
- func (l *Layout) SetOutputDir(dir string) *Layout
- func (l *Layout) SetProjectName(name string) *Layout
- func (l *Layout) SetTheme(theme string) *Layout
- func (l *Layout) SetTitle(title string) *Layout
- func (l *Layout) SetVersion(version string) *Layout
- type NavItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
type Layout struct {
// 页面标题
Title string
// 文档标题
DocTitle string
// 项目名称
ProjectName string
// 项目版本
Version string
// 基础URL
BaseURL string
NavItems []NavItem
// CSS文件列表
CSSFiles []string
// JS文件列表
JSFiles []string
// 自定义CSS代码
CustomCSS string
// 自定义JS代码
CustomJS string
Footer string
// Logo URL
LogoURL string
// 是否启用搜索
EnableSearch bool
// Google Analytics ID
GoogleAnalyticsID string
// 输出目录
OutputDir string
// 主题
Theme string
}
Layout 表示文档UI的布局
func (*Layout) EnableSearchFunction ¶
EnableSearchFunction 启用搜索功能
func (*Layout) RenderPage ¶
RenderPage 渲染页面
func (*Layout) SetCustomCSS ¶
SetCustomCSS 设置自定义CSS
func (*Layout) SetGoogleAnalyticsID ¶
SetGoogleAnalyticsID 设置Google Analytics ID
func (*Layout) SetProjectName ¶
SetProjectName 设置项目名称
Click to show internal directories.
Click to hide internal directories.