Git Product home page Git Product logo

cocoa-eh-hugo-theme's People

Contributors

andy4thehuynh avatar arschles avatar bep avatar bobsaintcool avatar budui avatar duckpunch avatar evrardjp avatar fuegoio avatar gbl08ma avatar hjdskes avatar homebysix avatar jeffhenson avatar maiki avatar mrkmhny avatar mtn avatar mvrilo avatar nibalizer avatar nishanths avatar nizzlay avatar punchagan avatar remeh avatar robinst avatar rwenz3l avatar seemethere avatar shreyanshk avatar shuichiro-makigaki avatar tobiasraabe avatar v-shenoy avatar vsund avatar watschi 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

cocoa-eh-hugo-theme's Issues

theme doesn't work with hugo 0.20.2

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 ...

Social discussion links

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.

Errors on site without expected parameters set

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.

Analytics Support

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. πŸ˜„

A known issue with Mathjax may be need to remedy.

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.

archetypes/default.md contains YAML and TOML syntax

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.

Unable to find archetypes

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. 🐺

Error building with 1.1.0, unable to find partial "css/main.css"

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.

Footnotes do not render as numbers, but as bullet points

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.
screenshot 28

Redundant language specification?

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!

Syntax highlighting for more languages

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?

error: wrong number of args for absURL: want 1 got 0

https://github.com/fuegowolf/cocoa-eh-hugo-theme/blob/94e3cef795f2e47c2a868b2534a44cf06d2fd5b5/layouts/partials/header.html#L14

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

How customise image size?

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).
image
But after render by Hugo, these images are zoomed in.
image
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)

Set ordered list type to numbered

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
  • The above markdown shows as numbered list and not disc type

Archetype comments

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.

Left-align text for specific page or all pages

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.

I find the blog can't go to the twitter URL

./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"

Link to external site as a menu entry

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.

Error with <absURL>

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

Archetype needs to be updated

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
+++

syntax highlighting

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

Header is shrunken on pages without lists (e.g. post pages)

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.

resize images added with html src tag

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.

Using progressive image loading breaks images in RSS file

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.

Simpler 404 option

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:

screen shot 2017-07-25 at 8 26 13 pm

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. 🐺

HTML validation breaks some styling

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.

Add keybase link support

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).

Error ... general.go:236: theme/partials/li.html is an incomplete or empty template

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.

Add commento support?

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.

Don't make code wrap?

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;
}

Website appearance inconsistent across platforms

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:

My Website

First, on my website: https://timmastny.rbind.io/blog/multilevel-mrp-tidybayes-brms-stan/

Mac:
Chrome:
screen shot 2017-11-24 at 12 34 25 pm 2

Safari:
screen shot 2017-11-24 at 12 41 46 pm

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:
nathan

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:
screen shot 2017-11-24 at 12 51 51 pm

Versus on a blog post:
screen shot 2017-11-24 at 12 51 56 pm

The font is different, with the blog post font being the correct one.

Other Websites

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/

Mac:
Chrome:
screen shot 2017-11-24 at 12 52 17 pm

The font is clearly wrong, and the back ticked text size is different.

My friend however see the correctly formatted text on Linux:
nathan2

[feature] Everything is a blog

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.

theme + examplesite will not build

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

change default directory for blog posts?

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?

Create category-specific RSS feed?

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.

List text look different from the rest of the content

This picture shows how the text is smaller and has a different color.

screenshot from 2017-02-25 18-23-29

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;
}

Option to use only fonts from operating system or change to the one with more character sets

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.

Posts render in order of publish date on default section

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.

``githubRepo`` points to master branch

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.

<a href="https://github.com/{{ .Site.Params.githubRepo }}/tree/master/content/{{ .File.Path }}" target="_blank">View this post on GitHub</a>

Best

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.