Unverified Commit 30ff78a8 authored by Yurizal Susanto's avatar Yurizal Susanto Committed by GitHub

Make new release (#10)

* Fixes issue raise by gohugoio/hugoThemes#682 (comment)

* Use Hugo pipe for assets management
parent ef5eff8e
......@@ -31,11 +31,11 @@ mkdir name_of_web
cd name_of_web
git clone https://github.com/yursan9/manis-hugo-theme themes/manis
cp themes/manis/exampleSite/config.toml config.toml
hugo new blog/_index.md
hugo new work/_index.md
hugo new blog/hello.md
```
Edit the `config.toml` according to your preference. Then edit `content/blog/_index.md` and `content/work/_index.md` by following [this section](#making-own-navigation-bar). (Look at the `exampleSite/content` for example.)
Edit the `config.toml` according to your preference. Then edit `content/blog/hello.md` to
start writing your first post. (Look at the `exampleSite/content` for example.)
### Theme Only
......@@ -62,13 +62,13 @@ For configuration example you can look at the `exampleSite/config.toml` (and cop
### Change Latest Section
By default this theme needs `blog` and `work` section to works. You can edit which sections show up as latest posts and latest works by editing `postSection` and `workSection`. `workSection` is optional.
You can edit which sections show up as latest posts and latest works by editing `mainSections` and `workSections`. `workSections` is optional.
```toml
# Configure which section for Latest Posts
postSection = "blog"
# Configure which section for Latest Works
workSection = "work"
# Configure which sections for Latest Posts
mainSections = ["blog", "post"]
# Configure which sections for Latest Works
workSections = ["work"]
```
### Disqus Configuration
......@@ -83,38 +83,20 @@ disqusShortname = "your-disqus-shortname"
### Making Own Navigation Bar
Top navigation bar in Manis is made automatically by making new `section/_index.md`. Example if you want to add new `about` section, you can do the following command:
Top navigation bar in Manis is made by configuring the navigation bar in `config.toml` with the following code:
```
hugo new about/_index.md
```
Edit the file `content/about/_index.md` and make sure the front matter is formatted like this:
```toml
+++
title = "Get To Know Me"
menu = "main"
+++
```
`title` will be the string that is shown in navigation bar and the page's title (the title doesn't need to be the same as section's directory name). `menu = "main"` is the one who make Hugo know, it's need to add a new item in navigation bar.
[menu]
[[menu.main]]
name = "Blog"
url = "/post/"
**Alternative navigation bar:**
[[menu.main]]
name = "About"
url = "/about"
Or you can configure the navigation bar in `config.toml` with the following code:
```
[menu]
[[menu.main]]
name = "Blog"
url = "/post/"
[[menu.main]]
name = "About"
url = "/about"
```
### Other Language
Manis already translated to Bahasa Indonesia. But, if you want to translate this theme to your own language, look for the example in `i18n/en.yaml` and `i18n/in.yaml`.
......
......@@ -25,6 +25,7 @@
- #Media Queries
*/
/* #Container
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.container {
......@@ -131,7 +132,10 @@ p { margin-top: 0; }
/* #Links
–––––––––––––––––––––––––––––––––––––––––––––––––– */
a { text-decoration: none; }
a {
text-decoration: none;
color: {{ .Site.Params.ColorTheme }};
}
a:hover { text-decoration: underline; }
......@@ -236,6 +240,7 @@ blockquote {
margin: 1.75em 0 1.75em 0;
padding: 0 1em 0 1em;
border-left:0.4em solid;
border-left-color: {{ .Site.Params.ColorTheme }};
}
@media (min-width: 55rem) {
......@@ -243,6 +248,7 @@ blockquote {
margin: 1.75em -2em 1.75em -2em;
padding: 0 1.5em 0 1.5em;
border-right:0.4em solid;
border-right-color: {{ .Site.Params.ColorTheme }};
}
}
......@@ -262,6 +268,10 @@ blockquote cite a {
/* #Navigation
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.bar a { color: #777; }
.bar a:hover {
color: {{ .Site.Params.ColorTheme }};
text-decoration: none;
}
.bar ul {
list-style: none;
margin: 0;
......@@ -339,6 +349,14 @@ hr {
border-top: 1px solid #e1e1e1;
}
.sep {
margin-top: 2rem;
margin-bottom: 1rem;
margin-left:0;
width: 24rem;
border-top: 2px solid {{ .Site.Params.ColorTheme }};
}
img {
max-width: 100%
}
......
......@@ -21,7 +21,7 @@ pygmentsUseClasses = true
[menu]
[[menu.main]]
name = "Blog"
name = "Post"
url = "/post/"
[[menu.main]]
......@@ -37,7 +37,7 @@ pygmentsUseClasses = true
# Custom CSS
customCSS = []
# List of sections support disqus comments
# List of sections that support disqus comments
disqusSections = [ "blog" ]
# Site meta description
description = "Sweet little Hugo's theme for personal website or blog."
......@@ -48,17 +48,17 @@ pygmentsUseClasses = true
# URL to license file, can be outside of your domain
licenseURL = "/about/license"
# Configure which section for Latest Posts
postSection = "post"
# Configure which section for Latest Works
workSection = ""
# Configure which sections for Latest Posts
mainSections = ["blog", "post"]
# Configure which sections for Latest Works
workSections = ["work"]
# 404 Configuration
head404 = "Sorry, I can't find what you want."
sub404 = "Back to <a href='/'>Home</a>."
# Color of your website's accent
colorTheme = "#ff8181"
colorTheme = "#ff6565"
# Maximum number of item in Latest Posts or Works
latestCount = 3
# Path to site's favicon image
......
+++
title = "About"
date = "2017-06-24T18:57:12+07:00"
menu = "main"
+++
It's a minimalist and responsive theme for Hugo Static Site Generator. It's
name taken from Indonesian Language for *Sweet*.
+++
title = "Blog"
date = "2017-07-02T08:14:51+07:00"
menu = "main"
+++
+++
title = "Work"
date = "2017-07-02T08:15:25+07:00"
menu = "main"
+++
......@@ -5,22 +5,22 @@
{{ with .Content }}{{.}}{{ end }}
</header>
{{ $latestcount := .Site.Params.LatestCount | default 3 }}
{{ $postsection := .Site.Params.PostSection | default "post" }}
<section>
<h4>{{ T "latestPost" }}</h4>
<ul class="no-bullet">
{{- range (first $latestcount (where .Pages "Section" $postsection)) -}}
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- range (first $latestcount $pages) -}}
{{ partial "li" . }}
{{- end -}}
</ul>
</section>
{{ $worksection := .Site.Params.WorkSection | default "work" }}
{{ with .Site.GetPage "section" $worksection }}
{{ $pages := where site.RegularPages "Type" "in" .Site.Params.WorkSections }}
{{ if ne (len $pages) 0 }}
<section>
<h4>{{ T "latestWork" }}</h4>
<ul class="no-bullet">
{{- range (first $latestcount (where .Pages "Section" $worksection)) -}}
{{- range (first $latestcount $pages) -}}
{{ partial "li" . }}
{{- end -}}
</ul>
......
......@@ -8,15 +8,9 @@
{{ with .Site.Params.FaviconImg }}
<link rel="shortcut icon" href="{{.}}">
{{ end }}
{{ if .Site.Params.DebugCSS }}
<link rel="stylesheet" href="/css/normalize.css"/>
<link rel="stylesheet" href="/css/ui.css"/>
<link rel="stylesheet" href="/css/syntax.css"/>
{{ else }}
<link rel="stylesheet" href="/css/ui.min.css"/>
{{ end }}
{{ partial "style" . }}
{{ range .Site.Params.CustomCSS }}
<link rel="stylesheet" href="{{ . }}"/>
{{ end }}
......@@ -30,6 +24,4 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/{{- . -}}.min.js"></script>
{{ end }}
{{ end }}
{{ partial "style" . }}
</head>
<style>
a { color: {{ .Site.Params.ColorTheme }}; }
blockquote {
border-left-color: {{ .Site.Params.ColorTheme }};
border-right-color: {{ .Site.Params.ColorTheme }}; }
.bar a:hover {
color: {{ .Site.Params.ColorTheme }};
text-decoration: none; }
.sep {
margin-top: 2rem;
margin-bottom: 1rem;
margin-left:0;
width: 24rem;
border-top: 2px solid {{ .Site.Params.ColorTheme }}; }
</style>
{{ $normalize := resources.Get "css/normalize.css" }}
{{ $syntax := resources.Get "css/syntax.css" }}
{{ $template := resources.Get "css/template.css" }}
{{ $ui := $template | resources.ExecuteAsTemplate "main.css" . }}
{{ $css := slice $normalize $ui $syntax | resources.Concat "css/ui.css" }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:0;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.container{position:relative;width:100%;max-width:70rem;margin:0 auto;padding:0 2rem;box-sizing:border-box}*,*:after,*:before{box-sizing:inherit}html{font-size:62.5%}body{font-size:1.6em;line-height:1.7;font-weight:400;font-family:'Lato',sans-serif;color:#444}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:1rem;font-weight:300;color:#222;font-family:'Raleway',sans-serif}h1{font-size:3.2rem;line-height:1.25;letter-spacing:-.1rem}h2{font-size:2.8rem;line-height:1.25;letter-spacing:-.1rem}h3{font-size:2.4rem;line-height:1.3;letter-spacing:-.1rem}h4{font-size:2.0rem;line-height:1.35;letter-spacing:-.08rem}h5{font-size:1.8rem;line-height:1.5;letter-spacing:-.05rem}h6{font-size:1.6rem;line-height:1.6;letter-spacing:0}@media(min-width:55rem){h1{font-size:3.6rem}h2{font-size:3.0rem}h3{font-size:2.8rem}h4{font-size:2.4rem}h5{font-size:2.0rem}h6{font-size:1.7rem}}p{margin-top:0}#brand{text-align:left}#brand h1{margin-bottom:-.2rem;font-weight:bold}#brand h5{color:#898989;margin-bottom:-.2rem}#related h3{text-align:left}a{text-decoration:none}a:hover{text-decoration:underline}ul{list-style:square}ol{list-style:decimal}ol,ul{padding-left:1.2rem;margin-top:0}ul ul,ul ol,ol ol,ol ul{margin:1.5rem 0 1.5rem 3rem;font-size:90%}li{margin-bottom:.5rem;margin-left:.5rem}li>p{margin-bottom:.3rem}ul.no-bullet{margin-left:0;margin-bottom:1.5rem}@media(min-width:40rem){ul.no-bullet{list-style:none;margin-left:0}}.no-bullet li{margin-left:0;font-size:1.8rem}.no-bullet span{display:none;font-size:1.7rem;color:#666;font-family:monospace}@media(min-width:40rem){.no-bullet span{margin-right:1rem;display:inline}}.terms li>span{color:#666;font-family:monospace}dd{margin-left:2rem}code{padding:.2rem .5rem;margin:0 .2rem;font-size:90%;white-space:nowrap;background:#f1f1f1;border:1px solid #e1e1e1;border-radius:4px;font-family:'Fira Mono',monospace}pre>code{display:block;padding:1rem 1.5rem;white-space:pre-wrap;background:#2b303b;color:#c0c5ce;font-family:'Fira Mono',monospace}th,td{padding:12px 15px;text-align:left;border-bottom:1px solid #e1e1e1}th:first-child,td:first-child{padding-left:0}th:last-child,td:last-child{padding-right:0}blockquote{box-sizing:border-box;margin:1.75em 0 1.75em 0;padding:0 1em 0 1em;border-left:.4em solid}@media(min-width:55rem){blockquote{margin:1.75em -2em 1.75em -2em;padding:0 1.5em 0 1.5em;border-right:.4em solid}}blockquote p:last-of-type cite{display:block;text-align:right;margin-right:1rem}blockquote p:last-of-type cite:before{content:"― "}blockquote cite a{font-style:italic;text-decoration:none}.bar a{color:#777}.bar ul{list-style:none;margin:0;padding:0}.bar li{display:inline;font-size:1.8rem;margin-right:1rem;margin-left:0}@media(min-width:40rem){.bar li{font-size:2.2rem}}.post-nav{margin-bottom:2rem}.next-post{display:block;text-align:right}.prev-post{display:block;text-align:left}.pagination{font-size:2rem}pre,blockquote,dl,figure,table,p,ul,ol{margin-bottom:2.5rem}#brand{margin-top:1rem;margin-bottom:1.2rem}.u-header{margin-bottom:.5rem}@media(min-width:55rem){.u-header{padding-top:1rem}}@media(min-width:75rem){.u-header{padding-top:3rem}}.u-footer{margin-top:3rem;margin-bottom:2rem}hr{margin-top:3rem;margin-bottom:3.5rem;border-width:0;border-top:1px solid #e1e1e1}img{max-width:100%}article img{display:block;margin:0 auto}[class^="icon"]{width:1em;height:1em;position:relative}.icon-text{top:.13em}.icon-social{width:3rem;height:3rem}@media print{.no-print{display:none}pre>code{white-space:pre-wrap}img{display:block;width:80%;margin:auto}}.chroma{color:#fff}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:#ffc}.chroma .lnt{margin-right:.4em;padding:0 .4em 0 .4em}.chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em}.chroma .k{color:#fb660a;font-weight:bold}.chroma .kc{color:#fb660a;font-weight:bold}.chroma .kd{color:#fb660a;font-weight:bold}.chroma .kn{color:#fb660a;font-weight:bold}.chroma .kp{color:#fb660a}.chroma .kr{color:#fb660a;font-weight:bold}.chroma .kt{color:#cdcaa9;font-weight:bold}.chroma .na{color:#ff0086;font-weight:bold}.chroma .no{color:#0086d2}.chroma .nf{color:#ff0086;font-weight:bold}.chroma .nt{color:#fb660a;font-weight:bold}.chroma .nv{color:#fb660a}.chroma .s{color:#0086d2}.chroma .sa{color:#0086d2}.chroma .sb{color:#0086d2}.chroma .sc{color:#0086d2}.chroma .dl{color:#0086d2}.chroma .sd{color:#0086d2}.chroma .s2{color:#0086d2}.chroma .se{color:#0086d2}.chroma .sh{color:#0086d2}.chroma .si{color:#0086d2}.chroma .sx{color:#0086d2}.chroma .sr{color:#0086d2}.chroma .s1{color:#0086d2}.chroma .ss{color:#0086d2}.chroma .m{color:#0086f7;font-weight:bold}.chroma .mb{color:#0086f7;font-weight:bold}.chroma .mf{color:#0086f7;font-weight:bold}.chroma .mh{color:#0086f7;font-weight:bold}.chroma .mi{color:#0086f7;font-weight:bold}.chroma .il{color:#0086f7;font-weight:bold}.chroma .mo{color:#0086f7;font-weight:bold}.chroma .c{color:#080;font-style:italic}.chroma .ch{color:#080;font-style:italic}.chroma .cm{color:#080;font-style:italic}.chroma .c1{color:#080;font-style:italic}.chroma .cs{color:#080;font-style:italic}.chroma .cp{color:#ff0007;font-weight:bold;font-style:italic}.chroma .cpf{color:#ff0007;font-weight:bold;font-style:italic}.chroma .gh{font-weight:bold}.chroma .go{color:#444;background-color:#222}.chroma .gu{font-weight:bold}.chroma .w{color:#888}
......@@ -5,7 +5,7 @@ description = "Sweet little theme for personal website or blog"
homepage = "https://github.com/yursan9/manis-hugo-theme"
tags = ["blog", "personal", "minimal", "simple", "clean", "light"]
features = ["responsive", "simple", "higlight.js", "discus"]
min_version = "0.30"
min_version = "0.57"
[author]
name = "Yurizal Susanto"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment