updated docs to not include drone javascript files when generated

This commit is contained in:
Brad Rydzewski 2015-10-07 15:36:46 -07:00
parent cd86948cff
commit 5ba7dad0dc
5 changed files with 10 additions and 24 deletions

View file

@ -55,6 +55,5 @@ docs:
mkdir -p /drone/tmp/docs
mkdir -p /drone/tmp/static
cp -a static/docs_gen/* /drone/tmp/docs/
cp -a static/scripts_gen /drone/tmp/static/
cp -a static/styles_gen /drone/tmp/static/
cp -a static/images /drone/tmp/static/

View file

@ -29,4 +29,8 @@ block content
ul
#{Site.Nav.HTML}
div.content-main
#{Page.HTML}
#{Page.HTML}
block scripts
script[type="text/javascript"][src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"]
script[type="text/javascript"][src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/js/bootstrap.min.js"]

View file

@ -67,4 +67,8 @@ block content
if $res.IsArray
pre [#{$res.Example}]
else if $res.IsObject
pre #{$res.Example}
pre #{$res.Example}
block scripts
script[type="text/javascript"][src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"]
script[type="text/javascript"][src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/js/bootstrap.min.js"]

View file

@ -1,10 +0,0 @@
package gogitlab
import (
"net/url"
"strings"
)
func encodeParameter(value string) string {
return strings.Replace(url.QueryEscape(value), "/", "%2F", 0)
}

View file

@ -1,11 +0,0 @@
package gogitlab
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestParameterEncoding(t *testing.T) {
assert.Equal(t, encodeParameter("namespace/project"), "namespace%2Fproject")
assert.Equal(t, encodeParameter("14"), "14")
}