I want to include a source code saved externally from article file.
- content/post/article.md
# this is title
this is source code
{{< highlight go "/code/sample.go" >}}
- static/code/sample.go
func main() {
fmt.Printf("hello, world!\n")
}
this hope to be equivalent of :
- content/post/article.md
# this is title
this is source code
{{< highlight go >}}
func main() {
fmt.Printf("hello, world!\n")
}
{{< /highlight >}}
I read this page, but all ways seem to require “copy and paste” on markdown file.
This feature is available on Octopress : http://octopress.org/docs/plugins/include-code/ (but generate commapnd takes so long time.)
Thank you.