diff --git a/.travis.yml b/.travis.yml index 93a710af..d9c6b27c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,5 +13,5 @@ install: - go install github.com/caddyserver/caddydev - go generate script: - - caddydev --output="caddy" --source="." staticmin + - caddydev --output="caddy" --source="." caddy-cms - go test ./... diff --git a/README.md b/README.md index c28d4231..96285120 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# staticmin +# caddy-cms -[![Build](https://img.shields.io/travis/hacdias/staticmin.svg?style=flat-square)](https://travis-ci.org/hacdias/staticmin) -[![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/hacdias/staticmin) +[![Build](https://img.shields.io/travis/hacdias/caddy-cms.svg?style=flat-square)](https://travis-ci.org/hacdias/caddy-cms) +[![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/hacdias/caddy-cms) Deploy your Hugo website and enjoy of an admin interface with Caddy server. ## Configuration ``` -staticmin { +caddy-cms { styles file hugo true / false # default is true command command # needed when hugo is false @@ -37,7 +37,7 @@ If you want to go deeper and make changes in front-end assets like JavaScript or ### 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 ```staticmin```. 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 ```caddy-cms```. Then execute: ``` go-bindata [-debug] -pkg assets -o assets/assets.go templates/ assets/css/ assets/js/ assets/fonts/ @@ -58,17 +58,17 @@ errors { 404 404.html } -staticmin +caddy-cms ``` -After creating the file, navigate to that folder using the terminal and run the following command, replacing ```{staticmin}``` with the location of your clone. +After creating the file, navigate to that folder using the terminal and run the following command, replacing ```{caddy-cms}``` with the location of your clone. ``` -caddydev --source {staticmin} hugo +caddydev --source {caddy-cms} hugo ``` Navigate to ```localhost:8080``` to see your blog running on Caddy and Hugo. Go to ```/admin``` to try the Admin UI. The default user name is ```admin```, so is the password. You may change in your Caddyfile. 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 ```staticmin``` 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 ```caddy-cms``` clone. Then, run ```grunt watch```. diff --git a/browse/browse.go b/browse/browse.go index 8ebb981a..3c33e017 100644 --- a/browse/browse.go +++ b/browse/browse.go @@ -4,7 +4,7 @@ import ( "net/http" "strings" - "github.com/hacdias/staticmin/config" + "github.com/hacdias/caddy-cms/config" ) // ServeHTTP is used to serve the content of Browse page diff --git a/browse/get.go b/browse/get.go index 609b41f2..82cce6d7 100644 --- a/browse/get.go +++ b/browse/get.go @@ -4,8 +4,8 @@ import ( "net/http" "text/template" - "github.com/hacdias/staticmin/config" - "github.com/hacdias/staticmin/utils" + "github.com/hacdias/caddy-cms/config" + "github.com/hacdias/caddy-cms/utils" "github.com/mholt/caddy/middleware" "github.com/mholt/caddy/middleware/browse" ) diff --git a/browse/post.go b/browse/post.go index 38fec511..32c6eee8 100644 --- a/browse/post.go +++ b/browse/post.go @@ -10,7 +10,7 @@ import ( "os" "strings" - "github.com/hacdias/staticmin/utils" + "github.com/hacdias/caddy-cms/utils" ) // POST handles the POST method on browse page diff --git a/staticmin.go b/cms.go similarity index 93% rename from staticmin.go rename to cms.go index eeed046a..4fa085d3 100644 --- a/staticmin.go +++ b/cms.go @@ -2,7 +2,7 @@ //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/ -package staticmin +package cms import ( "mime" @@ -11,11 +11,11 @@ import ( "path/filepath" "strings" - "github.com/hacdias/staticmin/assets" - "github.com/hacdias/staticmin/browse" - "github.com/hacdias/staticmin/config" - "github.com/hacdias/staticmin/editor" - "github.com/hacdias/staticmin/utils" + "github.com/hacdias/caddy-cms/assets" + "github.com/hacdias/caddy-cms/browse" + "github.com/hacdias/caddy-cms/config" + "github.com/hacdias/caddy-cms/editor" + "github.com/hacdias/caddy-cms/utils" "github.com/mholt/caddy/config/setup" "github.com/mholt/caddy/middleware" ) diff --git a/editor/editor.go b/editor/editor.go index 00904f25..3fb4d781 100644 --- a/editor/editor.go +++ b/editor/editor.go @@ -4,7 +4,7 @@ import ( "net/http" "strings" - "github.com/hacdias/staticmin/config" + "github.com/hacdias/caddy-cms/config" ) // ServeHTTP serves the editor page diff --git a/editor/get.go b/editor/get.go index 4f413642..06bd90c6 100644 --- a/editor/get.go +++ b/editor/get.go @@ -10,9 +10,9 @@ import ( "strings" "text/template" - "github.com/hacdias/staticmin/config" - "github.com/hacdias/staticmin/frontmatter" - "github.com/hacdias/staticmin/utils" + "github.com/hacdias/caddy-cms/config" + "github.com/hacdias/caddy-cms/frontmatter" + "github.com/hacdias/caddy-cms/utils" "github.com/spf13/hugo/parser" ) diff --git a/editor/post.go b/editor/post.go index a66b4a30..e2ce9ec1 100644 --- a/editor/post.go +++ b/editor/post.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/hacdias/staticmin/config" - "github.com/hacdias/staticmin/utils" + "github.com/hacdias/caddy-cms/config" + "github.com/hacdias/caddy-cms/utils" "github.com/robfig/cron" "github.com/spf13/hugo/parser" ) diff --git a/frontmatter/frontmatter.go b/frontmatter/frontmatter.go index 8c75040c..f65d2778 100644 --- a/frontmatter/frontmatter.go +++ b/frontmatter/frontmatter.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/hacdias/staticmin/utils" + "github.com/hacdias/caddy-cms/utils" "github.com/spf13/hugo/parser" ) diff --git a/package.json b/package.json index ebf6f8ca..98ba9378 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,18 @@ { - "name": "staticmin", + "name": "caddy-cms", "version": "1.0.0", "description": "Deploy your Hugo website and enjoy of an admin interface with Caddy server.", "repository": { "type": "git", - "url": "git+https://github.com/hacdias/staticmin.git" + "url": "git+https://github.com/hacdias/caddy-cms.git" }, "main": "Gruntfile.js", "author": "Henrique Dias ", "license": "MIT", "bugs": { - "url": "https://github.com/hacdias/staticmin/issues" + "url": "https://github.com/hacdias/caddy-cms/issues" }, - "homepage": "https://github.com/hacdias/staticmin#readme", + "homepage": "https://github.com/hacdias/caddy-cms#readme", "scripts": { "install": "napa defunkt/jquery-pjax" }, diff --git a/utils/utils.go b/utils/utils.go index 416d3342..9144ba60 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -12,8 +12,8 @@ import ( "text/template" "unicode" - "github.com/hacdias/staticmin/assets" - "github.com/hacdias/staticmin/config" + "github.com/hacdias/caddy-cms/assets" + "github.com/hacdias/caddy-cms/config" "github.com/spf13/hugo/commands" )