Giter VIP home page Giter VIP logo

erblog's Introduction

Erblog

⚠️⚠️⚠️ Note: Mathjax is not included directly due to the performance considerations now!

Use math: true in Front Matter to enable Mathjax in each single page.

Or set Params.math: true to enable it globally.

A personal blog theme powered by Hugo. Erblog is written by Ertuil with layui.js, font-awssome, github markdown css and undraw.

images/screenshot.png

Erblog is also a responsive theme which means it is customed for your mobile platforms.

images/mobile.png

Now it is possible to change the color of your themes. Use Params.badge and Params.quote to select one of your favourite color.

Some Pictures
images/color1.png images/color2.png
images/color3.png images/list.png
images/single.png images/zone.png

1. Installation

You can install the theme by git clone.

$ git submodule add https://github.com/ertuil/erblog themes/erblog
$ git submodule init
$ git submodule update

Now you can get updates to Erblog in the future by updating the submodule:

$ git submodule update --remote themes/erblog

@progressify contributed a new style for scrollbar. You can check out the branch called https://github.com/ertuil/erblog/tree/styled-scrollbar to use. Here is an example: https://progressify.dev Thanks to his contribution.

2. Configuration

There are some basic configuration options you may want to use:

Name Description Default
title Name of your website None
googleAnalytics Google Analytics ID None
Params.portrait Path to your portrait erblog/static/self/img/avatar.jpg
Params.author Your Name Authors
Params.description Description of your Blog Intro
Params.bio A Biography for your Blog None
Params.logo Your Blog's Logo None
Params.favicon The favicon file /favicon.ico
Params.math import mathjax globally false
Params.index_posts_num The number of posts displayed in Index 5
Params.google_search Enable Google Intra-Site Search Engine false
Params.badge The color for badge ('red', 'cyan', 'orange', 'green', 'blue', 'black' and 'gray' are available) 'red'
Params.quote The color for quota ('red', 'cyan', 'orange', 'green', 'blue', 'black' and 'gray' are available) 'green'
Params.notice Contents of notification none
Params.notice_color The color for notification background ('red', 'cyan', 'orange', 'green', 'blue', 'black' and 'gray' are available) 'red'

Add your own custom menus in the config.toml like this:

[[menu.main]]
    url = "/home/"
    name = "Files"
    weight = 6

[[menu.main]]
    url = "/dl/"
    name = "Download"
    weight = 7

A Menu in the footer is also available:

[[menu.footer]]
    identifier = "home"
    name = "home"
    url = "/"
    weight = 1

[[menu.footer]]
    identifier = "about"
    name = "About"
    url = "/about/"
    weight = 2

Now you can add your contacts like this:

# Social icons to be shown on the right-hand side of the navigation bar
# The "name" field should match the name of the icon to be used
# The list of available icons can be found at http://fontawesome.io/icons/

[[menu.icon]]
    url = "mailto:[email protected]"
    name = "envelope-o"
    weight = 1

[[menu.icon]]
    url = "https://github.com/username/"
    name = "github"
    weight = 1

[[menu.icon]]
    url = "https://twitter.com/username"
    name = "twitter"
    weight = 1

[[menu.icon]]
    url = "https://www.instagram.com/username/"
    name = "instagram"
    weight = 1

For more details, see the example site.

3. Content Management

3.1 Posts

There are three basic sections, 'post', 'zone' and 'gallery'. You may create a new post using the following command:

hugo new post/post_name.md

3.2 Zone

A section like facebook

images/zone.png

hugo new zone/example.md

3.3 Gallery

Gallery is a simple collection for your photos.

images/gallery.png

hugo new gallery/gallery_name.md

You can upload your files to the /static directory and write the contents in gallery_name.md:

---
title: "A gallery"
date: 2019-12-01T13:21:53+08:00
draft: false
---

![0](/avater.jpg)
![1](/people/1.png)
![2](/people/2.png)
![3](/people/3.png)

3.4 Add a Zone and Gallery to the Menu

Add the following content to your config.toml file:

[[menu.main]]
    url = "/zone/"
    name = "Zone"
    weight = 1

[[menu.main]]
    url = "/gallery/"
    name = "Gallery"
    weight = 2

4. User-Defined HTML Hooks

There are two hooks available for you to insert your HTML code.

  1. layouts/partials/self-define.html renders content above the footer for every page.
  2. layouts/partials/self-define-single.html renders content above the footer for every blog post. This hook is useful to define your comment modules, such as gittalk, and Disqus.

4.1 Using Hooks to Add Discus Comments

Add Discus comments to the bottom of each post by inserting the following in the layouts/partials/self-define-single.html hook.

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

For this to work you will also need to define the disqusShortName in your config.toml:

disqusShortName = "your-disqus-shortname"

erblog's People

Contributors

ertuil avatar matthewturk avatar stipx 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  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

erblog's Issues

Unable to push to repository

Hello are there some permissions that were disabled where we cannot push branches and create PRs? I keep getting this:

$ git push --set-upstream origin minor-changes
remote: Permission to ertuil/erblog.git denied to lloydroc.
fatal: unable to access 'https://github.com/ertuil/erblog.git/': The requested URL returned error: 403
$

Some advice about code blocks

This is a really great theme, thanks for all your hard work! How can I make the code block shrink as the screen shrinks so that it won't look too bad to read on a small screen (mobile phone). Also, if possible, I would like to add some small functions to the code block such as copying, displaying the code block name, etc., which will make it look more modern. If possible, I hope he is a mac-style window, so it looks more beautiful! Thank you again for your hard work, erblog is really a great theme, I hope to get your help with my problem.

Upgrade to MathJax 3.0.5

Hello can we update MathJax? It seems to look fine on desktop but on mobile the matrix doesn't look ok. I'm hoping upgrade will fix.

If possible are there some instructions on how to upgrade we can put in README? Put them here and I can make a PR for it.

Tags URL Missing Slash

On the main page it lists all the tags and categories and you can click on them. The URL that is rendered has a trailing / so the server doesn't have to 301 back to /index.html. This is good. However, on the index pages for the tags they don't get rendered correctly. They need a trailing /.

See here. For each of the posts the signal-processing tag next to the date the url is https://lloydrochester.com/tags/signal-processing and should be https://lloydrochester.com/tags/signal-processing/. It's making the server 301.

I'm on commit e90862125b681557ef644618fc71d36f9bd21326.

Thanks.

jQuery support

Hi
for jQuery support, I must include it externally? With a CDN or I must add the library in static files?
Or layui natively support jQuery?
Sorry but I don't be able to find English docs for layui

image

mathjax error

For mathjax library, you have used a CDN
I receive some error in console relative to mathzoom.js and mathmenu.js
I have resolved to download mathjax from GitHub and including them in my project. Please control this problem in your version of the template.

Question about turning off disqus commenting from about page

Awesome theme! I am very new to Hugo, and I am using your theme for my personal website. I just had a quick question about disqus comments with your theme. I was able to follow your instructions on the readme by inserting {{ template "_internal/disqus.html" . }} in the self-define-single.html, and my disqus short name in the congif.toml.

Is there a way to turn off the commenting for the about page or to only have commenting available on each post? I think it really only makes sense to have commenting on things like posts and similar content. Hope my question makes sense. Again, awesome theme. I am enjoying it.

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.