├── LICENSE
├── README.md
├── archetypes
└── default.md
├── exampleSite
├── archetypes
│ └── default.md
├── config.toml
├── content
│ ├── about.md
│ └── posts
│ │ ├── post-1.md
│ │ ├── post-2.md
│ │ ├── post-3.md
│ │ ├── post-4.md
│ │ ├── post-5.md
│ │ └── post-6.md
└── deploy.sh
├── images
├── screenshot.png
└── tn.png
├── layouts
├── 404.html
├── _default
│ ├── baseof.html
│ ├── list.html
│ └── single.html
└── partials
│ ├── comments.html
│ ├── foot.html
│ ├── head.html
│ ├── navigation.html
│ └── scripts.html
├── static
├── css
│ ├── fonts.css
│ └── simpleness.css
├── fonts
│ ├── License.txt
│ ├── PTSans-Bold.woff
│ ├── PTSans-Regular.woff
│ └── Scriptin.ttf
└── js
│ └── lazyload.min.js
└── theme.toml
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (C) 2020 Rainer Chiang
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 | of the Software, and to permit persons to whom the Software is furnished to do
10 | so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hugo Theme: Simpleness
2 |
3 | Simpleness is a concise theme for hugo which is ported from [contrast-hugo](https://github.com/niklasbuschmann/contrast-hugo).
4 |
5 | 
6 |
7 | ## Live Demo
8 |
9 | - https://rainerchiang.github.io/simpleness/
10 | - https://rainerchiang.github.io
11 |
12 | ## Features
13 |
14 | - MathJax suport
15 | - Google Analytics support
16 | - Comment systems include: disqus, valine
17 | - Table of content
18 |
19 | ## TODO
20 |
21 | - [ ] Pagination for posts
22 |
23 | ## Quick Start
24 |
25 | ### 1. Install Hugo
26 |
27 | [Download](https://github.com/gohugoio/hugo/releases) the appropriate version for your platform.
28 |
29 | I used [hugo_extended_0.75.1_Linux-64bit.deb](https://github.com/gohugoio/hugo/releases/download/v0.75.1/hugo_extended_0.75.1_Linux-64bit.deb) to develop this theme.
30 |
31 | ### 2. Create a New Site
32 |
33 | ```shell
34 | hugo new site myBlog
35 | ```
36 |
37 | ### 3. Use hugo theme simpleness
38 |
39 | ```shell
40 | cd myBlog
41 | git init
42 | git submodule add https://github.com/RainerChiang/simpleness.git themes/simpleness
43 | ```
44 |
45 | copy the content of exampleSite
46 |
47 | ```shell
48 | cp themes/simpleness/exampleSite/config.toml .
49 | cp -r themes/simpleness/exampleSite/content .
50 | ```
51 |
52 | build site
53 |
54 | ```shell
55 | hugo server
56 | ```
57 |
58 | then, open http://localhost:1313/ in your browser。
59 |
60 | ## Example Repository
61 |
62 | There's a example repo [RainerChiang/upload-theme](https://github.com/RainerChiang/upload-theme) on Github as a reference.
63 |
--------------------------------------------------------------------------------
/archetypes/default.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: {{ replaceRE "[0-9]{2,}" "" .Name | replaceRE "^-*" "" | replaceRE "-" " " | title }}
3 | date: {{ .Date }}
4 | lastmod:
5 | author: Rainer Chiang
6 |
7 | description:
8 | categories: []
9 | tags: []
10 |
11 | draft: false
12 | enableDisqus : false
13 | enableMathJax: false
14 | toc: false
15 | ---
--------------------------------------------------------------------------------
/exampleSite/archetypes/default.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: {{ replaceRE "[0-9]{2,}" "" .Name | replaceRE "^-*" "" | replaceRE "-" " " | title }}
3 | date: {{ .Date }}
4 | lastmod:
5 | author: Rainer Chiang
6 |
7 | description:
8 | categories: []
9 | tags: []
10 |
11 |
12 | draft: false
13 | enableDisqus : false
14 | enableMathJax: false
15 | toc: false
16 | disableToC: false
17 | disableAutoCollapse: true
18 | ---
19 |
20 |
--------------------------------------------------------------------------------
/exampleSite/config.toml:
--------------------------------------------------------------------------------
1 | baseURL = "http://example.org/"
2 | languageCode = "en"
3 | DefaultContentLanguage = "en"
4 | theme = "simpleness"
5 |
6 | title = "Rainer Chiang"
7 | enableInlineShortcodes = true
8 | enableEmoji = true
9 | googleAnalytics = ""
10 |
11 | [params]
12 | lazyImage = true
13 | enableMathJax = false # enable it in Front Matter
14 | enableReadingTime = true
15 | favicon = "favicon.ico"
16 | startyear = "2019"
17 | description = "A simple and concise hugo theme."
18 | disqus = ""
19 |
20 | [params.valine]
21 | enable = false
22 | lang = 'en' # zh-CN
23 | appId = ''
24 | appKey = ''
25 | placeholder = 'Say Something......'
26 | requiredFields = ['nick', 'mail']
27 | avatar = 'robohash'
28 | visitor = true
29 | serverURLS = 'https://abc123.api.lncldglobal.com'
30 | debug = false # display the visitor counts when using 'hugo server'
31 |
32 | [menu]
33 | [[menu.main]]
34 | name = "Home"
35 | url = "/"
36 | weight = 1
37 | [[menu.main]]
38 | name = "About"
39 | url = "/about/"
40 | weight = 2
41 |
42 | [social]
43 | github = "https://github.com/RainerChiang"
44 | rss = "index.xml"
45 |
46 | [taxonomies]
47 | category = "categories"
48 | tag = "tags"
49 |
50 | # doc: https://gohugo.io/getting-started/configuration-markup#highlight
51 | # syntax style: https://xyproto.github.io/splash/docs/longer/all.html
52 | [markup]
53 | [markup.highlight]
54 | guessSyntax = true
55 | hl_Lines = ""
56 | # lineNoStart = 1
57 | # lineNos = true
58 | # lineNumbersInTable = true
59 | noClasses = true
60 | style = "monokai" # github, dracula, vim, monokai
61 | tabWidth = 4
62 |
--------------------------------------------------------------------------------
/exampleSite/content/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: About
3 | date: 2020-09-22T10:37:58+05:30
4 | lastmod:
5 | author: Rainer Chiang
6 |
7 | description:
8 | categories: []
9 | tags: []
10 |
11 | draft: false
12 | enableDisqus : true
13 | enableMathJax: false
14 | disableToC: false
15 | disableAutoCollapse: true
16 | ---
17 |
18 | ## About Yourself
19 |
20 | This is some static page where you can write about yourself.
21 |
22 | ## hugo theme [simpleness](https://github.com/RainerChiang/simpleness)
23 |
24 | A hugo theme ported form [contrast-hugo](https://github.com/niklasbuschmann/contrast-hugo)
25 |
--------------------------------------------------------------------------------
/exampleSite/content/posts/post-1.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Emoji Support
3 | date: 2017-01-18T02:01:58+05:30
4 | lastmod: 2020-10-09T10:13:38+08:00
5 | author: Rainer Chiang
6 |
7 | description: You have a to-do list that scrolls on for days. You are managing multiple projects, getting lots of email and messages on different messaging systems, managing finances and personal health habits and so much more.
8 | categories: [Hugo]
9 | tags: [emoji, test]
10 |
11 | draft: false
12 | enableDisqus : true
13 | enableMathJax: false
14 | disableToC: false
15 | disableAutoCollapse: true
16 | ---
17 |
18 | Emoji can be enabled in a Hugo project in a number of ways.
19 |
20 | The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
21 |
22 | To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
23 |
24 |
🙈:see_no_evil:🙉:hear_no_evil:🙊:speak_no_evil:
25 |
26 |
27 | The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
28 |
29 | ***
30 |
31 | **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
32 |
33 | {{< highlight html >}}
34 | .emoji {
35 | font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
36 | }
37 | {{< /highlight >}}
38 |
39 | {{< css.inline >}}
40 |
53 | {{< /css.inline >}}
--------------------------------------------------------------------------------
/exampleSite/content/posts/post-2.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Markdown Syntax Guide
3 | date: 2017-05-18T12:13:30+05:30
4 | lastmod: 2020-10-09T10:13:38+08:00
5 | author: Rainer Chiang
6 |
7 | description: Markdown Syntax Guide
8 | categories: [Hugo]
9 | tags: [Markdown, test]
10 |
11 |
12 | draft: false
13 | enableDisqus : true
14 | enableMathJax: false
15 | toc: true
16 | disableToC: false
17 | disableAutoCollapse: true
18 | ---
19 |
20 | This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
21 |
22 |
23 | ## Headings
24 |
25 | The following HTML `
`—`
` elements represent six levels of section headings. `
` is the highest section level while `
` is the lowest.
26 |
27 | # H1
28 | ## H2
29 | ### H3
30 | #### H4
31 | ##### H5
32 | ###### H6
33 |
34 | ## Paragraph
35 |
36 | Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
37 |
38 | Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
39 |
40 | ## Blockquotes
41 |
42 | The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
43 |
44 | #### Blockquote without attribution
45 |
46 | > Tiam, ad mint andaepu dandae nostion secatur sequo quae.
47 | > **Note** that you can use *Markdown syntax* within a blockquote.
48 |
49 | #### Blockquote with attribution
50 |
51 | > Don't communicate by sharing memory, share memory by communicating.
52 | > — Rob Pike[^1]
53 |
54 | [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
55 |
56 | ## Tables
57 |
58 | Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
59 |
60 | Name | Age
61 | --------|------
62 | Bob | 27
63 | Alice | 23
64 |
65 | #### Inline Markdown within tables
66 |
67 | | Italics | Bold | Code |
68 | | -------- | -------- | ------ |
69 | | *italics* | **bold** | `code` |
70 |
71 | ## Code Blocks
72 |
73 | #### Code block with backticks
74 |
75 | ```html
76 |
77 |
78 |
79 |
80 | Example HTML5 Document
81 |
82 |
83 |
52 | {{ math.inline >}}
53 |
54 | Block math:
55 | $$
56 | \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
57 | $$
--------------------------------------------------------------------------------
/exampleSite/content/posts/post-4.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 中文测试
3 | date: 2018-03-18T12:13:35+05:30
4 | lastmod: 2020-10-09T10:13:38+08:00
5 | author: Rainer Chiang
6 |
7 | description: Start by getting a small backpack (less than 20 liters) and then just travel with what fits in that.
8 | categories: [Text]
9 | tags: [plain, chinese]
10 |
11 |
12 | draft: false
13 | enableDisqus : true
14 | enableMathJax: false
15 | disableToC: false
16 | disableAutoCollapse: true
17 | ---
18 |
19 | # 荷塘月色
20 |
21 | >朱自清(1898年11月22日—1948年8月12日),原名自华,号实秋,后改名自清,字佩弦。原籍浙江绍兴,出生于江苏省东海县(今连云港市东海县平明镇),后随父定居扬州。中国现代散文家、诗人、学者、民主战士。
22 | >
23 | >1916年中学毕业后成功考入北京大学预科。1919年开始发表诗歌。1921年,加入文学研究会,成立“为人生”代表作家。1922年,与叶圣陶等创办了我国新文学史上第一个诗刊——《诗》月刊,倡导新诗。次年,发表长诗《毁灭》,引起当时诗坛广泛注意,继而写《桨声灯影里的秦淮河》,被誉为“白话美术文的模范”。1924年,诗文集《踪迹》出版。1925年,应清华大学之聘,任中文系教授。创作由诗歌转向散文,同时致力于古典文学研究。“三·一八”惨案后,他撰写《执政府大屠杀记》等文章,声讨军阀政府暴行。1928年,第一部散文集《背影》出版。1930年,代理清华大学中文系主任。次年,留学英国,并漫游欧洲数国,著有《欧游杂记》、《伦敦杂记》。1932年归国,继任清华大学中文系教授兼系主任。“一二·九”运动中,他同学生一道上街游行。抗日战争爆发后,随校南迁,任西南联大教授。1946年10月返北平,受校方委托主编《闻一多全集》。同时,积极参加各项民主活动。1948年8月12日因胃穿孔病逝于北平,年仅50岁。
24 | >
25 | >所作《背影》、《荷塘月色》等篇,为中国现代散文早期代表作,由《朱自清全集》出版。
26 |
27 | 这几天心里颇不宁静。今晚在院子里坐着乘凉,忽然想起日日走过的荷塘,在这满月的光里,总该另有一番样子吧。月亮渐渐地升高了,墙外马路上孩子们的欢笑,已经听不见了;妻在屋里拍着闰儿,迷迷糊糊地哼着眠歌。我悄悄地披了大衫,带上门出去。
28 |
29 | 沿着荷塘,是一条曲折的小煤屑路。这是一条幽僻的路;白天也少人走,夜晚更加寂寞。荷塘四面,长着许多树,蓊蓊郁郁的。路的一旁,是些杨柳,和一些不知道名字的树。没有月光的晚上,这路上阴森森的,有些怕人。今晚却很好,虽然月光也还是淡淡的。
30 |
31 | 路上只我一个人,背着手踱着。这一片天地好像是我的;我也像超出了平常的自己,到了另一世界里。我爱热闹,也爱冷静;爱群居,也爱独处。像今晚上,一个人在这苍茫的月下,什么都可以想,什么都可以不想,便觉是个自由的人。白天里一定要做的事,一定要说的话,现在都可不理。这是独处的妙处,我且受用这无边的荷香月色好了。
32 |
33 | 曲曲折折的荷塘上面,弥望的是田田的叶子。叶子出水很高,像亭亭的舞女的裙。层层的叶子中间,零星地点缀着些白花,有袅娜地开着的,有羞涩地打着朵儿的;正如一粒粒的明珠,又如碧天里的星星,又如刚出浴的美人。微风过处,送来缕缕清香,仿佛远处高楼上渺茫的歌声似的。这时候叶子与花也有一丝的颤动,像闪电般,霎时传过荷塘的那边去了。叶子本是肩并肩密密地挨着,这便宛然有了一道凝碧的波痕。叶子底下是脉脉的流水,遮住了,不能见一些颜色;而叶子却更见风致了。
34 |
35 | 月光如流水一般,静静地泻在这一片叶子和花上。薄薄的青雾浮起在荷塘里。叶子和花仿佛在牛乳中洗过一样;又像笼着轻纱的梦。虽然是满月,天上却有一层淡淡的云,所以不能朗照;但我以为这恰是到了好处——酣眠固不可少,小睡也别有风味的。月光是隔了树照过来的,高处丛生的灌木,落下参差的斑驳的黑影,峭楞楞如鬼一般;弯弯的杨柳的稀疏的倩影,却又像是画在荷叶上。塘中的月色并不均匀;但光与影有着和谐的旋律,如梵婀玲上奏着的名曲。
36 |
37 | 荷塘的四面,远远近近,高高低低都是树,而杨柳最多。这些树将一片荷塘重重围住;只在小路一旁,漏着几段空隙,像是特为月光留下的。树色一例是阴阴的,乍看像一团烟雾;但杨柳的丰姿,便在烟雾里也辨得出。树梢上隐隐约约的是一带远山,只有些大意罢了。树缝里也漏着一两点路灯光,没精打采的,是渴睡人的眼。这时候最热闹的,要数树上的蝉声与水里的蛙声;但热闹是它们的,我什么也没有。
38 |
39 | 忽然想起采莲的事情来了。采莲是江南的旧俗,似乎很早就有,而六朝时为盛;从诗歌里可以约略知道。采莲的是少年的女子,她们是荡着小船,唱着艳歌去的。采莲人不用说很多,还有看采莲的人。那是一个热闹的季节,也是一个风流的季节。梁元帝《采莲赋》里说得好:
40 |
41 | 于是妖童媛女,荡舟心许;鷁首徐回,兼传羽杯;欋将移而藻挂,船欲动而萍开。尔其纤腰束素,迁延顾步;夏始春余,叶嫩花初,恐沾裳而浅笑,畏倾船而敛裾。
42 |
43 | 可见当时嬉游的光景了。这真是有趣的事,可惜我们现在早已无福消受了。
44 |
45 | 于是又记起《西洲曲》里的句子:
46 |
47 | > 采莲南塘秋,莲花过人头;低头弄莲子,莲子清如水。今晚若有采莲人,这儿的莲花也算得“过人头”了;只不见一些流水的影子,是不行的。这令我到底惦着江南了。——这样想着,猛一抬头,不觉已是自己的门前;轻轻地推门进去,什么声息也没有,妻已睡熟好久了。
48 |
49 | 1927年7月,北京清华园。
50 |
51 | (原载1927年7月10日《小说月报》第18卷第7期)
52 |
53 |
--------------------------------------------------------------------------------
/exampleSite/content/posts/post-5.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Typography
3 | date: 2019-09-18T12:13:38+05:00
4 | lastmod: 2020-10-09T10:13:38+08:00
5 | author: Rainer Chiang
6 |
7 | description:
8 | categories: [Whisper]
9 | tags: [markdown]
10 |
11 |
12 | draft: false
13 | enableDisqus : true
14 | enableMathJax: false
15 | disableToC: false
16 | disableAutoCollapse: true
17 | ---
18 |
19 | Lid est laborum et dolorum fuga. Et harum quidem rerum facilis est et expeditasi distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihilse impedit quo minus id quod amets untra dolor amet sad. Sed ut perspser iciatis unde omnis iste natus error sit voluptatem accusantium doloremque laste. Dolores sadips ipsums sits.
20 |
21 | # Heading 1
22 |
23 | Lid est laborum et dolorum fuga. Et harum quidem rerum facilis est et expeditasi distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihilse impedit quo minus id quod amets untra dolor amet sad. Sed ut perspser iciatis unde omnis iste natus error sit voluptatem accusantium doloremque laste. Dolores sadips ipsums sits.
24 |
25 | ## Heading 2
26 |
27 | Lid est laborum et dolorum fuga. Et harum quidem rerum facilis est et expeditasi distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihilse impedit quo minus id quod amets untra dolor amet sad. Sed ut perspser iciatis unde omnis iste natus error sit voluptatem accusantium doloremque laste. Dolores sadips ipsums sits.
28 |
29 | ### Heading 3
30 |
31 | Lid est laborum et dolorum fuga. Et harum quidem rerum facilis est et expeditasi distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihilse impedit quo minus id quod amets untra dolor amet sad. Sed ut perspser iciatis unde omnis iste natus error sit voluptatem accusantium doloremque laste. Dolores sadips ipsums sits.
32 |
33 | #### Heading 4
34 |
35 | Lid est laborum et dolorum fuga. Et harum quidem rerum facilis est et expeditasi distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihilse impedit quo minus id quod amets untra dolor amet sad. Sed ut perspser iciatis unde omnis iste natus error sit voluptatem accusantium doloremque laste. Dolores sadips ipsums sits.
36 |
37 | ##### Heading 5
38 |
39 | Lid est laborum et dolorum fuga. Et harum quidem rerum facilis est et expeditasi distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihilse impedit quo minus id quod amets untra dolor amet sad. Sed ut perspser iciatis unde omnis iste natus error sit voluptatem accusantium doloremque laste. Dolores sadips ipsums sits.
40 |
41 | ###### Heading 6
42 |
43 | Lid est laborum et dolorum fuga. Et harum quidem rerum facilis est et expeditasi distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihilse impedit quo minus id quod amets untra dolor amet sad. Sed ut perspser iciatis unde omnis iste natus error sit voluptatem accusantium doloremque laste. Dolores sadips ipsums sits.
44 |
45 | ## Typography
46 |
47 | Lid est laborum et dolorum fuga, This is [an example](http://example.com/ "Title") inline link. Et harum quidem rerum facilis, **This is bold** and *emphasis* cumque nihilse impedit quo minus id quod amets untra dolor amet sad. While this is `code block()` and following is a `pre` tag
48 |
49 | print 'this is pre tag'
50 |
51 | Following is the syntax highlighted code block
52 |
53 | ```go
54 | func getCookie(name string, r interface{}) (*http.Cookie, error) {
55 | rd := r.(*http.Request)
56 | cookie, err := rd.Cookie(name)
57 | if err != nil {
58 | return nil, err
59 | }
60 | return cookie, nil
61 | }
62 |
63 | func setCookie(cookie *http.Cookie, w interface{}) error {
64 | // Get write interface registered using `Acquire` method in handlers.
65 | wr := w.(http.ResponseWriter)
66 | http.SetCookie(wr, cookie)
67 | return nil
68 | }
69 | ```
70 |
71 | This is blockquote, Will make it *better now*
72 |
73 | > 'I want to do with you what spring does with the cherry trees.' cited ~Pablo Neruda*
74 |
75 |
76 | > Et harum quidem *rerum facilis* est et expeditasi distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihilse impedit
77 |
78 | Unordered list
79 |
80 | * Red
81 | * Green
82 | * Blue
83 |
84 | Ordered list
85 |
86 | 1. Red
87 | 2. Green
88 | 3. Blue
89 |
90 | ## Tables
91 |
92 | Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
93 |
94 | Name | Age
95 | --------|------
96 | Bob | 27
97 | Alice | 23
98 |
99 | #### Inline Markdown within tables
100 |
101 | | Inline | Markdown | In | Table |
102 | | ---------- | --------- | ----------------- | ---------- |
103 | | *italics* | **bold** | ~~strikethrough~~ | `code` |
--------------------------------------------------------------------------------
/exampleSite/content/posts/post-6.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Short Codes
3 | date: 2019-09-06T12:13:36+05:30
4 | lastmod: 2020-10-09T10:13:38+08:00
5 | author: Rainer Chiang
6 |
7 | description: Here is a demo of all shortcodes available in Hugo.
8 | categories: [Shortcodes]
9 | tags: [image]
10 |
11 |
12 | draft: false
13 | enableDisqus : true
14 | enableMathJax: false
15 | disableToC: false
16 | disableAutoCollapse: true
17 | ---
18 |
19 | Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
20 |
21 | ## Images
22 |
23 | {{< figure src="https://images.unsplash.com/photo-1560032779-0a8809186efd?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80" title="Dave Herring" >}}
24 |
25 | {{< figure src="https://images.unsplash.com/photo-1560032779-0a8809186efd?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80" title="Dave Herring" >}}
26 |
27 | ---
28 |
29 | ## Instagram Simple Shortcode
30 |
31 | < instagram_simple BGvuInzyFAe hidecaption >
32 |
33 |
34 |
35 | ---
36 |
37 | ## YouTube Privacy Enhanced Shortcode
38 |
39 | < youtube ZJthWmvUzzc >
40 |
41 |
42 |
43 | ---
44 |
45 | ## Twitter Simple Shortcode
46 |
47 | < twitter_simple 1085870671291310081 >
48 |
49 |
50 |
51 | ---
52 |
53 | ## Vimeo Simple Shortcode
54 |
55 | < vimeo_simple 48912912 >
56 |
--------------------------------------------------------------------------------
/exampleSite/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | set -e
4 |
5 | rm -r public/*
6 | echo "Done: rm -r public/* \n"
7 |
8 | hugo
9 | echo "Done: hugo \n"
10 |
11 | cd public/
12 | git add .
13 | git commit -m "Blog update at $(date)"
14 | echo "Done: git commit, Blog update at $(date) \n"
15 |
16 | git push -u origin main
17 | echo "\nDone: git push -u origin main"
18 |
--------------------------------------------------------------------------------
/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RainerChiang/simpleness/9da74fc7bfb1b3e1e14d327ceb04262011d05006/images/screenshot.png
--------------------------------------------------------------------------------
/images/tn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RainerChiang/simpleness/9da74fc7bfb1b3e1e14d327ceb04262011d05006/images/tn.png
--------------------------------------------------------------------------------
/layouts/404.html:
--------------------------------------------------------------------------------
1 | {{ define "main" }}
2 |
3 |
4 |