Windows is the best Linux for desktops. —— I said
Loves music, theoretical physics and computer science.
Loves coding in C89.
A clean and minimal Hugo theme.
Home Page: https://mivinci.github.io/hugo-theme-minima
License: MIT License
是否考虑给主题添加photoswipe。
这对于多张图片的展示很有帮助,并且photoswipe带有灯箱功能。
这是项目地址:photoswipe
failed to unmarshal YAML: yaml: unmarshal errors:
line 1: cannot unmarshal !!str baseURL...
into map[string]interface {}
In markdown, it's called [TOC]. I tried {{TOC}} and [TOC], they both didn't work.
Hi, I'm trying to load your theme in my blog but the following error appears:
Error: add site dependencies: load resources: loading templates: "/home/user/programming/blog/bluretreceblog/themes/hugo-theme-minima/layouts/partials/head.html:28:1": parse failed: template: partials/head.html:28: unclosed action
My Hugo version is v0.68.3/extended linux/amd64 BuildDate: 2020-03-25T06:15:45Z
. It is unclear for me what's the problem when looking at the line pointed by Hugo:
{{ $js := resources.Get "js/main.js" | js.Build $options | resources.ExecuteAsTemplate (printf
minima.%d.js $hash) . }}
Any suggestion would be deeply appreciated. Thanks!
这样太麻烦了。
17:59:13.430 Initializing build environment. This may take up to a few minutes to complete
17:59:15.627 Success: Finished initializing build environment
17:59:15.627 Cloning repository...
17:59:18.067 Success: Finished cloning repository files
17:59:18.362 Installing dependencies
17:59:18.375 Python version set to 2.7
17:59:22.378 v12.18.0 is already installed.
17:59:23.811 Now using node v12.18.0 (npm v6.14.4)
17:59:24.165 Started restoring cached build plugins
17:59:24.182 Finished restoring cached build plugins
17:59:24.920 Attempting ruby version 2.7.1, read from environment
17:59:30.989 Using ruby version 2.7.1
17:59:31.367 Using PHP version 5.6
17:59:31.542 5.2 is already installed.
17:59:31.573 Using Swift version 5.2
17:59:31.573 Installing Hugo 0.54.0
17:59:32.624 Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
17:59:32.629 Started restoring cached go cache
17:59:32.652 Finished restoring cached go cache
17:59:32.819 go version go1.14.4 linux/amd64
17:59:32.841 go version go1.14.4 linux/amd64
17:59:32.845 Installing missing commands
17:59:32.845 Verify run directory
17:59:32.846 Executing user command: hugo
17:59:32.937 Building sites … ERROR 2022/04/10 09:59:32 render of "page" failed: execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/minima/layouts/partials/head.html:28:41": execute of template failed: template: partials/head.html:28:41: executing "partials/head.html" at <js>: can't evaluate field Build in type string
17:59:32.937 ERROR 2022/04/10 09:59:32 render of "page" failed: execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/minima/layouts/partials/head.html:28:41": execute of template failed: template: partials/head.html:28:41: executing "partials/head.html" at <js>: can't evaluate field Build in type string
17:59:32.937 ERROR 2022/04/10 09:59:32 render of "page" failed: execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/minima/layouts/partials/head.html:28:41": execute of template failed: template: partials/head.html:28:41: executing "partials/head.html" at <js>: can't evaluate field Build in type string
17:59:32.937 ERROR 2022/04/10 09:59:32 render of "page" failed: execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/minima/layouts/partials/head.html:28:41": execute of template failed: template: partials/head.html:28:41: executing "partials/head.html" at <js>: can't evaluate field Build in type string
17:59:32.937 Total in 28 ms
17:59:32.937 Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/minima/layouts/partials/head.html:28:41": execute of template failed: template: partials/head.html:28:41: executing "partials/head.html" at <js>: can't evaluate field Build in type string
17:59:32.949 Failed: build command exited with code: 255
maybe there is something wrong :(
❯ hugo server -D
Building sites … ERROR 2021/11/28 15:00:22 render of "page" failed: execute of template failed: template: _default/single.html:5:5: executing "_default/single.html" at <partial "header.html" .>: error calling partial: "/Users/donie/Projects/blog/themes/minima/layouts/partials/header.html:6:64": execute of template failed: template: partials/header.html:6:64: executing "partials/header.html" at <index .Site.Params.switch 1>: error calling index: index of untyped nil
ERROR 2021/11/28 15:00:22 render of "page" failed: execute of template failed: template: _default/single.html:5:5: executing "_default/single.html" at <partial "header.html" .>: error calling partial: "/Users/donie/Projects/blog/themes/minima/layouts/partials/header.html:6:64": execute of template failed: template: partials/header.html:6:64: executing "partials/header.html" at <index .Site.Params.switch 1>: error calling index: index of untyped nil
ERROR 2021/11/28 15:00:22 render of "page" failed: execute of template failed: template: _default/single.html:5:5: executing "_default/single.html" at <partial "header.html" .>: error calling partial: "/Users/donie/Projects/blog/themes/minima/layouts/partials/header.html:6:64": execute of template failed: template: partials/header.html:6:64: executing "partials/header.html" at <index .Site.Params.switch 1>: error calling index: index of untyped nil
ERROR 2021/11/28 15:00:22 render of "page" failed: execute of template failed: template: _default/single.html:5:5: executing "_default/single.html" at <partial "header.html" .>: error calling partial: "/Users/donie/Projects/blog/themes/minima/layouts/partials/header.html:6:64": execute of template failed: template: partials/header.html:6:64: executing "partials/header.html" at <index .Site.Params.switch 1>: error calling index: index of untyped nil
ERROR 2021/11/28 15:00:22 EXECUTE-AS-TEMPLATE: failed to transform "minima.1638082822.js" (application/javascript): template: minima.1638082822.js:1:18: executing "minima.1638082822.js" at <index .Site.Params.switch 1>: error calling index: index of untyped nil
ERROR 2021/11/28 15:00:22 failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:5:5: executing "_default/single.html" at <partial "header.html" .>: error calling partial: "/Users/donie/Projects/blog/themes/minima/layouts/partials/header.html:6:64": execute of template failed: template: partials/header.html:6:64: executing "partials/header.html" at <index .Site.Params.switch 1>: error calling index: index of untyped nil
Built in 618 ms
Error: Error building site: EXECUTE-AS-TEMPLATE: failed to transform "minima.1638082821.js" (application/javascript): template: minima.1638082821.js:1:18: executing "minima.1638082821.js" at <index .Site.Params.switch 1>: error calling index: index of untyped nil
Hi, @mivinci
Does this theme style support Markdown TOC ? Just like Yuque.
I do not see a post with TOC support in example site.
I would like to put "Explore" dropdown menu item with:
so instead 3 items in top menu I could have 1, with expandable list.
Right now it's not possible out-of-the-box. Is it something that you consider to add to this theme?
Would it be possible to integrate support for plantuml? Mermaid has some limits in describing package
(or namespace
). Adding plantuml would be a great alternate.
Hi, how can we break lines in markdown table cells. I would expect something like below, but it seems not working in minima. Thanks for the help.
column |
---|
Hello, world! |
Hello, world! |
|column|
|---|
|Hello,<br>world!|
|Hello, world!|
hi, I want to migrate my blog to minima but I found something unexpected.
$$
\begin{aligned}
T(n) & = c_1 n + c_2 (n - 1) + c_3 (n - 1) + c_4 \sum_{j = 2}^n t_j \\
& + c_5 \sum_{j = 2}^n (t_j - 1) + c_6 \sum_{j = 2}^n (t_j - 1) + c_7 (n - 1)
\end{aligned}
$$
Above math equations were displayed in a single line, and \\
was ignored.
So would you fix this, or there is another way to type a newline?
请问怎么做才能替换站点图标?我将head.html中的改为 {{ $favicon := "favicon.png" }},下面那行“”没有看懂注释掉了。同时themes\hugo-theme-minima\static下的文件也做了替换。但站点图标无变化。
希望没有打扰到您!非常感谢!
https://huanggze.top/posts/istio-multicluster-deployment-part4/
I fond that words in the cannot be display correctly, the words in the
, for instance,THERE ARE SOMETHING
will be display as plain text
Great job on the work, I've integrated minima into my github page: https://zonggen.github.io/
Though I've noticed that you were missing one condition in the paginator: https://github.com/Mivinci/hugo-theme-minima/blob/e6aa0cd091dcef658092bcacaa61f8ab8505ad54/layouts/partials/paginator.html#L4, here there should be a case when both prev and next page is present (e.g. page 2/4).
Steps to reproduce:
Install and init site
hugo new site blog
cd blog
git submodule add --depth 1 https://github.com/mivinci/hugo-theme-minima.git themes/minima
Copy & paste example config
Fixed theme name hugo-theme-minima
to minima
Run site and check it working
hugo server -D
Add new param.social item
[[params.social]]
name = "facebook"
url = "https://facebook.com/"
svg = ""
Excepted: facebook icon must be visible
Actual: no facebook icon
Screenshot
config.toml
baseURL = "http://h.xjj.pub"
languageCode = "en-us"
title = "Hi Folks"
copyright = "© XJJ 2022"
googleAnalytics = ""
# paginate decides the number of the newest posts
# that'll be shown on the home page.
paginate = 6
# theme is the name of the hugo theme you're gonna use,
# `hugo-theme-minima` is put here only for debuging,
# just name it what's under your theme directory.
theme = "minima"
# Author has some of your information to be shown on the home page.
[author]
name = "XJJ"
slogon = "A tech lover from Earth 🌍"
description = "This is Minima, a clean and minimal Hugo theme porting from the [Hexo Minima](https://github.com/adisaktijrs/hexo-theme-minima). Except for everything from Hexo Minima like dark/light mode, Hugo Minima supports KaTeX, Mermaid, comments and some taxonomies like categories, series and tags. I created this using SASS, VanillaJS and the most importantly, Hugo. 😁"
[params]
# iam is the beginning words of your self-introduction.
iam = "I am"
# The subtitle will be shown after the title of your blog site.
# e.g. "title - subtitle".
subtitle = ""
# Comment decides the comment plugin to be used on your blog site,
# e.g. disqus, utterances, ovo.
comment = "utterances"
# Timeformat, no matter what format to use, make it the second day of Jan. 2006
timeformat = "Jan 02, 2006"
# switch for turning on/off lights.
switch = ["🌚", "🌝"]
# default theme. e.g. light, dark, system
defaultTheme = "system"
# If set true, date of posts will be shown in the homepage.
displayDate = true
# If set true, users can select text from your post.
selectable = true
# Custom global font. notice: `globalFontFamily` won't be working
# on texts in some special positions like on titles
globalFontFamily = ""
# If set true, all your posts will use the chosen comment plugin
# except those with a `comment: false` in their front-matter
commentOnAllPosts = true
# toc decides the shape of the toc button. e.g. default, lines, bar
toc = "lines"
recent = "Recent Posts"
older = "Older Posts"
# Disqus configuration
[params.disqus]
shortname = "hugo-minima"
# Utterances configuration
# Full doc's at https://utteranc.es
# **notice**: if you're going to use utterances, you must change the
# `repo` to your own repo address that stores comments on your site
[params.utterances]
repo = "mivinci/hugo-theme-minima"
issueTerm = "pathname"
# **deprecated**
# OvO is a comment plugin written by the author of Minima.
# It is enabled when params.comment is set "ovo". You can
# have a live view on https://ovo.js.org. If you are using
# disqus or utterance, just ignore this.
[params.ovo]
server = ""
placeholder = ""
# Params.social is an array containing your social network accounts,
# Each has a lowercase name, a svg formatted icon and a url to the
# webpage of your account. They will be shown at the bottom of every
# page of your blog.
# Be sure the svgs you use must have both its width and its height
# set 18. If you don't wanna put the svg code in this config file,
# since they are too long, you can instead save them to the
# `data/svg.toml` file under the root directory of your blog.
# in that file, each line must be formatted as `name = '<svg>'`
# where `<svg>` is the svg code.
[[params.social]]
name = "github"
url = "https://github.com/mivinci/hugo-theme-minima"
svg = ""
[[params.social]]
name = "linkedin"
url = "https://linkedin/in/leonard-mivinci-63895317a"
svg = ""
[[params.social]]
name = "twitter"
url = "https://twitter.com/Leonard14733745"
svg = ""
[[params.social]]
name = "facebook"
url = "https://facebook.com/"
svg = ""
[[params.social]]
name = "rss"
url = "/index.xml"
svg = ""
# If set, titles and links of the topk newest posts extracted from
# the feeds will be displayed in the home page. Note that the feeds
# providers have to make their 'Access-Control-Allow-Origin' contain
# your domain, otherwise the feeds cannot be fetched.
[params.friends]
feeds = ["https://h.xjj.pub/index.xml"]
topk = 3
title = "Friends' Posts"
proxy = "" # reserved
# Menu.main is an array that's used to decide what entries can be shown
# on the navigator of yur blog. You can use a weight to make them ordered.
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "Categories"
url = "/categories"
weight = 2
[[menu.main]]
name = "Series"
url = "/series"
weight = 3
[[menu.main]]
name = "About"
url = "/about"
weight = 4
# You can classify your posts by setting taxanomies in the front matter
# e.g.
# categories = ["dev"]
# series = ["Building an RPC server"]
# tags = ["hugo", "golang"]
# A little suggestion: one post belongs to one series or one category or multiple tags.
[taxonomies]
category = "categories"
tag = "tags"
series = "series"
# Fields below make sure all the codes in a post are
# highlighted correctly, so better not edit them.
[markup.highlight]
lineNos = true
noClasses = false
臭弟弟好强呀
Hey there, Thanks for the nice theme.
It will be nice to seperate content year wise on the page list.
list.html
{{ define "main" }}
<main class="container mx-auto">
{{ if isset .Data "Term" }}
<h2 class="text-4xl mt-8 mb-8">{{ .Data.Singular | title }} - "{{ .Data.Term }}"</h2>
{{ else }}
<h2 class="text-4xl mt-8 mb-8">{{ .Title }}</h2>
{{ end }}
<div class="mt-8">
{{ range .Data.Pages.GroupByDate "2006" }}
<h3 class="text-4xl"><a href="#{{ .Key }}">{{ .Key }}</a></h3>
{{ range .Pages }}
{{ partial "item.html" . }}
{{ end }}
{{ end }}
</div>
</main>
{{ end }}
Let me know if there's feedback w.r.t the changes. I can send a PR if you approve.
Happy Vacation 🌴
Check out discussion #51
Hey there!
Thank you so much for the theme. I've been spending some time customizing it to my liking, but I don't code too much and need some help.
I got stuck trying to figure out how to change the favicon– how might I do that?
Also, it is possible to add a preview of the blog post underneath the title on the home page? I'd like to show a few lines of a post and add a read more link. Or even a way to show the categories/tags under the title on the home page would be great too.
Thanks!
I will have two languages, let's say Chinese and English. I added languages and translations to the configuration. Added two articles for an example with a different language.
And how can I display the language change in the template now?
Hi, first of all thank you for the theme 🙂 I've started using it, but there is one feature that I miss: line highlighting.
Consider this:
```php {hl_lines=[5]}
<?php
class Foo {
public function shout(): string {
die('BAR!');
}
}
die('BAR!');
should be highlighted, but it's not because support for .chroma .hl
is missing. I was able to override syntax.scss
and add it but it's not that easy since code's content is not full-width and it looks weird:
Probably I need to override whole SASS config and use hugo gen chromastyles
for syntax highlighting. Thanks in advance for fixing it.
★ (❁´◡`❁)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.