mkaz / lanyon Goto Github PK
View Code? Open in Web Editor NEWmarkdown web server
License: MIT License
markdown web server
License: MIT License
If you move main.go into / then anyone with go installed can "go get github.com/mkaz/lanyon" and then the lanyon binary will be installed in $GOPATH/bin/ automatically.
As it stands you get the following
package github.com/mkaz/lanyon
imports github.com/mkaz/lanyon
imports github.com/mkaz/lanyon: no buildable Go source files in /Users/apokalyptik/gocode/src/github.com/mkaz/lanyon
Add ability to index and search site
Hi, this would be cool to generate binaries for all GO plateforms. This is a matter of minutes using GOX:
go get github.com/mitchellh/gox
gox -build-toolchain
gox
That's it!
Hi when trying to build the script:
go build -o lanyon
I got this error:
# _/home/oumar/lanyon/src
./main.go:387: constant 3600000000000 overflows int
./main.go:387: constant 86400000000000 overflows int
I'm on Ubuntu 14.04!
All request logs are based solely on request data and does not include any information regarding the response from the server. So it does not include info if served a 404 error, size of response or time taken to respond
there is a problem when running on windows. windows
PathSeparator is "", while linux
is "/".
// old
if !strings.HasSuffix(config.PublicDir, "/") {
config.PublicDir = config.PublicDir + "/"
}
// new
separator := string(os.PathSeparator)
if !strings.HasSuffix(config.PublicDir, separator) {
config.PublicDir = config.PublicDir + separator
}
Hi, Good job here. Congrats.
I think the last lessc
version (2.1.1) don't accept more --clean-css
parameter. When used, the CSS file is not generated.
I just removed this parameter and less starts work. Line #231:
cmd := exec.Command(path, "--no-color", "--no-ie-compat", "--silent", "-su=off", "-sm=on", lessfile)
Thank you.
Please helps us to choose by highlighting some differences.
https://github.com/xiam/luminos
and https://github.com/andreaskoch/allmark
In the README.md, the following script:
git clone https://github.com/mkaz/lanyon
cd lanyon/src
go get github.com/russross/blackfriday
go build -o lanyon
It should be:
git clone https://github.com/mkaz/lanyon
cd lanyon
go get github.com/russross/blackfriday
go build -o lanyon
Thus cd lanyon
instead of cd lanyon/src
.
run 'go build -o lanyon'
chmod 0777 lanyon
./lanyon
./lanyon: line 1: syntax error near unexpected token newline' ./lanyon: line 1:
!'
I was playing with the boxed example and changed the template config from templates to simplates. This resulted in:
2014/05/08 11:19:34 127.0.0.1:54052 - [08/May/2014:11:19:34 -0400] "GET / HTTP/1.1"
2014/05/08 11:19:34 http: panic serving 127.0.0.1:54052: runtime error: invalid memory address or nil pointer dereference
goroutine 4 [running]:
net/http.func·009()
/usr/local/go/src/pkg/net/http/server.go:1093 +0xae
runtime.panic(0x6b2900, 0xa55868)
/usr/local/go/src/pkg/runtime/panic.c:248 +0x106
text/template.(*Template).ExecuteTemplate(0x0, 0x7fd189842888, 0xc2100a6d20, 0xc21000ad70, 0x9, ...)
/usr/local/go/src/pkg/text/template/exec.go:112 +0x2e
main.applyTemplates(0xc2100ae34b, 0x4, 0xc2100af6c0, 0x315, 0x704d00, ...)
/home/jamesc/build/lanyon/src/main.go:325 +0x122
main.getMarkdownFile(0xc21000ac90, 0xf, 0x0, 0x0, 0x0, ...)
/home/jamesc/build/lanyon/src/main.go:201 +0x17e
main.getDirectoryListing(0xc21000ac80, 0x6, 0x0, 0x0, 0x0, ...)
/home/jamesc/build/lanyon/src/main.go:157 +0xe5
main.getRequest(0x7fd189842718, 0xc21009f320, 0xc210037750)
/home/jamesc/build/lanyon/src/main.go:112 +0x227
net/http.HandlerFunc.ServeHTTP(0x7ade20, 0x7fd189842718, 0xc21009f320, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc21001e6f0, 0x7fd189842718, 0xc21009f320, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1496 +0x163
net/http.serverHandler.ServeHTTP(0xc21001fbe0, 0x7fd189842718, 0xc21009f320, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1597 +0x16e
net/http.(*conn).serve(0xc21005e780)
/usr/local/go/src/pkg/net/http/server.go:1167 +0x7b7
created by net/http.(*Server).Serve
/usr/local/go/src/pkg/net/http/server.go:1644 +0x28b
Build was done with Go 1.2.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.