GithubHelp home page GithubHelp logo

rafed / ramium Goto Github PK

View Code? Open in Web Editor NEW
42.0 1.0 26.0 3.03 MB

A modern hugo theme for awesome blogs

Home Page: https://themes.gohugo.io/ramium/

License: MIT License

HTML 83.94% CSS 11.99% JavaScript 4.07%

ramium's Introduction

⚠️ Check out my newer theme BlogRa which has a better UI and is better maintained.

Ramium

A modern hugo theme for awesome blogs

thumbnail

Features

Site features

  • Google search bar
  • Google Analytics
  • Social sharing bar (facebook, twitter, reddit)
  • Comments with Disqus
  • Customizable navbar
  • Admin panel (Not a real admin panel though. It simply shows the summary of the total number of posts, tags and sections)
  • Mobile responsive- works great across desktops, tablets and mobiles
  • SEO friendly (Opengraph, Twitter cards)

Blogging features

  • Attractive landing page with article/tag links everywhere
  • Add featured images to posts
  • Making sections for related articles (for example tutorials on a topic)
  • Add code snippets
  • Add math equations
  • Add tags to articles and list articles by tags
  • Add chord to lyrics (CSS style for ChordSheetJs)

Future plans

  • Google adsense
  • Suggestions for reading more articles at the end of an article
  • Support for facebook comments

Installation & Update

$ # install
$ mkdir themes
$ cd themes
$ git submodule add https://github.com/rafed/ramium.git ramium

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

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

Usage

  1. Make sure you follow the template structure of the examplesite (including the config.toml)
  2. When you manually create files by following quick start (step4), you should command hugo new posts/<filename>.md instead of hugo new post/<filename>.md.
  3. For the admin panel, sections list and author page to work the 'addons' directory must not be deleted.
  4. Detailed instructions are coming soon here.

config.toml example

baseURL = "https://rafed.github.io/ramium/"
#CanonifyURLs=true

languageCode = "en-us"
theme = "ramium"

title = "Ramium"
disqusShortname = "disqus-code"
googleAnalytics = "analytics-code"
pluralizeListTitles = false
enableemoji = false

[params]
    description = "A description for the meta tag of the site"
    googleSearch = "google-search-code"
    showDate = true # make false if dont want to show date for evergeen articles
    math = false # best to enable this in the front matter of a page
    githubLink = "rafed/ramium/"

    tagsInHome = 40     # set zero to not show in home page
    sectionsInHome = 5  # set zero to not show in home page
    paginatePostsPerPage = 5
    paginateTagsPerPage = 6

[taxonomies]
    tag = "tags"

[markup.goldmark.renderer]
    unsafe = true

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

    [[menu.main]]
        identifier = "blog"
        name = "This Blog"
        weight = 2
            [[menu.main]]
                parent = "blog"
                name = "All Tags"
                url = "/tags/"
                weight = 1
            [[menu.main]]
                parent = "blog"
                name = "All Sections"
                url = "/sections/"
                weight = 2
            [[menu.main]]
                parent = "blog"
                name = "All Posts"
                url = "/posts/"
                weight = 3
    
    [[menu.main]]
        name = "Author"
        url = "/authorr/"
        weight = 3

Frontmatter example

---
title: {{ replace .Name "-" " " | title }}
date: {{ now.Format "2006-01-2" }}
tags: [tag1, tag2]
image: "/image/blog-pic.jpg"
description: "A smalll description"
showDate: true/false    # to enable/disable showing dates
math: true              # to enable showing equations (katex)
chordsheet: true        # to add chordsheet styelsheet
---

Contributing

If you find problems with the theme raise an issue. Also, contributions/pull requests are welcome.

LICENSE

MIT.

ramium's People

Contributors

coliff avatar fcastello avatar rafed 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

Watchers

 avatar

ramium's Issues

Template failed on first run

I am brand new to Hexo and found your theme being almost a perfect match for my needs.

I followed the Quick Start at Hugo site and just used your theme instead of ananke. The very first run of hugo crashes:

PS C:\temp\helloworld> hugo server -D
Building sites … ERROR 2020/05/01 12:06:59 render of "taxonomyTerm" failed: "C:\temp\helloworld\themes\ramium\layouts\_default\terms.html:7:22": execute of template failed: template: _default/terms.html:7:22: executing "main" at <.Paginator>: error calling Paginator: 'pager size' must be a positive integer
ERROR 2020/05/01 12:06:59 render of "taxonomyTerm" failed: "C:\temp\helloworld\themes\ramium\layouts\_default\terms.html:7:22": execute of template failed: template: _default/terms.html:7:22: executing "main" at <.Paginator>: error calling Paginator: 'pager size' must be a positive integer
ERROR 2020/05/01 12:06:59 render of "section" failed: "C:\temp\helloworld\themes\ramium\layouts\posts\list.html:7:17": execute of template failed: template: posts/list.html:7:17: executing "main" at <.Paginate>: error calling Paginate: 'pager size' must be a positive integer
Built in 51 ms
Error: Error building site: failed to render pages: render of "home" failed: "C:\temp\helloworld\themes\ramium\layouts\index.html:34:37": execute of template failed: template: index.html:34:37: executing "main" at <first .Site.Params.TagsInHome (shuffle $randTags)>: error calling first: both limit and seq must be provided

I tried to replace your theme back with ananke and everything works so I belive the issue is with the theme and not the installation (I hope, sorry if this is not the case).

Not sure if this is related, but when reading your "Usage" section, I see that you write

When you manually create files by following quick start (step4), you should command hugo new posts/<filename>.md instead of hugo new posts/<filename>.md.

I am not sure where the difference between these two commands is?

Sections not showing on the home page if you only have one (same for tags)

If you only have one section (same for tags), the Sections part on the home page doesn't show up, due to this line in the template :

{{ if gt (len $randSections) 1 }}

I was kind of disappointed not seeing the Sections part although I only had one section (other than Posts). I think this should at least be a setting in the config.toml file to allow showing a single section on the home page.

Dark toggle

Hey have you tried adding a dark theme toggle. Ive been trying to add following this tutorial, but was only successful in making a toggle switch not actually changing the colors.

code style name

I love this theme very much !
But how can i change the code block style? eg:color

GA script is repeated

Hi Rafed,
I am seeing that the final page index.html is repeating the Google Analytics script.
I think the problem is in /partials/head.html.
In my case I have solved by removing the last line:
{{template "_internal / google_analytics_async.html". }}

Theme broken after latest updates

Hello again @rafed

Currently the theme fails with the following ERROR

1. About Ramium.md:11:19": failed to extract shortcode: template for shortcode "local" not found

You need to add the missing shortcode or change what is called in the above content file.

Also please test whether a project using your theme generates properly before pushing updates.

Once you fix the above, feel free to close this issue.

Thank you.

Cannot add a favicon

I put the favicon.ico into the static/image folder. But when I build it, it just put a favicon.ico into the root. Emmmmmm... It cannot show the favicon in Github Pages.

Thaks. 🙏🙏🙏🙏🙏🙏🙏

Remove bold and...

  1. How can I remove the bold for all words in the blog ?
  2. It looks ’m is not resolved at the very Front page, but only when you click and open the blog ???
  3. Where to add author?
  4. Where to specify sections??

Please refer to https://kind-feather.aerobaticapp.com/ temporarily.... Thank you

Example post fails to render on title in frontend

After copying the frontmatter from the example post, Higo crashes with

"C:\temp\helloworld\content\posts\my-first-post.md:2:1": failed to unmarshal YAML: yaml: invalid map key: map[interface {}]interface {}{"replace .Name \"-\" \" \" | title":interface {}(nil)}

1 ---
2 title: {{ replace .Name "-" " " \| title }} 
3 date: {{ now.Format "2006-01-2" }} tags: [tag1, tag2]

Replacing the templates with strings removes the issue.

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.