Giter Site home page Giter Site logo

hugo-fabric's Introduction

hugo-fabric

Hugo Fabric Theme, forked from https://github.com/wd/hexo-fabric.

hugo-fabric screenshot

Features

  • Support archives (But archives page and tags page didn't support pagination :( )
  • Tags list
  • RSS link and social account links
  • Disqus support
  • Use Highlight.js for code highlight

Installation

First clone this repository in the themes/ directory:

$ cd themes/
$ git clone https://github.com/wd/hugo-fabric

Second, specify hugo-fabric as your default theme in the config.toml file. Just add the line

theme = "hugo-fabric"

Please check the exampleSite directory for an example site.

Hugo settings

Set rss link name, default is rss.xml.

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

[outputFormats]
[outputFormats.RSS]
mediatype = "application/rss"
baseName = "atom"

Theme settings

Put settings below into your config.toml.

[params]
  author = "wd"
  [params.theme]
    subtitle = "happy every day"
    post_type = "page" # For archive
    archive_post_type = "archives"

    # According to https://discuss.gohugo.io/t/how-to-access-the-top-level-rsslink-from-a-post/2044, we have to set this ourself
    site_rsslink = "atom.xml"

    # social account
    github_user = "wd"
    twitter_user = "wd"
    disqus_shortname = "wdicc"

    # post sharing
    facebook_like = true
    twitter_tweet_button = true
    addthis_profile_id = "wd"

Favicon

There is a default favicon with this theme, you may want to change it. Just put it at themes/hugo-fabric/static/images/fav.ico.

Code highlight

If you want to change to your favourite highlight style, just download the css file and replace themes/hugo-fabric/static/css/hljs.css. Since all languages package are too big, the CDN version only include 23 languages support. If you want more languages, please download a custome version of highlightjs and modify layouts/partials/head.html.

Archive support

Create a new file hugo new archives.md, and edit this file, add the following line in front matter.

type = "archives"

Todo

  • TOC support

Others

hugo-fabric's People

Contributors

wd avatar bep avatar tommorris avatar

Watchers

 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.