updates
This commit is contained in:
parent
750d72b2e7
commit
8f94827723
10
README.md
10
README.md
|
@ -1,4 +1,4 @@
|
||||||
# Hugo add-on for Caddy
|
# staticmin
|
||||||
|
|
||||||
[](https://travis-ci.org/hacdias/staticmin)
|
[](https://travis-ci.org/hacdias/staticmin)
|
||||||
[](http://godoc.org/github.com/hacdias/staticmin)
|
[](http://godoc.org/github.com/hacdias/staticmin)
|
||||||
|
@ -8,11 +8,7 @@ Deploy your Hugo website and enjoy of an admin interface with Caddy server.
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
```
|
```
|
||||||
<<<<<<< HEAD
|
|
||||||
staticmin {
|
staticmin {
|
||||||
=======
|
|
||||||
cms {
|
|
||||||
>>>>>>> 7b68c78b12d9b7aee61788d5e85cd3b0722906de
|
|
||||||
styles file
|
styles file
|
||||||
hugo true / false # default is true
|
hugo true / false # default is true
|
||||||
command command # needed when hugo is false
|
command command # needed when hugo is false
|
||||||
|
@ -41,7 +37,7 @@ If you want to go deeper and make changes in front-end assets like JavaScript or
|
||||||
|
|
||||||
### Run it
|
### Run it
|
||||||
|
|
||||||
If you have already installed everything above to meet the requirements for what you want to do, let's start. Firstly, open the terminal and navigate to your clone of ```caddy-hugo```. Then execute:
|
If you have already installed everything above to meet the requirements for what you want to do, let's start. Firstly, open the terminal and navigate to your clone of ```staticmin```. Then execute:
|
||||||
|
|
||||||
```
|
```
|
||||||
go-bindata [-debug] -pkg assets -o assets/assets.go templates/ assets/css/ assets/js/ assets/fonts/
|
go-bindata [-debug] -pkg assets -o assets/assets.go templates/ assets/css/ assets/js/ assets/fonts/
|
||||||
|
@ -75,4 +71,4 @@ Navigate to ```localhost:8080``` to see your blog running on Caddy and Hugo. Go
|
||||||
|
|
||||||
Everything is working now. Whenever you make a change in the back-end source code, you'll have to run the command above again.
|
Everything is working now. Whenever you make a change in the back-end source code, you'll have to run the command above again.
|
||||||
|
|
||||||
**For those who want to make changes in front-end**, make sure you have every needed tool installed and run ```npm install``` in the root of ```caddy-hugo``` clone. Then, run ```grunt watch```.
|
**For those who want to make changes in front-end**, make sure you have every needed tool installed and run ```npm install``` in the root of ```staticmin``` clone. Then, run ```grunt watch```.
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-hugo/config"
|
"github.com/hacdias/staticmin/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ServeHTTP is used to serve the content of Browse page
|
// ServeHTTP is used to serve the content of Browse page
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-hugo/config"
|
"github.com/hacdias/staticmin/config"
|
||||||
"github.com/hacdias/caddy-hugo/utils"
|
"github.com/hacdias/staticmin/utils"
|
||||||
"github.com/mholt/caddy/middleware"
|
"github.com/mholt/caddy/middleware"
|
||||||
"github.com/mholt/caddy/middleware/browse"
|
"github.com/mholt/caddy/middleware/browse"
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-hugo/utils"
|
"github.com/hacdias/staticmin/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// POST handles the POST method on browse page
|
// POST handles the POST method on browse page
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-hugo/config"
|
"github.com/hacdias/staticmin/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type editor struct {
|
type editor struct {
|
||||||
|
|
|
@ -10,9 +10,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-hugo/config"
|
"github.com/hacdias/staticmin/config"
|
||||||
"github.com/hacdias/caddy-hugo/frontmatter"
|
"github.com/hacdias/staticmin/frontmatter"
|
||||||
"github.com/hacdias/caddy-hugo/utils"
|
"github.com/hacdias/staticmin/utils"
|
||||||
"github.com/spf13/hugo/parser"
|
"github.com/spf13/hugo/parser"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-hugo/config"
|
"github.com/hacdias/staticmin/config"
|
||||||
"github.com/hacdias/caddy-hugo/utils"
|
"github.com/hacdias/staticmin/utils"
|
||||||
"github.com/robfig/cron"
|
"github.com/robfig/cron"
|
||||||
"github.com/spf13/hugo/parser"
|
"github.com/spf13/hugo/parser"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-hugo/utils"
|
"github.com/hacdias/staticmin/utils"
|
||||||
"github.com/spf13/hugo/parser"
|
"github.com/spf13/hugo/parser"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
{
|
{
|
||||||
"name": "caddy-hugo",
|
"name": "staticmin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Deploy your Hugo website and enjoy of an admin interface with Caddy server.",
|
"description": "Deploy your Hugo website and enjoy of an admin interface with Caddy server.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/hacdias/caddy-hugo.git"
|
"url": "git+https://github.com/hacdias/staticmin.git"
|
||||||
},
|
},
|
||||||
"main": "Gruntfile.js",
|
"main": "Gruntfile.js",
|
||||||
"author": "Henrique Dias <hacdias@gmail.com>",
|
"author": "Henrique Dias <hacdias@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/hacdias/caddy-hugo/issues"
|
"url": "https://github.com/hacdias/staticmin/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/hacdias/caddy-hugo#readme",
|
"homepage": "https://github.com/hacdias/staticmin#readme",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install": "napa defunkt/jquery-pjax"
|
"install": "napa defunkt/jquery-pjax"
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
//go:generate go install github.com/jteeuwen/go-bindata/go-bindata
|
//go:generate go install github.com/jteeuwen/go-bindata/go-bindata
|
||||||
//go:generate go-bindata -pkg assets -o assets/assets.go templates/ assets/css/ assets/js/ assets/fonts/
|
//go:generate go-bindata -pkg assets -o assets/assets.go templates/ assets/css/ assets/js/ assets/fonts/
|
||||||
|
|
||||||
package cms
|
package staticmin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mime"
|
"mime"
|
||||||
|
@ -11,11 +11,11 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-hugo/assets"
|
"github.com/hacdias/staticmin/assets"
|
||||||
"github.com/hacdias/caddy-hugo/browse"
|
"github.com/hacdias/staticmin/browse"
|
||||||
"github.com/hacdias/caddy-hugo/config"
|
"github.com/hacdias/staticmin/config"
|
||||||
"github.com/hacdias/caddy-hugo/editor"
|
"github.com/hacdias/staticmin/editor"
|
||||||
"github.com/hacdias/caddy-hugo/utils"
|
"github.com/hacdias/staticmin/utils"
|
||||||
"github.com/mholt/caddy/config/setup"
|
"github.com/mholt/caddy/config/setup"
|
||||||
"github.com/mholt/caddy/middleware"
|
"github.com/mholt/caddy/middleware"
|
||||||
)
|
)
|
|
@ -12,8 +12,8 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-hugo/assets"
|
"github.com/hacdias/staticmin/assets"
|
||||||
"github.com/hacdias/caddy-hugo/config"
|
"github.com/hacdias/staticmin/config"
|
||||||
"github.com/spf13/hugo/commands"
|
"github.com/spf13/hugo/commands"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue