Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/yursan9/manis-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYurizal Susanto <rizalsagi@gmail.com>2019-08-17 05:06:29 +0300
committerGitHub <noreply@github.com>2019-08-17 05:06:29 +0300
commit30ff78a8e71270d61e4058b6f4cdada904b735f3 (patch)
tree45e266124bfae16962a30e847f637a6059531600
parentef5eff8e34f31e7a9576b3f587dea8ab5dcc0ca2 (diff)
Make new release (#10)1.2.0
* Fixes issue raise by gohugoio/hugoThemes#682 (comment) * Use Hugo pipe for assets management
-rw-r--r--README.md50
-rw-r--r--assets/css/normalize.css (renamed from static/css/normalize.css)0
-rw-r--r--assets/css/syntax.css (renamed from static/css/syntax.css)0
-rw-r--r--assets/css/template.css (renamed from static/css/ui.css)20
-rw-r--r--exampleSite/config.toml14
-rw-r--r--exampleSite/content/about/_index.md1
-rw-r--r--exampleSite/content/blog/_index.md1
-rw-r--r--exampleSite/content/work/_index.md1
-rw-r--r--layouts/index.html10
-rw-r--r--layouts/partials/meta.html14
-rw-r--r--layouts/partials/style.html21
-rw-r--r--static/css/ui.min.css1
-rw-r--r--theme.toml2
13 files changed, 57 insertions, 78 deletions
diff --git a/README.md b/README.md
index d490314..b04407e 100644
--- a/README.md
+++ b/README.md
@@ -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`.
diff --git a/static/css/normalize.css b/assets/css/normalize.css
index 9d9f37a..9d9f37a 100644
--- a/static/css/normalize.css
+++ b/assets/css/normalize.css
diff --git a/static/css/syntax.css b/assets/css/syntax.css
index 077e30f..077e30f 100644
--- a/static/css/syntax.css
+++ b/assets/css/syntax.css
diff --git a/static/css/ui.css b/assets/css/template.css
index 0ddf3b2..424c441 100644
--- a/static/css/ui.css
+++ b/assets/css/template.css
@@ -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%
}
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index e2ecb57..68e50fc 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -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
diff --git a/exampleSite/content/about/_index.md b/exampleSite/content/about/_index.md
index 9faf548..fc1ef62 100644
--- a/exampleSite/content/about/_index.md
+++ b/exampleSite/content/about/_index.md
@@ -1,7 +1,6 @@
+++
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*.
diff --git a/exampleSite/content/blog/_index.md b/exampleSite/content/blog/_index.md
index 2cf0052..b43ab16 100644
--- a/exampleSite/content/blog/_index.md
+++ b/exampleSite/content/blog/_index.md
@@ -1,5 +1,4 @@
+++
title = "Blog"
date = "2017-07-02T08:14:51+07:00"
-menu = "main"
+++
diff --git a/exampleSite/content/work/_index.md b/exampleSite/content/work/_index.md
index 2f83a66..d41dbc1 100644
--- a/exampleSite/content/work/_index.md
+++ b/exampleSite/content/work/_index.md
@@ -1,5 +1,4 @@
+++
title = "Work"
date = "2017-07-02T08:15:25+07:00"
-menu = "main"
+++
diff --git a/layouts/index.html b/layouts/index.html
index 88821c8..4207ed3 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -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>
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html
index 22fb181..bb7922c 100644
--- a/layouts/partials/meta.html
+++ b/layouts/partials/meta.html
@@ -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>
diff --git a/layouts/partials/style.html b/layouts/partials/style.html
index 37755da..7245855 100644
--- a/layouts/partials/style.html
+++ b/layouts/partials/style.html
@@ -1,15 +1,6 @@
-<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 }}">
diff --git a/static/css/ui.min.css b/static/css/ui.min.css
deleted file mode 100644
index 35231ab..0000000
--- a/static/css/ui.min.css
+++ /dev/null
@@ -1 +0,0 @@
-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}
diff --git a/theme.toml b/theme.toml
index 3d820e2..d160d03 100644
--- a/theme.toml
+++ b/theme.toml
@@ -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"