StaticGen update Bash

Update zh-cn.yaml (#194)

Address #184

build assets

Update zh-cn.yaml (#194)


Former-commit-id: 4572f93371647c0a6b53cc375ec5bb00356a37c9 [formerly e58e4793ac0ca6915b605d7b2a8a77f0aec31172] [formerly 43635f6b98f546ec0e2656d26031388aef63a902 [formerly da4fd84002f4cac1d4e04f65c96237a553203d83]]
Former-commit-id: 15422887ad29dea63bdf861d9da8f8d28b4fbc8f [formerly 3949ffa499cf999c3f4b50ee18802c0f87a23807]
Former-commit-id: fac5ceeee3fa969239d9ef5e04ef5542a61d2761
This commit is contained in:
Henrique Dias
2017-08-09 15:06:28 +01:00
parent bfdb924cb7
commit d5e943069e
28 changed files with 689 additions and 902 deletions

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
}