Giter VIP home page Giter VIP logo

manis-hugo-theme's Introduction

Manis Hugo Theme

It's a minimalist and responsive theme for Hugo Static Site Generator. It's name taken from Indonesian Language for Sweet.

Manis' Mockup Device

Table of Contents

Features

Like I said, it's really minimal. Its doesn't even have grid or anything nice like that.

  • Configurable color!
  • Code Highlighting (HighlightJS).
  • Print.css (for single post only)
  • Responsive.
  • Social Icon Links.
  • No Grid no worry.
  • Disqus Support.
  • Utterances Support.
  • Translatable.
  • Dark Mode Support.

Manis' Homepage view

Get Started

If this is your first time using Hugo, and you want to use this theme. Follow the instruction below:

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/hello.md

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

To only install Manis, you can clone this repository. The following command will clone Manis in your site's base directory.

cd path/to/site/dir
git clone https://github.com/yursan9/manis-hugo-theme themes/manis

Ensure you have blog and work sections to make this theme works.

content/
├── blog
│   └── _index.md
└── work
    └── _index.md

Configuration

For configuration example you can look at the exampleSite/config.toml (and copy that too!). I put some commentary to, hopefully, guide you at using this theme.

Change Latest Section

You can edit which sections show up as latest posts and latest works by editing mainSections and workSections. workSections is optional.

# Configure which sections for Latest Posts
mainSections = ["blog", "post"]
# Configure which sections for Latest Works
workSections = ["work"]

Custom CSS

If you want to make a change for this theme, other than forking, you can also supplied custom CSS. Maybe you want to change the font or size of image or icon, then custom CSS is your pal.

First, edit your config.toml, add the custom CSS filenames to custom CSS. You can supplied more than one custom CSS. Just be aware of the CSS load order.

[params]
    customCSS = ["/css/icon.css"]

Then, make a new static/css/icon.css file. After that you can write your custom CSS to that file:

.icon-social {
    width: 2rem;
    height: 2rem;
} 

If you follow the above instruction, you will change the size of icon on footer without forking the theme.

Disqus Configuration

To add Disqus support, edit your site config.toml. Add your discus' shortname to disqusShortname and add list of sections that you want to support disqus to params.disqusSections:

disqusShortname = "your-disqus-shortname"

[params]
    disqusSections = ["blog"]

Making Own Navigation Bar

Top navigation bar in Manis is made by configuring 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.

And then you edit the site's config.toml like this.

defaultContentLanguage = "en"
[languages.{Your Language Code}]
    lang = "{Your Language Code}"
    languageName = "{Your Language Name. example; Bahasa Indonesia or Japanese}"
    weight = 1

Development

If you found bug, or anything that itch you. Tell me! or maybe make PR.

License

Manis is licensed under the MIT License. Check the LICENSE file for details.

“Moon Icon” and “Sun Icon” by Font Awesome are licensed under CC BY 4.0.

manis-hugo-theme's People

Contributors

aaronfc avatar aujawindar avatar bpardo avatar deining avatar jerrylususu avatar lijuno avatar mtricht avatar ph-7 avatar tobiasmcvey avatar vanildosouto avatar yursan9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

manis-hugo-theme's Issues

icon-social size

Hi,

Thanks for sharing this fantastic blog.
I want to change the icon-social size,from 3rem to 2rem,like this:

.icon-social { width: 2rem; height: 2rem; }
so it works at homepage, but in the single post page, icon-social size remains 3rem.

I don't know how to change it.

Not able to publish a new post

Thanks for the reply the other day. Now sorted.

Having problems publishing live posts.

I am getting the below message in console:

Execution halted
Error in render_page(f) :
Failed to render '2017-09-14-electric-car-revolution-and-evolution-of-metal-prices.Rmd'
Calls: ... -> build_site -> build_rmds -> in_dir -> render_page
In addition: Warning messages:
1: In file.rename(from, to) :
cannot rename file '2017-09-13-json-and-lon-lat_files/htmlwidgets' to '/Users/ugartelon/Documents/R Working Directory/Blog/First/static/rmarkdown-libs/htmlwidgets', reason 'Directory not empty'
2: In file.rename(from, to) :
cannot rename file '2017-09-13-json-and-lon-lat_files/jquery' to '/Users/ugartelon/Documents/R Working Directory/Blog/First/static/rmarkdown-libs/jquery', reason 'Directory not empty'
3: In file.rename(from, to) :
cannot rename file '2017-09-13-json-and-lon-lat_files/leaflet' to '/Users/ugartelon/Documents/R Working Directory/Blog/First/static/rmarkdown-libs/leaflet', reason 'Directory not empty'
4: In file.rename(from, to) :
cannot rename file '2017-09-13-json-and-lon-lat_files/leafletfix' to '/Users/ugartelon/Documents/R Working Directory/Blog/First/static/rmarkdown-libs/leafletfix', reason 'Directory not empty'
5: In file.rename(from, to) :
cannot rename file '2017-09-13-json-and-lon-lat_files/leaflet-label' to '/Users/ugartelon/Documents/R Working Directory/Blog/First/static/rmarkdown-libs/leaflet-label', reason 'Directory not empty'
6: In file.rename(from, to) :
cannot rename file '2017-09-13-json-and-lon-lat_files/Proj4Leaflet' to '/Users/ugartelon/Documents/R Working Directory/Blog/First/static/rmarkdown-libs/Proj4Leaflet', reason 'Directory not empty'
7: In file.rename(from, to) :
cannot rename file '2017-09-13-json-and-lon-lat_files/leaflet-binding' to '/Users/ugartelon/Documents/R Working Directory/Blog/First/static/rmarkdown-libs/leaflet-binding', reason 'Directory not empty'
[1] TRUE
Execution halted

Exited with status 1.

Dark Mode doesn't work properly in Firefox

Left is Firefox, Right is Chrome
Left is Firefox, Right is Chrome

From it seems, Firefox doesn't invert background-color. I made it work changing dark.css with below.

body {
    background-color: #141414 !important;
    margin: 0;
}
    
body {
    filter: invert(100%) hue-rotate(180deg);
}

img:not(.icon-text, .icon-social),
video,
code {
filter: invert(100%) hue-rotate(180deg) contrast(100%);
}

Misaligned next and previous post links

Hi,

At the end of each post there are links to the previous and next post. Currently those anchor tags have a display of "block", so when both of them are present, they look misaligned.

20180319-165724

Adding display: flex and justify-content: space-between to the parent container of .prev-post and .next-post fixes the issue. https://github.com/0x1CC/manis-hugo-theme/commit/1b718487b09d2ce5eac98070b71f0296c7acb56c

And finally, thank you for the good theme, it looks nice and including the non minified CSS helps a lot.

Cristian

Issue with video colours inverted in dark theme

Hi, I'm using YouTube url to embed into the .md file like:
{{< youtube xxxxxxxxx>}}

video I'm getting on the website is colour inverted. I looked into the dark.css file but can't figure out how to apply class that would make embedded videos not colour inverted.

Do you have some hints?

image

Enhancement: Add Norwegian Nynorsk translation

The following can be put in i18n/nn.toml to add translation to Nynorsk:

[latestPost]
other = "Nye innlegg"

[latestWork]
other = "Nye verk"

[license]
other = "Vilkår"

[toUp]
other = "Til toppen"

[workHomepage]
other = "Heim"

[usedTheme]
other = "Bunad:"

[seeAlso]
other = "Sjå òg"

Fix the path of config.toml

Hi Yursan9,

On the section 'get started' of your readme, the correct path of config.toml is 'themes/manis/exampleSite/config.toml config.toml', with a 's' on the final of 'theme'. 😃

Request: Remove dependence on external resources

The file layouts/partials/meta.html contains links to external fonts (from googleapis.com) and css/js (from Cloudflare). It would be nicer to have relevant features and fonts locally instead of relying on external services. I believe this is also more in line with Hugo sites and philosophy in general.

Site.RSSLink is deprecated

(This is a tiny thing)

In the newest version of Hugo, building with this theme gives me a deprecation warning:

WARN  Site.RSSLink is deprecated and will be removed in a future release. Use the Output Format's Permalink method instead, e.g. .OutputFormats.Get "RSS".Permalink

Errors on site without expected parameters set

Hello!

$subj, when trying to run this theme against my blog source I get following (site won't render at all):

Building sites … ERROR 2018/03/20 20:36:09 Error while rendering "page" in "post/": template: theme/_default/single.html:3:12: executing "theme/_default/single.html" at <partial "title" .>: error calling partial: template: theme/partials/title.html:13:50: executing "theme/partials/title.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 20:36:09 Error while rendering "page" in "": template: theme/_default/single.html:3:12: executing "theme/_default/single.html" at <partial "title" .>: error calling partial: template: theme/partials/title.html:13:50: executing "theme/partials/title.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 20:36:10 Error while rendering "taxonomy" in "": template: theme/_default/list.html:9:8: executing "theme/_default/list.html" at <partial "li" .>: error calling partial: template: theme/partials/li.html:2:55: executing "theme/partials/li.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 20:36:11 Error while rendering "section" in "": template: theme/_default/list.html:9:8: executing "theme/_default/list.html" at <partial "li" .>: error calling partial: template: theme/partials/li.html:2:55: executing "theme/partials/li.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 20:36:11 Error while rendering "404" in "": template: theme/404.html:7:33: executing "theme/404.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0

Change detected, rebuilding site
2018-03-20 21:10:53.151 +0000
Source changed "/srv/hugo/content/post/2018-03-19-lust-for-text-life.markdown": WRITE
ERROR 2018/03/20 21:10:53 Error while rendering "page" in "post/": template: theme/_default/single.html:3:12: executing "theme/_default/single.html" at <partial "title" .>: error calling partial: template: theme/partials/title.html:13:50: executing "theme/partials/title.html" at <.Site.Params.datefmt>: invalid value; expected string
ERROR 2018/03/20 21:10:53 Error while rendering "404" in "": template: theme/404.html:7:33: executing "theme/404.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0
Total in 464 ms

The reason is absent .Site.datefmt parameter but you can't tell what's exactly wrong, I guess input parameters handling could be improved (default should be set). cboettig/hugo-now-ui#9 might be used as reference point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.