GithubHelp home page GithubHelp logo

qqpann / hugo-primer Goto Github PK

View Code? Open in Web Editor NEW
120.0 4.0 55.0 1.93 MB

Hugo theme based on GitHub's Primer CSS

License: MIT License

HTML 74.05% CSS 25.95%
hugo hugo-theme hugo-blog-theme hugo-site primer primer-css theme gohugo

hugo-primer's People

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

hugo-primer's Issues

Add documentation

Landed here after following a link from the theme site. Could you please add some documentation to this theme? Thanks.

Let TOC appears in search result for better SEO

When writing a huge summary article, it becomes a rather disadvantage because small topics will not show up in search results.
To overcome this, adapt to google's detailed search result with TOC contents.

May I add support for ruby tag in HTML

Hi Pan,

I pretty like your theme hugo-primer, it's brief and beautiful.

And I commit a hugo shortcodes to my fork, and it add support for ruby tag in this theme.

You can find the definition of ruby tag in MDN Web docs and my commit in add support for ruby tag in HTML .

The result of ruby tag in hugo-primer is like this:

图片

And you just need one line shortcodes code:

{{< ruby rb="深表遗憾" rt="Xi Wen Le Jian" >}}

{{< ruby rb="My heart is broken." rt="I'm happy for that." >}}

There is an actual view of this shortcodes at the beginning of this post.

Would you like merge this shortcodes into your original repo?

I can make a pull request for that.

Thanks for reading.

A scroll bar appears at table of contents

When I refer to this theme, I see the scroll bar in the table of contents:
このテーマを参照した時、目次にスクロールバーを見ます。

This scroll bar is not displayed in IE, but it is displayed in Chrome, Firefox and Edge.
このスクロールバーは IE では表示されませんが、Chrome・Firefox・Edge では表示されています。
This has destroyed the design of the theme.
これにより、テーマのデザインを崩してしまっています。

This solution is a simple CSS addition:
この解決はシンプルなCSSの追加です。

static/assets/style.css

.pr-3 {
  overflow: auto;
}

Change the subtitle?

Thanks for creating this beautiful theme. How do I change or hide the Subtitle of the site? I have shown it with arrow in the image below. It takes the same text of the 'title' inside config.toml file.

I tried using 'Subtitle' inside [params] but it has no effect.

2019-06-11_14-46-49

Add support for code in title

Hello Pan,

When I use code in title, for example:

图片

the result of TOC is broken into three lines, like this:

图片

I try to fix it but I cannot find out where should I modify.

All of us will appreciate it if you can fix it.

如果我的英语没有太讲明白的话,问题是这样的:

在标题里插入代码会造成右上角生成的目录里,插入代码了的那行标题会折成多行。

我尝试自己处理结果没找到地方修改,后端工程师面对css和js很苦手。

不知道是bug还是feature,如果是bug的话麻烦修复,非常感谢!

The date display is wrong

That is a very simple mistake:
それは単純な誤りです。

/layouts/index.html

{{ .Date.Format "2006-01-01" }}

In this way,2018-12-12 will be displayed on December 31, 2018.
これにより、2018年12月31日は 2018-12-12 と表示されています。

Changing the number corresponding to the day will solve it.
日に該当する数字を変える事で解決できるでしょう。

Here it is 2006-01-02:
ここでは 2006-01-02 になっています。
https://gohugo.io/functions/format/

It also exists in this file:
このファイルにも存在します。

The name shown in copyright.html should be the author of the website.

Now, what shown in copyright.html is the author of the theme. However, I think it should be the author of the website that uses this theme.

If it goes on like this, readers should misunderstand that "Qiushi Pan" is the author of contents published on the blog that is using this theme.

https://github.com/qqhann/hugo-primer/blob/0df6b6735b69ff808af1055fd540c0463acfa62a/layouts/partials/copyright.html#L1

How do you think about it?

Favicon: Should explain how to add a website icon

# You can use favicon by addin them manually.
useIcon = true

SHOULD BE:

# You can use favicon by addin them manually. 
# (Place an image with filename `favicon-64.png` in `static/`.)
useIcon = true

TOC not working with Rmd files

Hi,

Thank you for creating this theme. It's simple and works well to my needs. However, I'm having an issue with TOC and Rmd files. I don't have any expriences in web development, so bear with me while I try to explain this:

I'm using Rmd files to compile new posts, but the posts are not displaying the floating TOC correctly: only TOC title are displayed (my post: https://truonghm.github.io/).

I have done my own researches and look at theme source files, and here are my findings:

  1. TOC being included is determined in the file _default/single.html

  2. The HTML output of normal Markdown file has its headings in the following format:

<h3 id="this-is-a-heading">This is a heading</h3>
  1. While the HTML output of R Markdown file has its headings in a different format:
<div id="this-is-a-heading" class="section level3 unnumbered">
<h3>This is a heading</h3>

And as such it looks like the TOC engine doesn't recognize headings from Rmd files to build TOC.

I'm thinking of 2 solutions to this problem:

  1. Change the TOC engine (I haven't figured out its location yet) so that it also recognize a different heading pattern from Rmd

  2. Include some code in the Rmd files so that the headings are produced correctly

I don't have much knowledge regarding HTML/CSS/JS, so it would be a great if you can provide some help.

Thank you again for building the theme!

Edit: This is also the first time I'm submitting an issue on GitHub, and I think the "bug" label does not apply correctly here... Is there any way I can edit this?

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.