From d3a1ab071c983586b474c5e5dc0fa6afb0babce8 Mon Sep 17 00:00:00 2001 From: olOwOlo <26087907+olOwOlo@users.noreply.github.com> Date: Tue, 10 Jul 2018 01:05:41 +0800 Subject: docs(exampleSite): update for chroma --- exampleSite/content/post/syntax-highlighting.md | 66 +++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'exampleSite/content/post/syntax-highlighting.md') diff --git a/exampleSite/content/post/syntax-highlighting.md b/exampleSite/content/post/syntax-highlighting.md index b2f0770..9e5558d 100644 --- a/exampleSite/content/post/syntax-highlighting.md +++ b/exampleSite/content/post/syntax-highlighting.md @@ -98,3 +98,69 @@ object HelloWorld with Application { ```python print("Hello, World!") ``` + +```go-html-template + + + + {{ .Title }} + + +

{{ .Title }}

+ {{ .Content }} + + +``` + +```go-html-template +{{ partial "header.html" . }} + +

posts

+ {{ range first 10 .Data.Pages }} + {{ if eq .Type "post"}} +

{{ .Title }}

+ {{ end }} + {{ end }} + +

pages

+ {{ range .Data.Pages }} + {{ if or (eq .Type "page") (eq .Type "about") }} +

{{ .Type }} - {{ .Title }} - {{ .RelPermalink }}

+ {{ end }} + {{ end }} + +{{ partial "footer.html" . }} +``` + +--- + +Detect the language + +``` +package hello + +fun main(args: Array) { + println("Hello World!") +} +``` + +``` + +``` + +--- + +By `{{}}..{{}}` + +{{< highlight go-html-template "linenos=table,hl_lines=1 3-7,linenostart=199" >}} +
+
+

{{ .Title }}

+ {{ range .Data.Pages }} + {{ .Render "summary"}} + {{ end }} +
+
+{{< / highlight >}} -- cgit v1.2.3