Responsive card-based & code-light Hugo theme
Find a file
2019-01-14 08:08:53 -05:00
archetypes Change default archetype format (toml -> yaml) 2018-04-25 21:59:58 +03:00
data Generate footer_social.html from social.toml data 2018-12-22 09:00:08 -05:00
exampleSite Update exampleSite/config 2018-11-26 14:27:17 -05:00
i18n Add sharing buttons 2018-06-12 09:02:31 +03:00
images Add theme screenshots 2018-04-26 21:39:01 +03:00
layouts Formatting 2019-01-14 08:08:30 -05:00
static Remove logo hover effect (>720px) 2018-12-02 08:41:21 -05:00
.editorconfig Initial commit 2018-02-09 18:57:24 +03:00
.gitignore Initial commit 2018-02-09 18:57:24 +03:00
.stylelintrc Update .stylelintrc 2018-11-01 11:53:43 -04:00
.travis.yml Add Travis CI 2018-11-01 12:20:47 -04:00
CONTRIBUTING.md Update CONTRIBUTING.md 2018-07-29 14:50:35 +03:00
LICENSE LICENSE.md -> LICENSE 2018-04-25 21:29:37 +03:00
package-lock.json Improve dev workflow 2018-11-01 12:20:14 -04:00
package.json Improve dev workflow 2018-11-01 12:20:14 -04:00
README.md Update README.md 2019-01-14 08:08:53 -05:00
theme.toml Bump Hugo version [0.33 -> 0.38] 2018-06-18 22:20:51 +03:00

Binario [WIP]

Binario is a responsive card-based & code-light Hugo theme.

Demo

Binario theme screenshot

Features:

  • Responsive
  • Card-based list layout
  • Internal Hugo templates for Open Graph and Twitter Cards meta data, Google Analytics, and Disqus comments
  • Table of contents
  • Related content
  • MathJax

Installation

First of all, you will need to install Hugo and create new site. After that, you ready to install Binario.

There are three different ways you can install Binario. Choose one of the installation methods listed below and follow the instructions.

For more information read the Install and Use Themes

In your Hugo site directory, run:

git submodule add https://github.com/vimux/binario themes/binario

Next, edit your config.toml configuration file and add parameter:

theme = "binario"

You can read the GitHub documentation for submodules or those found on Git's website for more information

1B. Git clone

In your Hugo site directory, run:

git clone https://github.com/vimux/binario themes/binario

Next, edit your config.toml configuration file and add parameter:

theme = "binario"

1C. Download ZIP and manual install

Download ZIP and extract to the themes/binario

Next, edit your config.toml configuration file and add parameter:

theme = "binario"

After that, you can run your site in Hugo server mode:

hugo server

After you make sure that Binario works, you may start customizing the theme. You can change number of columns, activate footer social icons & share buttons and much more.

Configuration

Hugo uses the config.toml, config.yaml, or config.json (if found in the site root) as the default site config file. Here is Binario configuration example in TOML with theme-specific config params:

Config.toml example

baseurl = "/"
title = "Binario"
languageCode = "en-us"
paginate = "10" # Number of posts per page
theme = "binario"
disqusShortname = "" # Enable comments by entering your Disqus shortname
googleAnalytics = "" # Enable Google Analytics by entering your tracking id

[Author] # Used in authorbox
  name = "John Doe"
  bio = "John Doe's true identity is unknown. Maybe he is a successful blogger or writer."
  avatar = "img/avatar.png"

[Params]
  description = "Responsive card-based & code-light Hugo theme" # Description of your site. Used in meta description
  copyright = "Binario" # Copyright holder, otherwise will use .Site.Title
  opengraph = true # Enable OpenGraph if true
  twitter_cards = true # Enable Twitter Cards if true
  columns = 2 # Set the number of cards columns. Possible values: 1, 2, 3
  mainSections = ["post"] # Set main page sections
  post_meta = ["date", "categories"] # Enable post meta fields in given order
  dateFormat = "January 02, 2006" # Change the format of dates
  authorbox = true # Show authorbox at bottom of single pages if true
  toc = true # Enable Table of Contents for all site pages
  tocOpen = true # Open Table of Contents block. Optional
  comments = true # Enable comments for all site pages
  related = true # Enable Related content for single pages
  relatedMax = 5 # Set the maximum number of posts that can be displayed in related block. Optional
  mathjax = true # Enable MathJax for all site pages
  mathjaxPath = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" # Specify MathJax path. Optional
  mathjaxConfig = "TeX-AMS-MML_HTMLorMML" # Specify MathJax config. Optional

[Params.Social]
  email = "example@example.com"
  facebook = "username"
  twitter = "username"
  telegram = "username"
  instagram = "username"
  pinterest = "username"
  vk = "username"
  linkedin = "username"
  github = "username"
  gitlab = "username"
  stackoverflow = "numberid"
  mastodon = "username"
  medium = "username"

[Params.Share] # Post Share block
  facebook = true
  twitter = true
  reddit = true
  telegram = true
  linkedin = true
  vk = true
  pocket = true

# Web App Manifest settings
# https://www.w3.org/TR/appmanifest/
# https://developers.google.com/web/fundamentals/web-app-manifest/
[Params.Manifest]
  name = "Binario"
  shortName = "Binario"
  display = "browser"
  backgroundColor = "#2a2a2a"
  themeColor = "#1b1b1b"
  description = "Responsive card-based & code-light Hugo theme"
  orientation = "portrait"
  startUrl = "/"
  scope = "/"

[outputFormats]
  [outputFormats.MANIFEST]
    mediaType = "application/json"
    baseName = "manifest"
    isPlainText = true
    notAlternative = true

[outputs]
  home = ["HTML", "RSS", "MANIFEST"]

For more information about Hugo configuration files and all common configuration settings, please read Configure Hugo from Hugo official documentation.

Front Matter example

Hugo supports three formats for front matter: yaml, toml and json. Here is Front Matter example in YAML:

---
# Common-Defined params
title: "Example article title"
date: "2017-08-21"
lastmod: "2018-12-21"
description: "Example article description"
categories:
  - "Category 1"
  - "Category 2"
tags:
  - "Tag"
  - "Another tag"
menu: main # Add page to a menu. Options: main, footer

# Theme-Defined params
comments: true # Enable/disable Disqus comments for specific post
authorbox: true # Enable/disable Authorbox for specific post
toc: true # Enable/disable Table of Contents for specific post
mathjax: true # Enable/disable MathJax for specific post
related: true # Enable/disable Related content for specific post
---

For more information about front matter variables and formats read Hugo Front Matter from Hugo official documentation.

Columns

By default, Binario works with two columns layout (only if it possible by screen size), but you can also use one column or three columns. Change Params.columnsto preferable value. You can also change this option for specific list pages.

Share buttons

To display share buttons, set up [Params.Share] specific parameters in your site config file.

Available share buttons: Facebook, Twitter, Reddit, Telegram, LinkedIn, VK, Pocket

With Binario, you have the option to display social icons in the footer. To display them, set up [Params.Social] specific parameters in your site config file.

Available social services: Email, Facebook, Twitter, Telegram, Instagram, Pinterest, VK, LinkedIn, GitHub, GitLab, Stack Overflow, Mastodon, Medium

Contributing

Have a bug? Please open a new issue.

Pull requests are very welcome too, but please make sure they match the existing contributing guide.

License

Binario is licensed under the MIT License.