GithubHelp home page GithubHelp logo

vimux / mainroad Goto Github PK

View Code? Open in Web Editor NEW
872.0 28.0 451.0 1.54 MB

Responsive, simple, clean and content-focused Hugo theme based on the MH Magazine lite WordPress theme

Home Page: https://mainroad-demo.netlify.app/

License: GNU General Public License v2.0

HTML 54.42% CSS 43.85% JavaScript 1.73%
hugo hugo-theme theme mainroad

mainroad's People

Contributors

andytson avatar atdx avatar betmaster avatar cdyson37 avatar dependabot[bot] avatar gsej avatar hartegg avatar hsins avatar imaderaya avatar lisa005 avatar matheusrocha89 avatar michi10560 avatar middling avatar mihorus avatar nosbig avatar nurmukhamed avatar oshliaer avatar randruc avatar rednafi avatar rmacd avatar ryugibo avatar thomasheller avatar thomaslevesque avatar tomas-l avatar tomponline avatar troubleshooter avatar txzk avatar vimiix avatar vimux avatar yuqingc 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mainroad's Issues

Social Media widget

Hi @Vimux do you have plans to create this widget or is already working on? Can I help you with something?

German translation causes css bug

back

The overflow: hidden; on .post-nav__caption causes the dots of the ü to be half cut off. Is there a special reason for this property or can we drop it?

CSS doesn't show <code>

The CSS for Mainroad doesn't have any rules to indicate Code blocks (such as code in Markdown). This makes small quoted snippets blend in with the quoted text.

Removing side panel on main page

I am new to HTML so maybe there is a better way to do it. I wanted to remove the side panel from single page template (i.e. after opening a post). I commented {{ partial "sidebar.html" . }} in the single.html file, but then I am having issues with the width of the article. Is there a way to handle the width of the post after opening it and not affecting the same on the start page of the website?

Other social widgets?

Is is possible to add other social widgets? For example, instead of social_github i want to use social_mygitlab to point to my gitlab account. Additionally, i would like to point to my mastodon account.

Thanks!

Space between time and category

In the default single.html layout, the category icon is placed as a span after the time display in the header. The space between the two seems a bit small so would it be possible to either increase the space or just move the category to be right justified.

image

Favicon support

How would I add a custom favicon to the theme? The documentation around Hugo is sparse as well. I've seen some themes handle this in a a custom way.

Last Modified icon

Hi, @Vimux.
Do you have a plan that add "Last Modified" icon?
Date is icon, But "Last Modified" is strings "(Last Modified: 〜)".
I like to use icons to both.

how to realize the style,the summary dont include the img of the head of artical.

my article front matter and content:

title: "hugo搭建博客"
description: "hugo+GitHub page 搭建静态博客"
date: 2017-12-02T21:44:50+08:00
categories: [hugo]
tags : ["hugo","blog"]
thumbnail:"/img/logo/innovation.png"
draft: false
---
![](/img/article/inspiration-banner.png)
这事一篇关于hugo生成博客及安装在GitHub上实现……

i see the result in the example "https://mythinkpond.com",the summary dont include the img of the head of artical and the article dont include the img of thumbnail.

how should i do it?

Looked promising but...

Mainroad looked really promising but I couldn't for the life of me get my pages to show up. It was definitely picking up the theme -- I could enter the URL of the pages and have them show, the authorbox was there, etc. But nothing on the main page other than theme-related stuff, not TOC, etc.

Switched to hugo_theme_robust and had instant gratification; no other changes to my site other than switching the --theme parameter when launching the server.

You've obviously put a lot of work into this, the sample site looks great, but I feel like there's something (likely simple) that isn't mentioned in the documentation.

Two issues: italics, mathjax

I am experimenting with mainroad, whose look I like very much. I currently have two issues:

  1. Italics, such as _italics_ in the markdown file, are not rendered in the final html. How can I fix this?

  2. I can't get mathjax to work. I have a mathjax.html file which I have used with other themes, and which I have copied to the layouts/partials directory. And I have included the line

    {{  partial "mathjax.html" . }}
    

in header.html in that directory. In other words, following the instructions here. As I say I have got mathjax working with other themes, but I can't seem to get it working with mainroad.

Almost every time I make a change, I remove the public directory, run hugo and then hugo server to see the results. This ensures there are no left over files from previous edits.

Anyway, any help or advice would be very welcome!

Ability to Turn Off Disqus for Certain Pages?

Awesome theme! In many other themes, the option is there to turn off comments for certain pages/posts by adding a "comments = false" in the frontmatter. This would be great in, for instance, the about.md page. Any possibility to add this feature?
Thanks!

Missing google analytics support

It looks like you only added support for the googleAnalytics metadata to an _internal template file... going by the commits. This needs to be pulled into the public code. I noticed it when my google data dropped to zero after switching to this theme.

8f72fe4

CSS styling not carrying over into /public

Hello.

Does anyone have a clue why the CSS styling doesn't carry over in the /public folder? Everything works fine when previewing with Hugo's built-in web server. However, moving the contents of /public to my web server results in all text and no CSS. I've tried everything that I can think of and I can't figure out what's causing it.

Patrick

[class*="col-"] matches too much

This theme has two rules matching attributes [class*="col-"]. This conflicts with (also matches) KaTeX's .col-align-* class definitions. This was encountered by a real user: KaTeX/KaTeX#1445 (comment)

The trouble is that, even if KaTeX isolates its class definitions as e.g. .katex-col-align-*, we would still have a conflict. Is there a stricter matching rule that you can use? I'm one of the KaTeX maintainers and can submit a PR on our side, but I'd rather not have to avoid any class name containing col- as a substring...

[hugo-0.18+] "Everything is a Page"

I'm trying to use your theme and Hugo-0.19, but I'm having some problem. I believe the troubles are related to the "rule" everything as a page.

According to the new rules of Hugo-0.18+ it threat everything as a page (https://gohugo.io/content/using-index-md/) if we use _index.md.

Then I created a sample test site to check, but it doesn't work (https://github.com/adrianovieira/poc-hugo-issue-3387).

.
├── archetypes
├── config.toml
├── content
│   ├── about
│   │   └── _index.md
│   └── _index.md
├── data
├── layouts
├── static
└── themes
    └── mainroad
        ├── ...

May be it isn't an issue in your theme itself, but I hope you can point me some solution or workaround. Could you?

Proposal of categories arrangement

I am not a programmer and a newbie to Hugo. I am using your theme. And can I ask for your help with the theme improvements?
As the title says, I would like to propose the following items about categories,

  1. could you please add categories to config.toml file and under the categories section in theme, it only shows the categories added in config.toml file?
  2. could you please make categories order arrangeable? For example, the categories order can be got from the config.toml file.
  3. I would like to get your help to put the categories in the config.toml to the horizontal navigation bar.

Thank you so much for your them. I hope my proposal will be accepted.

Front matter formating wrong on some example pages ?

Hi there,

1st of, thanks for the porting of this nice theme to Hugo. I'm all new to this so I may be wrong, but I think you have some of the front matter headers that are not correct in the example files you provided.

Example in "./mainroad/exampleSite/content/post/creating-a-new-theme.md" file you have :


author: "Michael Henderson"
date: 2014-09-28
linktitle: Creating a New Theme
menu:
main:
parent: tutorials
next: /tutorials/github-pages-blog
prev: /tutorials/automated-deployments
title: Creating a New Theme
weight: 10

So on my own site I'm currently building, I took the example to build the menu and had errors with that.
I think the expected separator in there is "=" and not ":" with double quotes on the variables (else I had problems launching the Hugo server, with an 'unexpected token' as stated by Hugo).

Keep up the good job ;).

edit : my bad, thought only the toml format was supported - will perform a bit more checking see what was going on with my template.

Content on list pages is not rendered well

Content on pages using the list template is not rendered well. This test case highlights the problem.

brokenlist

I think the correct approach to solving this is moving the css properties for children of post__content to content. Then overwrite for children of meta, list__item and so forth. What do you think?

the singlepage don't display the sidebar

copy the new theme's content to vicinal config.toml,the singlepage don't display the sidebar.

[Params.sidebar]
home = "right" # Configure layout for home page
list = "right" # Configure layout for list pages
single = true # Configure layout for single pages
#Enable widgets in given order
widgets = [ "recent", "categories", "taglist", "social"] #"search"

how to set up ?

Added some stuff, can check on loneworg.com

Hi Vimux,

Not sure how the pulling requesting works yet (need to read a bit more about GIT), but just so you know I did a few changes on the template that you can see on my live address here : http://loneworg.com

Stuff added for now (not taking images added into account as this is trivial and a matter of personal taste) :

  • "Read more" button (changed in list.html + style.css)

Next on the list :

  • Better image embedded management (pop-in)

Let me know if interested to put that in your mainstream

Math render

Hi
I am having problems to visualize math in latex into your theme. It is very good by the way, thanks!

Add Page Bundles and Image Processing support

Hi,

as a Hugo newbie, I'm asking me, how to add an image in a nic way. I already know {{< figure src="/blog/2018/images/foo.jpg " title="iRed" alt="Foo">}} and the markdown way ... but I don't understand the way, how to change (size/rotate/board/float) an image, is that theme like question (e.g with shortcode), or is that a real Hugo question ?

cu denny

Code block is too long

You can refer to my blog, when codeblock is too long, the format of the webpage will not display correctly.

Multilingual links

According to fbf98fc, multilingual string is added in i18n/en.yaml. I can added fr.yaml and zh.ymal to i18n. But there seems to be no multilingual links in pages. Could you please creat an example of multilingual links. @Vimux

Menu

Hi, I like your theme but have noticed that there seems to be a problem with the menu in recent days. Also it would be good if the menu is responsive when viewed on a phone (like the MH Magazine Lite web site). Thanks.

printf not available in the theme's minimum hugo version

printf, used in #21 isn't available in Hugo 0.19, which is the theme's minimum version. It was introduced in Hugo 0.20 gohugoio/hugo@45b9d72

The code affected is https://github.com/Vimux/Mainroad/blob/master/layouts/_default/list.html#L26

options are to either:

  1. update the minimum version to 0.20
  2. update the code to use range and if conditions to add the comma's, content/, and "and". Note this would not be pretty
  3. use a simpler formatting, not using natural language, or structured differently like
As posts are added in the content subfolders (blog, news) ...

What do you think?

figure shortcode css

Hugo has this shortcode thing for including figures with caption and title from markdown. Consider the following markdown snippet and screenshot of the output. It's obviously broken. The second image is from MH Lite. A pull request will follow.

{{< figure src="img.jpg" title="the title" attr="(the source)" caption="this is the caption">}}

Wir stehen Tag und Nacht...

mrfigcap

mhfigcap

List pages not working for directories other than post directory

I was using your theme and I was trying to get the section pages to work. This is what my content directory looks like.

.
├── about.md
├── new-section
│   ├── _index.md
│   └── article.md
└──  post
    ├── _index.md
    ├──  activities.md
    └── ...

When I go to localhost:1313/post/, it behaves as expected and displays the articles in the post directory in a list format. However, when I go to localhost:1313/new-section/, it says that I don't have any posts yet even though I have article.md under the new-section directory.

Another issue is that the _index.md files do not work as expected. The content in these files is not displayed on the list pages.

I believe my problem is similar to the one referenced in #16. It would be great if you could fix this issue since I really like this theme and would like to be able to use a functional version of it. If it helps, I believe this theme has this issue fixed.

Content does not appear on Home

I have some content inside content/posts folder and I can access it directly, however, the template will always say:

You don't have any posts yet!

As posts are added in content/post folder, they'll appear here.

And no recent posts will appear on the sidebar

Thanks

Handle menu bar overflow

So I managed to overflow my menu bar while experimenting and this is what I see.

image

What appears to have happened is that the menu bar has wrapped around. The red box near the top left is supposed to be an item in the menu bar. It would probably be nice to address this issue somehow.

Add a submenu

Hi, thank you very much for your nice work. It is a very good theme.

I was wondering if it was possible to use submenus ? I was wondering to add a submenu which is similar as HTML Dropdown Menu.

Thank you so much. Really appreciated.

Theme requires safeHTML ?

When my frontmatter title contains a colon character I have to use the entity &#58; because using a normal colon breaks the YAML syntax

YAML:

---
title: Test&#58; post
date: 2019/01/01
---

This entity isn't "rendered" on the generated page unless I make the following changes:

In single.html
<h1 class="post__title">{{ .Title }}</h1>
should be
<h1 class="post__title">{{ .Title | safeHTML}}</h1>

and in summary.html
<a href="{{ .RelPermalink }}" rel="bookmark">{{ .Title }}</a>
should be
<a href="{{ .RelPermalink }}" rel="bookmark">{{ .Title | safeHTML }}</a>

Is this a bug of sorts or am I missing something?

mathjax is not enabled on main page

Even enabling mathjax option, it will not render math formula on the main page. I think it will be better to add,
{{- partial "mathjax.html" . -}}
at summary.html as well.

postSections = ["posts"] versus "post"

maybe worth posting to the wiki...

the Hugo Quickstart uses plural "posts" for the main content folder and other themes i explored prior to MainRoad weren't dependent on the naming so it took me a bit to realize why no posts were showing on the MainRoad theme's home page... i'll admit, i am new to Hugo ecosystem and i do see that MainRoad's exampleSite shows you what it's expecting

to be clear, because my folder is named content\posts, i needed this in my config.toml

[Params]
    postSections = ["posts"]

versus the exampleSite's default config.toml

[Params]
    postSections = ["post"]

RSS content is not generated

Looking to see how to generate RSS content with this theme. Unable to generate the RSS files.

Features says that rss is available.

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.