Giter Club home page Giter Club logo

hugo-theme-even's Introduction

hugo-theme-even

GitHub contributors GitHub release GitHub commits (since latest release) GitHub

A super concise theme for Hugo

It's a port of the hexo-theme-even

Demo | 中文说明

Screenshots

even-showcase

Installation

$ git clone https://github.com/olOwOlo/hugo-theme-even themes/even

Important: Take a look inside the exampleSite folder of this theme. You'll find a file called config.toml. To use it, copy the config.toml in the root folder of your Hugo site. Feel free to change it.

Important: This theme uses Hugo Pipes. Modifying contents in assets requires the extended version to be installed.

NOTE: For this theme, you should use post instead of posts, namely hugo new post/some-content.md.

Language Support

Translations are collected from the themes/even/i18n/ folder (built into the theme), as well as translations present in i18n/ at the root of your project. The translations will be merged and take precedence over what is in the theme folder.

To use the translations, just set a correct value for defaultContentLanguage.

defaultContentLanguage = "en"  # en / zh-cn / other...

Can also support any other languages as well. For example, to support german, create a file /i18n/de.yaml in the root folder of your Hugo site. For reference template you can see the en.yaml file.

P.S. In multilingual mode, the language which currently being used to render the website will be used.

Language selector

It is possible to enable language selector for multilingual site. It will be displayed in the header or in the slide menu.

To enable it, set showLanguageSelector parameter to true.

showLanguageSelector = true

Favicon

In order to customize the favicon you need to place all the following files in the static folder at the root of your site, which will overwrite those files in the themes/even/static/ folder.

  • android-chrome-192x192.png
  • android-chrome-512x512.png
  • apple-touch-icon.png
  • browserconfig.xml
  • favicon.ico
  • favicon-16x16.png
  • favicon-32x32.png
  • manifest.json
  • mstile-150x150.png
  • safari-pinned-tab.svg

A favicon generator can help you generate these files.

Front Matter

You can customize something for a single content in the content's front-matter. The themes/even/archetypes/default.md shows all available params. Copy this file in the archetypes folder at the root of your project will be useful.

Shortcodes

This theme provides center, right, left, music, admonition shortcodes, and support center, right, left class for the built-in figure. See more information from there.

Theme Color

There are five built-in theme colors ( Default | Mint Green | Cobalt Blue | Hot Pink | Dark Violet ), you can config it by changing the $theme-color-config value in /assets/sass/_variable.scss.

Update Theme

cd ./themes/even/
git pull

Whenever you update this theme, you should check the CHANGELOG.md file, there may be some breaking changes.

License

Released under the MIT License.

Acknowledgements

hugo-theme-even's People

Contributors

alicewish avatar antiagainst avatar bobuhiro11 avatar bwangelme avatar byronhe avatar evrifaessa avatar flexoid avatar ghraecakter avatar keithmork avatar laroche avatar liugq5713 avatar lryong avatar lzjluzijie avatar mbrukman avatar morya avatar nusr avatar olowolo avatar panda-z avatar sanjayts avatar scarletsky avatar sslyxhz avatar suclogger avatar sww13 avatar tac0x2a avatar trentzhou avatar wolfecub avatar xujiongda avatar yhliyr avatar zhaozhiyuan1989 avatar zhengyhn 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

hugo-theme-even's Issues

现在不支持文章内自定义url了吗?

因为是从其他博客系统迁移过来的,所以很多老文章都是在文章内自定义url的(用url="xx"来指定),一直可以的,今天更新后发现旧文章都404了

image加上边框

hello!有个小白问题,我想给markdown的图片都加上边框,请问怎么设置啊?

我尝试在_custom.scss里加入一下代码, 好像并没有效果。

多谢!

img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
  border: 5px solid;
  padding: 15px;
}

按说明配置后首页无法列出文章列表,手动输入地址可以显示内容

操作系统 Debian 9

按照说明配置后,http://localhost:1313/首页不显示文章内容,但手动输入地址可以显示内容。

content/post/my-first-post.md为例(目录中只有这么一个文件),手动输入http://localhost:1313/post/my-first-post/,可以显示内容。

点击Archives,浏览器地址为http://localhost:1313/post/,也没有文章列表显示。

quickstart/config.toml是按照说明从even主题目录中复制过去的,几乎没有更改其中的参数值。

我需要如何操作才能在主页正常显示文章列表(如demo展示的那样)。

文章底部的上一页/下一页是不是写反了?

看到 layouts/post/single.html 里 {{ with .NextInSection }}{{ with .PrevInSection }} 的位置跟里面的文字和class名都反了,是写错了还是故意的?

      <!-- Post Pagination -->
      <nav class="post-nav">
        {{ with .NextInSection }}
          <a class="prev" href="{{ .URL }}">
            <i class="iconfont icon-left"></i>
            <span class="prev-text nav-default">{{ .Title }}</span>
            <span class="prev-text nav-mobile">{{ T "prevPost" }}</span>
          </a>
        {{- end }}
        {{ with .PrevInSection }}
          <a class="next" href="{{ .URL }}">
            <span class="next-text nav-default">{{ .Title }}</span>
            <span class="prev-text nav-mobile">{{ T "nextPost" }}</span>
            <i class="iconfont icon-right"></i>
          </a>
        {{- end }}
      </nav>

另外最下面那个class prev-text 是不是应该为 next-text

虽然哪个都没影响,目前在 src/css/_partial/_post/_footer.scss 无论是 pre-text 还是 next-text 都没定义……

如何使用static目录的图片

Markdown中怎样使用本地图片?如 /static目录下的*.png
通常用 ![fig](/static/img.png) 来插入图片,在这个主题下,没有显示。

内网使用hugo,可否考虑提供将js/css资源文件集成到even中 (use hugo intranet, maybe provide a package with js/css asset built in)

hugo很方便,现在内网环境使用,但js/css资源文件都是自动使用cdn,
导致js-sequence无法展示。

我本地hack了一个,能用,想请教是否可以给个pull request.

hugo is good, I use it in intranet. Browser can't download some js/css files.
js-sequence / flowchart are not working...

I hacked on copy, should I send a PR?

语言设置无效

Language: 语言文件在 /themes/even/data/even/ 目录下。在你的 data 目录下创建一个 even 目录并复制 default.toml 文件到你的 /data/even/ 目录下,之后你可以按照自己需求更改它。
按照步骤设置后,无效。

拼写错误:lincese

data 目录的 default.toml 文件中,lincese 拼写错误,应为 license。
小问题,不影响网页的展示。

post drafts are not recognized

I followed the directions in the readme to setup the theme, then created a new draft with hugo new posts/foo.md. Now when I run hugo server -D the site starts and the theme is shown correctly, but the contents in foo.md are not shown on the page. How do I create posts for this theme?

畅言不起作用

  1. hugo部署在gitlab
  2. 自定义域名了. 但这个域名在畅言白名单中.
    3.本地server访问能出现畅言(虽然localhost提示不能用)
    4.Gitlab服务器上一片空白,没任何提示

更改添加 comment 评论的页面

希望阿婆主考虑将 comment.html 的插入位置由 baseof.html 改为 partial/post/single.html ,这样可以保证只在博文中添加评论功能,避免在 about 等不想加评论的地方出现评论框。

同步最新的提交后,生成页面出现错误

Error while rendering "taxonomy" in "": template: \layouts_default\taxonomy.html:4:17: executing "content" at <.Paginate>: error calling Paginate: 'pager size' must be a positive integer

不知道怎么处理???

Twitter link not working

I have in config.toml:

c-twitter = "https://twitter.com/valankar"

But I don't see any Twitter icon at the bottom.

如何使disqus评论插件只出现在post页面?

打开disqus功能以后,所有页面的底部都会出现评论框。Home,Archives 等页面下并无添加评论功能的必要。请问如何能关闭除post正文之外其他页面下的评论功能?

OSX Hugo Build Error

I'm sad because I get build errors when trying to use your theme. Here are the steps I'm using:

Install hugo

go get -u -v github.com/gohugoio/hugo
hugo env
> Hugo Static Site Generator v0.34-DEV darwin/amd64 BuildDate:
> GOOS="darwin"
> GOARCH="amd64"
> GOVERSION="go1.9.2"

Create site, install theme

cd ~/Desktop
hugo new site theme-test
cd ~/Desktop/theme-test
git clone https://github.com/olOwOlo/hugo-theme-even themes/even
echo 'theme = "even"' >> config.toml

Run build with 0 or more pages and BOOM:

hugo
> Building sites … ERROR 2018/01/22 10:38:32
>   Error while rendering "taxonomyTerm"
>   in "": template: /Users/mbgray/Desktop/theme-test/themes/even/layouts/_default/terms.html:11:5:
>   executing "/Users/mbgray/Desktop/theme-test/themes/even/layouts/_default/terms.html" at <partial "head.html" ...>:
>    error calling partial: template: theme/partials/head.html:13:116:
>    executing "theme/partials/head.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0

I believe this is some kind of issue with something in the partial.

使用多个section时,标签/分类里不是”post“下的帖子定义的标签/分类下无法显示帖子列表

标题写得有点绕,背景如下:

  • 我的博客使用了多个section,例如 postgame,把技术类文章和其他文章分开。
  • 每个section下的文章都定义了一些标签和分类
  • 但在右上菜单的 tags、categories 里,只有 post 下的标签/分类点进去能看到帖子列表,其他section的标签/分类点进去是空白页

我发现 layouts/_default/section.htmllayouts/_default/taxonomy.html 里写死了section:

{{- $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") .Site.Params.archivePaginate }}

把条件去掉后问题就解决了:

{{- $paginator := .Paginate .Data.Pages.ByDate.Reverse .Site.Params.archivePaginate }}

请问当初是出于什么考虑写死的?我有没有遗漏了什么?

我的博客已经按上面那样改了,现在来自任何section的分类/标签点进去都能看到列表:

http://keithmo.me/tags/

如何指定output文件?

如何指定output文件?
以及配置中的
`

将下面这段配置取消注释可以使 hugo 生成 .md 文件

Uncomment these options to make hugo output .md files.

[mediaTypes]
[mediaTypes."text/plain"]
suffix = "md"

[outputFormats.MarkDown]
mediaType = "text/plain"
isPlainText = true
isHTML = false

[outputs]
home = ["HTML", "RSS"]
page = ["HTML", "MarkDown"]
section = ["HTML", "RSS"]
taxonomy = ["HTML", "RSS"]
taxonomyTerm = ["HTML"]
`
是做什么用的?

请大家指导.

Leave tags/categories as is

Now in front matter,

---
tags: "Configure Even"
---

would become configure-even in tags tab.
It'd be great to leave tags/categories as is, i.e.
keep the white space and the upper/lowercase,
because otherwise it's impossible.

I tried to find the setting in _tags.css yet failed.
I did find difference between it and hexo-theme-even,
yet which doesn't seem to affect this.
An example of hexo-theme-even.

Thanks for your awesome work.

Embed Gist show in a wrong style

When I add embed gist in my MD file, the compiled page cannot show it correctly.
For Example:

Liz Rice 的代码如下:

<script src="https://gist.github.com/julz/c0017fa7a40de0543001.js"></script>

The compiled page shows that the gist style .gist .blob-num {width: 1%;} conflicted with the style .post .post-content .highlight td {width: 100%;} in _code.scss:72.

增加一个tab怎么生效?

[[menu.main]]
name = "Products"
weight = 50
identifier = "pro"
url = "/pro/"

然后我在content/pro/products.md里写入:

+++
author = "fanux"
date = "2014-07-11T10:54:24+02:00"
draft = false
title = "产品列表"
slug = "dotscale-2014-as-a-sketch"
tags = ["event","dotScale","sketchnote"]
image = "images/2014/Jul/titledotscale.png"
comments = true     # set false to hide Disqus comments
share = true        # set false to share buttons
menu = ""           # set "main" to add this content to the main menu
+++

然而发现并没有显示什么内容,怎么破?

添加跳转页

现在归档页只有上一页、下一页,想要跳转到某一页就会很麻烦。建议添加 1 2 3 4 5 ... 跳转页

添加统计代码的最好做法是什么

Hi, @olOwOlo ,

一般个人站点经常会加点统计代码,比如cnzz的,我每次是更新本主题后再手动加到footer中去,感觉不太好,不知道其他人是怎么做的,你建议的方式是什么啊?

Missing code lines

Hey there! Great theme, thanks so much. I just posted on Stackoverflow an issue I experienced with the theme in blogdown - link to the issue

Basically, after the site build and serve operations are run, the index.html file from the .Rmd post uses to close code chunks on the same line as the remainder of the code chunk. For some reason, this seems to cause the theme to drop a line of code.

frontmatter不支持summary?

如题,我在markdown里面增加了frontmatter:
summary = "xxxx"
但是没有解析出来,但是readmore之前的确实是能够解析出来

对于较长的数学公式

在手机端(4.7寸屏幕)上,较长的数学公式会直接向右超出边界,而不是和文字一起规约在一定的页宽内。是不是我哪里没有设置好?看到其他主题默认情况下也会出现这样的问题。先谢过up主了。

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.