1package gitweb23import (4 "html/template"56 "github.com/go-git/go-git/v5"7)89const (10 // Name of the depp-specific Git configuration section.11 confSec = "depp"12)1314type Config struct {15 HeaderExtra template.HTML16}1718func loadConfig(repo *git.Repository) (Config, error) {19 c, err := repo.Config()20 if err != nil {21 return Config{}, err22 }2324 raw := c.Raw25 if !raw.HasSection(confSec) {26 return Config{}, nil27 }2829 sec := raw.Section(confSec)30 cnf := Config{31 HeaderExtra: template.HTML(sec.Option("extra-head-content")),32 }3334 return cnf, nil35}