Coder Social home page Coder Social logo

er's Introduction

Er.

A configurable blog theme for Hugo, with elements inspired by this blog.

Features

  • produces an Atom feed at feed.xml(taken from this discussion). It generates the latest 15 posts by default.
  • Open graph tags
  • tag and category pages
  • table of contents for your posts (from tocbot)
  • renders Math with KaTeX
  • tag cloud on big screens

Configurations

Favicon

You can put your favicon at static/favicon.ico, the theme will automatically look for it there. If you want to choose a different path, please set the favicon parameter in [params] in the config.

Atom feed

In order to enable Atom feed (instead of RSS), put this in your config.toml:

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

[mediaTypes]
[mediaTypes."application/atom"]
suffix = "xml"

[outputFormats.Atom]
mediaType = "application/atom"
baseName = "feed"
isPlainText = false

disableKinds = ['RSS']

Customize the colors

This theme uses CSS variables, and if you want to change the colours on this theme, you can override the variables.css in layouts/partials/css. This is loaded before the theme css.

Google analytics

Google analytics tracking code can be added to config.toml like this:

googleAnalytics = "UA-123-45"

Markdown TOC

Table of contents is activated by default, if it detects markdown headings. To turn it off, just add toc = false in the frontmatter. Alternatively, you can turn off contents page for the whole site by setting showtoc = false under the [params] section of config.toml, like this:

[params]
showtoc = false

Math rendering

Math rendering is off by default, can be turned on for individual posts or pages by setting math = true in the frontmatter.

Tag cloud

Tag cloud is shown by default. To disable, add showTagCloud = false under the [params] section, similar to showtoc. You can also configure the maximum number of tags you want to show in your tag cloud, using the maxTags key under [params]. This number is 50 by default.

back to top button

Back to top button is also shown by default. To disable, add showScrollToTop = false under [params].

er's People

Contributors

indes avatar lingxz 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

Watchers

 avatar  avatar  avatar  avatar

er's Issues

Disqus support

Hi! I'd like to add disqus to your theme. I know hugo has it's own internal template to add disqus. But what would be the perfect file to add the code?

{{ template "_internal/disqus.html" . }}

Thanks in advance and awesome theme! ❤️

How to navigation through sections?

Hello, Ling!
I'm new to hugo. With the help of your theme, now I have my rough blog page!

What should I do to set the section navigations or just as the top right corner in your sample figure(the links like "about Tutorials")?

Now, my directory structure under the content is:
├── about
│   └── about.md
└── post
     └── first.md

Error using ER in Hugo quickstart

Hello,
I a newbie with Hugo and I'm trying this theme, but I'm getting the following error

Building sites … ERROR 2018/05/29 23:25:38 Error while rendering "taxonomyTerm" in "": template: /home/emiguel/src/emiguelt/quickstart/themes/er/layouts/_default/terms.html:5:5: executing "/home/emiguel/src/emiguelt/quickstart/themes/er/layouts/_default/terms.html" at <partial "nav.html" .>: error calling partial: template: theme/partials/nav.html:1:22: executing "theme/partials/nav.html" at <len .Site.Menus.main>: error calling len: len of untyped nil

My config.toml:

baseURL = "http://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "er

Do I need to add any other source? Could you please provide a config file example.

Thanks a lot!

emiguelt

[Feature Request] Add support for series

Hello!

I'd like to be able to tag the front matter with a series attribute that will link related posts together and display that nicely in the post itself. An example of this is the Medium engineering growth series.

The elements of it are:

  • a series URL
  • a series metadata: title, URL, photo, and introduction and table of contents at the top of the post
  • an epilogue with previews of the other articles in the series

Design inspiration for this (shows a sidebar, but I'd like it to be an epilogue instead; Medium actually does put this at the bottom when the screen is narrow).
medium

[Feature Request] Thumbnails

Hello!

Taking cue from the Medium, one of the most popular blogging platforms out there, I would like to propose the post thumbnails beside the post snippet on list page.

medium

This is how Hugo theme story has implemented the post thumbnails:

story

[Feature Request] Search

Hello!

Search is one of the best and quickest way to browse any website. It would be really great if we could add the Search functionality in Er.

I would like to request the search functionality based on any of the non-commercial search tools.[0] e.g. hugo-lunr, hugo-elasticsearch etc.

Here[1] is the search functionality implemented by story theme using lunr.js[2]

Thanks!

[0] https://gohugo.io/tools/search/
[1] https://themes.gohugo.io/theme/story/search/
[2] https://github.com/olivernn/lunr.js

RSS isn't being offered explicitly

Hello!

While the index.xml for homepage (contains all the posts) is generated at https://themes.gohugo.io/theme/er/index.xml, the same isn't offered explicitly to the reader. On homepage there is neither the RSS icon nor the menu text like "Subscribe" or "Feed" etc.
homepage

Similarly, the index.xml for tag & category page is generated (contains all the posts with that specific tag or category) but isn't offered explicitly to the user. E.g. For tag "markdown" the index.xml is generated at https://themes.gohugo.io//theme/er/tags/markdown/index.xml but is not mentioned on the "markdown" tag page.
tag

[Feature Request] Medium-like image zoom

Hello!

Often, the user wants to zoom the image and take a good look at image details. Currently, I achieve this by right-clicking on image, then holding Ctrl and click "View Image" from context menu. Then shift to new tab opened and then finally click on the image to zoom in-out.

This is a lot of unnecessary distraction which breaks the reading flow of user.

It would preserve the reading flow if we implement medium-like zoom which is already implemented by Hugo theme Pickles using zoom.js

Here is the live demo in action: https://rootkea.gitlab.io/posts/image-zoom-sample/
And here is the screencast of the same:
foo

I'm not sure whether this fits with the Er's design, though.

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.