GithubHelp home page GithubHelp logo

bernardalvares / harbor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matsuyoshi30/harbor

0.0 0.0 0.0 7.9 MB

Simple and minimal personal blog theme.

License: MIT License

HTML 27.81% CSS 38.87% JavaScript 33.32%

harbor's Introduction

harbor - Simple Hugo Theme

Quality Gate Status

Simple and minimal personal blog theme for Hugo.

screenshot

screenshot-dark

Here is the demo link.

Features

  • Support tags and categories and archives
  • Google Analytics integration
  • Responsive
  • Dark mode
  • Syntax Highlight (see Hugo doc)
  • Search entire blog posts
  • Table Of Contents
  • Disqus

Installation & Update

$ # install
$ mkdir themes
$ cd themes
$ git submodule add https://github.com/matsuyoshi30/harbor.git harbor

$ # update
$ git submodule update --remote --merge

If you want to know more information, see Hugo doc.

Usage

When you manually create files by following quick start (step4), you should command hugo new post/<filename>.md instead of hugo new posts/<filename>.md because some styles are specified by the class name (like post-heading) in the main.css.

config.toml example

themes = "harbor"
baseurl = "https://example.com/"
title = "Hugo Themes"
paginate = 3
languageCode = "en"
DefaultContentLanguage = "en"
enableInlineShortcodes = true
footnoteReturnLinkContents = "^"

# Optional
# If you use googleAnalytics, you set top-level options in config.toml to the beginning of the config file like other top-level options.
googleAnalytics = "UA-XXXXXXXX-XX" 
# and disqus too.
disqusShortName = "yourdisqusshortname"

[Author]
  name = "Hugo Author"

[outputs]
  section = ["JSON", "HTML"]

[[params.nav]]
  identifier = "about"
  name = "About"
  icon = "fas fa-user fa-lg"
  url = "/about/"
  weight = 3

[[params.nav]]
  identifier = "tags"
  name = "Tags"
  icon = "fas fa-tag fa-lg"
  url = "tags"
  weight = 3

[[params.nav]]
  identifier = "categories"
  name = "Category"
  icon = "fas fa-folder-open fa-lg"
  url = "categories"
  weight = 3

[[params.nav]]
  identifier = "search"
  name = "Search"
  icon = "fas fa-search fa-lg"
  url = "search"
  weight = 3

[[params.nav]]
  identifier = "archives"
  name = "Archives"
  icon = "fas fa-archive fa-lg"
  url = "archives"
  weight = 3

[params.logo]
  url = "icon.png" # static/images/icon.png
  width = 50
  height = 50
  alt = "Logo"

Change favicon(static/favicon.ico) and icon(static/images/icon.png)!

If you don't change them, your favicon and icon are my face :)

Search entire blog posts

You should make search.md in content directory.

---
title: "Search"
---

{{<search>}}

TOC

If you want to use TableOfContent, you need to write words greater than 400, and set true frontmatter toc.

Back To Top Button

If you want to use Back To Top Button, you need to write words greater than 400, and set true frontmatter backtotop.

Archives

If you want archive page, generate archive.md file in content directory.

$ hugo new archives.md
+++
title: "Archive page"
type: myarchivetype
+++

Frontmatter example

+++
title = "Article title here"
date = 2020-02-15T20:00:00+09:00
tags = ["tags here"]
draft = false
toc = false
backtotop = false
+++

# Title

<!-- when toc is true and post wordcounts is greater than 400 -->

## Contents

Development

  1. Install Node.js and npm, the Node.js package manager.

  2. The package.json file in your new sub-theme contains the versions of all the Node.js software you need. To install them run:

     npm install
    

LICENSE

MIT.

harbor's People

Contributors

matsuyoshi30 avatar famished-programmer avatar sunary avatar

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.