StaticGen update Bash

Update zh-cn.yaml (#194)

Address #184

build assets

Update zh-cn.yaml (#194)
This commit is contained in:
Henrique Dias committed 2017-08-10 11:08:50 +01:00
1 parent 9819c87853
commit da4fd84002
28 files changed
+986 -1199

No files matched your search

+2 -9
View File
@@ -11,7 +11,6 @@ import (
"strings"
"github.com/hacdias/filemanager"
"github.com/hacdias/filemanager/plugins"
"github.com/hacdias/fileutils"
"github.com/mholt/caddy"
"github.com/mholt/caddy/caddyhttp/httpserver"
@@ -112,7 +111,6 @@ func parse(c *caddy.Controller) ([]*filemanager.FileManager, error) {
AllowCommands: true,
AllowEdit: true,
AllowNew: true,
Permissions: map[string]bool{},
Commands: []string{"git", "svn", "hg"},
Rules: []*filemanager.Rule{{
Regex: true,
@@ -128,20 +126,15 @@ func parse(c *caddy.Controller) ([]*filemanager.FileManager, error) {
}
// Initialize the default settings for Hugo.
hugo := &plugins.Hugo{
hugo := &filemanager.Hugo{
Root: directory,
Public: filepath.Join(directory, "public"),
Args: []string{},
CleanPublic: true,
}
// Try to find the Hugo executable path.
if err = hugo.Find(); err != nil {
return nil, err
}
// Attaches Hugo plugin to this file manager instance.
err = m.ActivatePlugin("hugo", hugo)
err = m.EnableStaticGen(hugo)
if err != nil {
return nil, err
}