mtn / cocoa-eh-hugo-theme Goto Github PK
View Code? Open in Web Editor NEWA enhanced version of Cocoa. Clean, fast, and responsive theme with cool typography.
Home Page: https://themes.gohugo.io/theme/cocoa-eh-hugo-theme/
License: MIT License
A enhanced version of Cocoa. Clean, fast, and responsive theme with cool typography.
Home Page: https://themes.gohugo.io/theme/cocoa-eh-hugo-theme/
License: MIT License
just started from ground up - the following error occurs:
ERROR 2017/04/20 15:29:11 Error while rendering "home": template: theme/index.html:1:3: executing "theme/index.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:14:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2017/04/20 15:29:11 Error while rendering "page": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:14:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2017/04/20 15:29:11 Error while rendering "404": template: theme/404.html:1:3: executing "theme/404.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:14:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
no idea what that means ...
Hi!
I had an idea that I was thinking about implementing on my site that I thought would be worth suggesting for the theme in general. A number of authors I've read submit many of their posts to news aggregation sites like Hacker News and Lobste.rs for discussion. Some sites do this rather than supporting commenting, while others do and presumably submit posts mainly for increased visibility. I think it'd be cool to support this natively in the theme by allowing users to specify a hackernews
and lobsters
content parameter so that a "continue the discussion on Hacker News/Lobsters" link (or button) could be conditionally included at the bottom of the article. Thoughts?
If this was confusing, I can find some concrete examples.
Hello!
$subj, when trying to run this theme against my blog source I get following (and site won't render):
Building sites β¦ ERROR 2018/03/20 11:47:58 Error while rendering "page" in "post/": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:15:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 11:47:58 Error while rendering "page" in "": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:15:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 11:48:01 Error while rendering "taxonomy" in "": template: theme/_default/taxonomy.html:1:3: executing "theme/_default/taxonomy.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:15:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 11:48:01 Error while rendering "section" in "": template: theme/_default/section.html:1:3: executing "theme/_default/section.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:15:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 11:48:01 Error while rendering "home" in "": template: theme/index.html:1:3: executing "theme/index.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:15:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
Change detected, rebuilding site
2018-03-20 12:10:21.918 +0000
Source changed "/srv/hugo/content/post/2018-03-19-lust-for-text-life.markdown": WRITE
ERROR 2018/03/20 12:10:22 Error while rendering "home" in "": template: theme/index.html:1:3: executing "theme/index.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:15:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 12:10:22 Error while rendering "page" in "post/": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:15:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
Total in 1228 ms
The reason is likely some absent .Site.
parameters but you can't tell what's exactly wrong from error message, I guess input parameters handling could be improved.
With fancy fonts (default) enabled, there is a noticeable flicker. Currently, the only way to get rid of this is to not use the sourced fonts.
Things to look into:
If anyone knows anything about how to fix this, please let me know!
Hi (again)!
I added analytics support to my forked version of the theme which only involved the addition of a few (3) lines. Would you be open to adding this to the repository, along with a short explanation of setup for users? I'm happy to make the change. π
There is a known issue with hugo when using Mathjax. Official documents show a way to remedy this problem.
By the way, I try to fix this problem by myself, but I found <
in mathjax-markdown-solution.html which is showed in official documents has been escaped and mathjax doesn't work. Hope this helps.
At the moment archetypes/default.md
is this:
+++
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
draft: true
meta_img = "/images/image.jpg"
tags = ["tags"]
description = "Desc"
hacker_news_id = ""
lobsters_id = ""
title = "Title"
+++
The first 3 settings use YAML syntax and the rest use TOML syntax. This causes an ERROR when hugo server
is run.
Hi!
Pretty new to Hugo, so bear with me if this is a stupid question. When I create new content, I encounter the warning:
ERROR (date and time) Unable to find archetypes directory for theme "cocoa-eh"
I understand that archetypes are somewhat like templates for metadata, but I don't think I have any need to use them. Is there any way I can suppress this error? Sorry about this not necessarily being theme-specific. πΊ
Upon doing a upgrade to 1.1.0, I receive the following error:
Started building sites ...
ERROR 2017/04/24 13:22:01 Error while rendering "home": template: theme/index.html:1:3: executing "theme/index.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:4:3: executing "theme/partials/header.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:12:3: executing "theme/partials/head.html" at <partial "head_includ...>: error calling partial: template: theme/partials/head_includes.html:4:5: executing "theme/partials/head_includes.html" at <partial "css/main.cs...>: error calling partial: Partial "css/main.css" not found
This happens both in my current site config, as well as a newly created site.
I've noticed that footnotes written in markdown, e.g. [^1] neither display as superscripts in the body texts, nor do the companion notes display as numbers. Instead, they are all bullet points. Furthermore, clicking on a body footnote will not redirect to the note at the bottom of the page, but will return to the homescreen. Looking at the HTML and CSS files that Hugo generates, I can't seem to find any indication of why this happens, although I have compared it to another Hugo theme that doesn't have this issue.
Here's the HTML used in Cocoa Enhanced:
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">FOOTNOTE TEXT
<a class="footnote-return" href="#fnref:1"><sup>[return]</sup></a></li>
The HTML matches that generated by other themes that render the footnotes as numbers, and looks fine, but perhaps there is something wrong with the definitions in the CSS file, the js files, or something else? Screenshot attached.
Hi,
I was going through this theme's config.toml
and noticed you require setting an extra lang
parameter. Apparantly, this is used in partials/header.html:6. Isn't this redundant? On line 2 in the same file, the language is already set. If it is not redundant, then why don't you reuse .Site.LanguageCode
?
Thanks!
First of all, thank you so much for building this theme, really love how clean and simple it is.
I'm trying to show Rust source code, however I'm not quite sure how to get syntax highlighting. I guess this theme only includes highlightjs
for a small number of languages.
Would you want to have support for more languages or could you please explain what steps are needed to replace highlight.min.js
with a custom one?
I'm using latest hugo (as of today) and the latest of cocoa-eh-hugo-theme.
ERROR 2017/09/08 12:23:44 Error while rendering "page": template: theme/_default/single.html:1:3: executing "theme/_default/single.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:14:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2017/09/08 12:23:44 Error while rendering "page": template: theme/blog/single.html:1:3: executing "theme/blog/single.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:14:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2017/09/08 12:23:44 Error while rendering "section": template: theme/_default/section.html:1:3: executing "theme/_default/section.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:14:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2017/09/08 12:23:44 Error while rendering "home": template: theme/index.html:1:3: executing "theme/index.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:14:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2017/09/08 12:23:44 Error while rendering "section": template: theme/section/blog.html:1:3: executing "theme/section/blog.html" at <partial "header.html...>: error calling partial: template: theme/partials/header.html:14:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
Hi, and thanks for such a great theme. Thank you too for your willingness to support sometimes novice questions!
The picture is displayed normally in the editor(I write *.md file in Typora).
But after render by Hugo, these images are zoomed in.
If you don't mind page in Chinese, you can visit this page.
I found something like this after Google it.
Do I need to change the CSS file?
(Please forgive me if I do not understand English language in the expression of lack of courtesy)
Demo website is unavailable due to expired SSL cert
Ordered lists are currently using the list-style-type: disc
which prevents a numbered list from displaying.
When using markdown:
1. hi
2. hello
3. hola
It seems that if i change these in Configuration, an error of blog time occurred.
When I navigate from the home page of my site to another page (i.e., the About page), the size of the header section becomes smaller.
Here, for example, is my homepage: https://jrosen48.github.io/
Here is my About page: https://jrosen48.github.io/about
Is it possible to fix the header content to be sized identically in each?
Thanks again for a great theme
The default archetype should have comments describing what each option does like these. It might also be nice to add more archetypes to make it easier to create a new site.
Hi, thanks for a great theme. New to Hugo, so I apologize if this is a more general question. Could you suggest how I could align-left text for either a specific page or for all pages?
For example, the references to the tools on this page appear strange center-aligned.
./cocoa-eh/layouts/partials/header.html
{{ if .Site.Params.twitter }}
<a href="{{ .Site.Params.twitter }}" target="_blank">
<i class="icon ion-social-twitter"></i>
</a>
{{ end }}
./cocoa-eh/exampleSite/config.toml
twitter = "@example"
it should be modified toοΌ
{{ if .Site.Params.twitter }}
<a href="https://twitter.com/{{ .Site.Params.twitter }}" target="_blank">
<i class="icon ion-social-twitter"></i>
</a>
{{ end }}
or
twitter = "https://twitter.com/example"
Hi,
Thank you (once again) for a great theme. Can you recommend how I can add a link to an external site as a menu entry?
For example, let's say I have three pages on my site, "Blog," "About," and "Resources," and I want to add a link to an external site, "My Other Site". Is there a straightforward way to do this?
I tried the approach suggested in this question (adding the link through the config.toml
file), but that didn't seem to work.
ask me man, I live with you
I tried to run hugo -t cocoa-eh
in a vanilla hugo website, but keep getting the following error message:
ERROR 2017/03/12 23:15:42 theme/partials/header.html template: theme/partials/header.html:14:88: executing "theme/partials/header.html" at <absURL>: wrong number of args for absURL: want 1 got 0
Hugo v0.24 now needs the default archetype to supply title and date for new posts. Hugo doesn't do it automatically anymore. Something like this needs to be added:
+++
title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = {{ .Date }}
draft = true
+++
I do a lot of code samples in my blog. go, command shell, html, java, json, etc. I'm finding that the syntax highlighting isn't what I need. How can I change the highlighting? Is there a part of the theme I need to change or some css. Sorry for this nube-ish question
Hi, is there a way for me to disable shrinking the header on pages without lists? Examples of such pages would be blog posts or an About Me page in the content directory that is not in its own folder. I want my website's header to have a consistent size no matter what page of the website visitors are on. This seems to be in main.css somewhere, but I'm not sure what I should be editing in it.
If the fields are left set to ""
as they are in the default archetype, a blank link is generated. Links should only be generated when the parameter is set to a non-empty string.
Hi, and thanks (for the 10th time, I think!) for such a great theme. Thank you too for your willingness to support sometimes novice questions!
I am having trouble resizing images added with the html src tag. It seems like it may be due to a theme width which overrides the width attribute. For example, on this page, I have the following three lines:
<img src = "/_media/logos/pdf.png", width = "15", height = "200">
<img src = "/_media/logos/pdf.png", width = "200", height = "200">
<img src = "/_media/logos/pdf.png", height = "200">
All three render the same size (on this page here) (with a height of 200px
, but what appears to be the maximum width). Any ideas about why this width attribute does not seem to be working and ideas about how I can address it would be super helpful.
If I'm using progressive image loading, I link to img/picture.png in my content files. However, the image is actually stored in img/high/picture.png and img/low/picture.png. The problem is that Hugo's generated index.xml file for RSS sources the image to the link I put in my content file (img/picture.png) which never exists. And so images are broken in the RSS feed.
Is there a way for me to make the index.xml use img/high/picture.png whenever I put img/picture.png in my blog post files?
Perhaps another solution is making the progressive loader look in img/ instead of img/high/ for the high resolution images? That way I can put all the high resolution pictures in img/ and the RSS feed will find them. The low resolution files will still be in img/low/ and the progressive loader can still use those.
I don't fully understand how the progressive loader or Hugo's XML generator work so I'm sorry if my suggestions don't make sense.
Hi!
I find the 404 page a bit too "busy" compared to what I'd normally expect. I was thinking it'd be nice to allow for a more subtle option that could maybe be enabled in the config file. For example, I think an nice design is something like this:
And if the relevant parameter isn't specified, the same 404 will persist. This might marginally increase build time, but the resulting pages would be the same size. Even build times would be virtually unchanged, I think, since it's only a single new conditional in a single template.
Thoughts? As always, happy to put in a PR. πΊ
Please look at screenshots below.
Issue can be seen on demo page: http://themes.gohugo.io/theme/cocoa-eh-hugo-theme/
It seems like the changes to templates to make the generated HTML pass validation broke some CSS that I didn't catch. I'm not sure if this can be fixed purely through CSS, or if some of the changes need to be rolled back.
I'm also not sure what the best way to systematically find problems that may have been caused were, but a good start might be to find cases where HTML was modified but not corresponding CSS.
Tagging @curtisalexander; if you can let me know things that broke, that'd be much appreciated.
The links at the bottom (to github, gitlab, etc.) could include keybase, which would allow people to link to their profiles (and thus public keys).
When running Hugo, the articles aren't being rendered and throws this error in the console:
Posting the full error text:
ERROR: 2017/01/15 09:50:26 general.go:236: Error while rendering "page blog/passion.md": template: theme/blog/single.html:11:66: executing "theme/blog/single.html" at <.Site.Params.datefor...>: invalid value; expected string
ERROR: 2017/01/15 09:50:26 general.go:236: Error while rendering "page blog/developpingideas.md": template: theme/blog/single.html:11:66: executing "theme/blog/single.html" at <.Site.Params.datefor...>: invalid value; expected string
ERROR: 2017/01/15 09:50:26 general.go:236: theme/partials/li.html is an incomplete or empty template
Also, these errors show up on the original Cocoa theme as well, hence blog posts not showing in either version. Might be something with the Hugo version.
Came across a cool project today that is basically a lightweight, non-tracking, disqus called commento.
It'd be cool if this theme got commento support.
I'll see if I can get around to submitting a PR for this in the next couple of days.
Hi!
Currently the theme wraps long lines in code. I prefer that it doesn't so I tried to change it. I added the following to my css overrides but it doesn't work. Do you know what is going wrong?
section.main .content .markdown pre {
overflow: auto;
white-space: pre-wrap;
}
Hello,
I've been using this theme for a week or so and haven't had any trouble. However, I've started to notice inconsistencies on various websites and on different platforms using this theme. See some screenshots below for examples:
First, on my website: https://timmastny.rbind.io/blog/multilevel-mrp-tidybayes-brms-stan/
You can see the difference in font size and spacing in the introduction paragraph.
For comparison, I had a friend pull up the website on Linux. Here's what he saw:
He sees the expected font and better spacing, but still different than my Safari view.
I also see inconsistent font on my header, on chrome.
Look at the title of the website (Tim Mastny) on my homepage:
The font is different, with the blog post font being the correct one.
And here is why I don't think this is a problem with my website in particular. Julia Silge uses the same theme and I see inconsistencies on her's too: https://juliasilge.com/
The font is clearly wrong, and the back ticked text size is different.
My friend however see the correctly formatted text on Linux:
At least as of #90, though possibly earlier, output HTML/CSS probably no longer passes W3C validation.
Right now I have a very simple Hugo with two tabs, Blog and Music, but my pals quickly started clomplaining about not being able to comment on the music section. And it is a real shame, I think comments should be available along with navigation buttons, like two blogs.
I thought of just having a list of tab names on the config file pointing to the ones to be treated as blogs.
I think I can do it this weekend, but I wanted to discuss it first, since you might have another vision or another solution.
Cheers.
Hi there,
I'm testing out this theme and it looks great! after having everything setup, I found that I cannot build the site into a public
folder. I even tried from the start using the examplesite that came along with the project, it works great with the hugo server
. But when i try to with the hugo
to get it to build into a public
folder, the site compile without any theme.
Is anyone else having a problem with this?
Huy
When I write a post, it automatically appears in the /content/post
directory, however, I think for this theme, it has to be in the /content/blog
directory. Is there a way to change the default directory for blog posts so that they (automatically & without having to manually move) appear in the correct (/content/blog
) directory?
Is there support in the theme for category-specific RSS feeds, i.e. feeds only with posts that are in a specific category? Thanks once again for a great theme. In the case that this would make it easier for others to provide feedback, the source files for my blog with the enhanced Cocoa theme are here.
This picture shows how the text is smaller and has a different color.
I fixed this by adding the following to the css, but there might be a better way to fix this.
section.main .content .markdown ul,
section.main .content .markdown ol,
section.main .content .markdown dl {
margin-bottom: 1rem;
color: #313537;
font-size: 1.2em;
letter-spacing: 0.01rem;
font-family: 'Source Sans Pro', sans-serif;
font-weight: 100;
text-align: justify;
}
Hello, thank you for working on this theme.
Would it be possible to have option to use only fonts from user operating system or be able to change them to some other font (e.g. Nexa Bold don't have Polish character sets like ΕΕΔ
)?
I'm not a designer and I understand that system fonts are old and looks not so nice but I hate flashing on every website when they load web fonts in the background.
From cocoa-eh-hugo-theme/layouts/_default/section.html
:
{{ if ne (len (where .Data.Pages "Title" "!=" $globalTitle)) 0}}
<div class="page-heading">{{ .Title }}</div>
<ul>
{{ range .Data.Pages.ByPublishDate }}
{{ if ne .Title $globalTitle }}
{{ partial "li.html" . }}
{{ end }}
{{ end }}
</ul>
{{ end }}
This should be made consistent with the ordering fix implemented in #67, and maybe they should also be grouped in the same way.
Hey,
thanks for your theme. I am a very happy user :).
What about changing https://github.com/{{ .Site.Params.githubRepo }}/tree/master/content
to https://github.com/{{ .Site.Params.githubRepo }}/content
so that one can decide within the config.toml
on which branch the source files are located.
Best
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.