Add support for custom footer

This commit is contained in:
Tom Wiesing 2023-01-08 08:13:47 +01:00
parent 9f3e7a7b86
commit a292c25f84
No known key found for this signature in database
7 changed files with 60 additions and 3 deletions

View file

@ -0,0 +1,22 @@
package custom
import (
"path/filepath"
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
)
// CustomAssetsPath is the path custom assets are stored at
func (custom *Custom) CustomAssetsPath() string {
return filepath.Join(custom.Config.DeployRoot, "core", "assets")
}
func (custom *Custom) FooterPath() string {
return filepath.Join(custom.CustomAssetsPath(), "footer.html")
}
func (custom *Custom) BackupName() string { return "custom" }
func (custom *Custom) Backup(context component.StagingContext) error {
return context.CopyDirectory("", custom.CustomAssetsPath())
}