All Projects → qqhann → Hugo Primer

qqhann / Hugo Primer

Licence: mit
Hugo theme based on GitHub's Primer CSS

Projects that are alternatives of or similar to Hugo Primer

Hugo Theme Pure
A pure theme for Hugo
Stars: ✭ 198 (+92.23%)
Mutual labels:  hugo, hugo-theme, hugo-site, hugo-blog-theme
bookworm-light
Bookworm is a clean and modern Hugo blog theme focused on high speed and support multiple authors.
Stars: ✭ 59 (-42.72%)
Mutual labels:  hugo-theme, hugo, hugo-site, hugo-blog-theme
Hugo Eureka
Eureka is a feature-rich and highly customizable Hugo theme.
Stars: ✭ 239 (+132.04%)
Mutual labels:  hugo, hugo-theme, hugo-site, hugo-blog-theme
Hugo Casper Two
Port of Casper 2.x to Hugo
Stars: ✭ 135 (+31.07%)
Mutual labels:  hugo, hugo-theme, hugo-site, hugo-blog-theme
persian-hugo
Persian is a box design personal blog theme based on Bootstrap and powered by Hugo. It is very responsive and perfectly fits on any sized screen device.
Stars: ✭ 32 (-68.93%)
Mutual labels:  hugo-theme, hugo, hugo-site, hugo-blog-theme
restaurant-hugo
The restaurant is a creative and responsive restaurant website theme in Hugo environment. It is very well decorated theme which will make your website building easier.
Stars: ✭ 50 (-51.46%)
Mutual labels:  hugo-theme, hugo, hugo-site, hugo-blog-theme
Hugo Vitae
Vitae is a blog theme for Hugo that focuses on your content.
Stars: ✭ 81 (-21.36%)
Mutual labels:  hugo, hugo-theme, hugo-site, hugo-blog-theme
hugo-theme-fluency
A fluent hugo theme.
Stars: ✭ 48 (-53.4%)
Mutual labels:  hugo-theme, hugo, hugo-site, hugo-blog-theme
liva-hugo
Liva is a personal blog template powered by Hugo.
Stars: ✭ 192 (+86.41%)
Mutual labels:  hugo-theme, hugo, hugo-site, hugo-blog-theme
twenty-twenty-hugo
Twenty Twenty Hugo is forked from WordPress Twenty Twenty theme. It's fully functional like the WordPress theme.
Stars: ✭ 48 (-53.4%)
Mutual labels:  hugo-theme, hugo, hugo-site, hugo-blog-theme
geeky-hugo
Geeky is a Personal Hugo blog theme focused on high speed. Geeky is fully responsive, Superfast, and powered by Bootstrap v5.
Stars: ✭ 44 (-57.28%)
Mutual labels:  hugo-theme, hugo, hugo-site, hugo-blog-theme
navigator-hugo
Navigator Business theme powered by Hugo. It also could be used for a personal portfolio.
Stars: ✭ 133 (+29.13%)
Mutual labels:  hugo-theme, hugo, hugo-site, hugo-blog-theme
Hugo Theme Jane
A readable & concise theme for Hugo
Stars: ✭ 669 (+549.51%)
Mutual labels:  hugo, hugo-theme, hugo-site, hugo-blog-theme
Meghna Hugo
Meghna Hugo is a responsive one-page business template built with HTML5/CSS3, Hugo, JavaScript, and JQuery. The template is minimalist, lightweight, and fast loading.
Stars: ✭ 253 (+145.63%)
Mutual labels:  hugo, hugo-site, hugo-blog-theme
hugo-shortcodes-netlify-cms
Shortcodes of Hugo for Netlify CMS Text Editor
Stars: ✭ 50 (-51.46%)
Mutual labels:  hugo-theme, hugo, hugo-site
Hugo Theme Zozo
🌟 A simple and beautiful theme for Hugo
Stars: ✭ 258 (+150.49%)
Mutual labels:  hugo, hugo-theme, hugo-blog-theme
Cocoa Hugo Theme
Responsive Hugo blog theme
Stars: ✭ 306 (+197.09%)
Mutual labels:  hugo, hugo-theme, hugo-blog-theme
onepress
A simple, clean, and responsive "Hugo - Static Site Generator" theme for bloggers
Stars: ✭ 20 (-80.58%)
Mutual labels:  hugo-theme, hugo, hugo-blog-theme
Hugo Awesome Identity
😤 Awesome Identity is a single-page Hugo theme to introduce yourself.
Stars: ✭ 301 (+192.23%)
Mutual labels:  hugo, hugo-theme, hugo-site
Hugo Theme Learn
Porting Grav Learn theme to Hugo
Stars: ✭ 1,155 (+1021.36%)
Mutual labels:  hugo, hugo-theme, hugo-site

Hugo-Primer

A simple and beautiful Hugo theme based on GitHub's Primer CSS | 日本語記事

This theme would be a perfect fit if you are used to GitHub style pages.
Hugo-Primer is a theme based on GitHub style css: Primer, and adds some blog like features onto it.

Try it now, and leave me a star if you like it!

screenshot

Features

  • [x] Primer css like theme
  • [x] Menu bar header
  • [x] Colored code pen
  • [x] Math inline
  • [x] Awesome TOC
  • [x] Tags & Categories
  • [x] Social Share buttons

Installation

Clone to your theme directory:

git clone https://github.com/qqhann/hugo-primer.git themes/hugo-primer

hugo server --theme=hugo-primer

Usage

exampleSite

You can refer to exampleSite/ to get started. Reading exampleSite/_index.md is good too.

For a quick start:

cp -av themes/hugo-primer/exampleSite/* .

Customizing

config.toml

You can configure Hugo-Primer behavior with these params in your blog's config.toml. Shown are defaults and most recommended configs.

# config.toml

hasCJKLanguage = true
# Code pen
pygmentsCodeFences = true
pygmentsUseClasses = true

# Enter a copyright notice to display in the site footer.
# To display a copyright symbol, type `©`.
copyright = ""

[params]
# Chose Social Sharing Buttons you want to use.
shareTo = ["Twitter", "Hatena", "Facebook", "Pocket"]
# You may disable copyright sentence by setting this to false.
showFooterCredits = true

That being said, below is all recommended configuration example.

# config.toml

baseURL = "https://your_web_site"
title = "Your Blog"
theme = "hugo-primer"
languageCode = "ja"
# If you are using Chinese, Japanese, or Korean, I highly recommend you to set this true.
hasCJKLanguage = true
summaryLength = 70
# Code pen
pygmentsCodeFences = true
pygmentsUseClasses = true
googleAnalytics = "U-12345678-0"

# Enter a copyright notice to display in the site footer.
# To display a copyright symbol, type `©`.
copyright = "©Your Name 2019"

[frontmatter]
# update sitemap.xml's lastmod datetime by file change time, instead of git.
lastmod = ["lastmod", ":fileModTime", ":default"]

[params]
description = "Describe what your web page is about"
twitter = "your_twitter_id"
# You can use favicon by adding `favicon-64.png` to `static` directory.
# You can also add `apple-touch-icon.png` and `pinned-icon.svg`.  
useIcon = true
useTwitterCard = true
# Use MathJax.js. Disabling site-wide and you still can enable in indivisual pages
math = true

shareTo = ["Twitter", "Hatena", "Facebook", "Pocket"]
showFooterCredits = true

archetypes/default.md

It is also recommended to remove your site's archetypes/default.md, or copy Hugo-Primer's archetypes/default.md to your site.

---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
categories:
tags:
keywords:
---

page-level params

hugo-primer also comes with some custom page level parameters

  • showDate (default: true)
    shows the date on a post

  • comments (default: true)
    setting to false will hide disqus comments

  • toc (default: true)
    display the table of contents

  • categories (default: an empty list)
    a list of categories to display in the sidebar

  • tags (default: an empty list)
    a list of tags to display in the sidebar

  • math (default: false)
    If math.js is disabled for the site you can use this setting to enable it for a single page

  • keywords (default: an empty list)
    This adds a metatag to the page for listing keywords. This can be useful for SEO.

Example usage where the defaults are overridden:

---
showdate: false
comments: false
toc: false
categories:
- Diary
tags:
- Shopping
- Health
math: true
keywords:
- Cheese
- Milk
---

ruby annotation

ruby annotation allows you to show pronunciation of characters. Ruby in hugo-primer is like this:

ruby

You just need one line shortcodes code:

{{< ruby rb="深表遗憾" rt="Xi Wen Le Jian" >}}

{{< ruby rb="My heart is broken." rt="I'm happy for that." >}}

Contributing

Issues and PRs are welcome. :)

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].