├── bin ├── root │ ├── pages │ │ └── about.md │ ├── pages.yml │ ├── templates │ │ └── default │ │ │ ├── common │ │ │ ├── nav.tpl │ │ │ ├── footer.tpl │ │ │ └── header.tpl │ │ │ ├── pages.tpl │ │ │ ├── rss.tpl │ │ │ ├── archive.tpl │ │ │ ├── category.tpl │ │ │ ├── index.tpl │ │ │ ├── tag.tpl │ │ │ └── posts.tpl │ ├── assets │ │ └── themes │ │ │ └── default │ │ │ ├── ds.png │ │ │ ├── rss.png │ │ │ ├── plugin │ │ │ └── prettify │ │ │ │ ├── prettify.css │ │ │ │ ├── prettify_light.css │ │ │ │ ├── prettify_night.css │ │ │ │ ├── normalize.css │ │ │ │ └── prettify.js │ │ │ ├── main.css │ │ │ └── jquery.js │ ├── nav.yml │ ├── posts │ │ ├── hello.md │ │ └── world.md │ └── config.yml └── gosk.go ├── .gitignore ├── strutil_test.go ├── yamlparser_test.go ├── strutil.go ├── yamlparser.go ├── LICENSE ├── app.go ├── render_test.go ├── config.go ├── README.md └── render.go /bin/root/pages/about.md: -------------------------------------------------------------------------------- 1 | hello world! -------------------------------------------------------------------------------- /bin/root/pages.yml: -------------------------------------------------------------------------------- 1 | - id: about 2 | title: About -------------------------------------------------------------------------------- /bin/root/templates/default/common/nav.tpl: -------------------------------------------------------------------------------- 1 | {{define "nav"}} 2 | 3 | {{end}} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.exe 4 | # Generated files # 5 | /bin/publish/ 6 | -------------------------------------------------------------------------------- /bin/root/assets/themes/default/ds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottkiss/gosk/HEAD/bin/root/assets/themes/default/ds.png -------------------------------------------------------------------------------- /bin/root/assets/themes/default/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottkiss/gosk/HEAD/bin/root/assets/themes/default/rss.png -------------------------------------------------------------------------------- /bin/root/nav.yml: -------------------------------------------------------------------------------- 1 | - label: About 2 | href: /pages/about.html 3 | target: _self 4 | 5 | - label: github 6 | href: https://github.com/scottkiss/gosk 7 | target: _blank -------------------------------------------------------------------------------- /bin/root/posts/hello.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2013-05-04 18:52:00 3 | title: hello title 4 | categories: 5 | - jvm 6 | tags: 7 | - jvm 8 | --- 9 | 一、aaaa 10 | --------- 11 | some more more 12 | 13 | 二、bbb 14 | --------- 15 | aaa 16 | 17 | -------------------------------------------------------------------------------- /strutil_test.go: -------------------------------------------------------------------------------- 1 | package gosk 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestTrimHTML(t *testing.T) { 8 | str := " test 3 |
8 | 9 | 10 |