nishanths / cocoa-hugo-theme Goto Github PK
View Code? Open in Web Editor NEWResponsive Hugo blog theme (note: not actively worked on)
Home Page: https://cocoa-hugo-theme-demo.netlify.app/
License: MIT License
Responsive Hugo blog theme (note: not actively worked on)
Home Page: https://cocoa-hugo-theme-demo.netlify.app/
License: MIT License
Dig the theme, would love syntax highlighting.
Highlight JS is lightweight and supports a slew of languages. I'll put a pull request to see if you're into it.
Hello @robinst,
the exampleSite folder doesn't have to mirror the root folder. Everything that the build script for the theme site requires is a config file and an static
folder. The rest is optional. If you want to add custom content then add create a content
folder. You can do it likewise for a other files.
The less files in dev/less
files were used to generate stylesheets. Over time, CSS has been directly introduced in the standard CSS files, without mirroring in the less files.
Remove the dev/less
directory, and use the standard CSS files as the single source of truth.
Hi, really fell in love with the theme!
When using any theme for Highlight.js, background color isn't applied to <pre>
box because of this rule in main.css
:
section.main .content .markdown pre {
font-family: 'Ubuntu Mono', 'Menlo', monospace;
font-size: 1rem;
background-color: #f7f7f7;
}
Gray background color overrides Highlight.js color in themed css, so with a dark theme you get illegible code. Here's some Clojure code in Monokai theme (you can see how it should appear here):
If I delete the conflicting background-color
rule, I get correct code colors but they only extend to <code>
block, instead of entire <pre>
block. This produces an ugly code box which tightly wraps the code (solarized-light theme):
I get the following when building using the default config.toml found in the exampleSite, on the latest version of Hugo
hugo -v
INFO 2017/05/09 20:00:53 Using config file:
INFO 2017/05/09 20:00:53 /home/aaron/sites/tokelove/static/ is the only static directory available to sync from
INFO 2017/05/09 20:00:53 syncing static files to /home/aaron/sites/tokelove/public/
WARN 2017/05/09 20:00:53 No translation bundle found for default language "en"
WARN 2017/05/09 20:00:53 Translation func for language en not found, use default.
WARN 2017/05/09 20:00:53 i18n not initialized, check that you have language file (in i18n) that matches the site language or the default language.
Started building sites ...
INFO 2017/05/09 20:00:53 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
WARN 2017/05/09 20:00:53 [en] Unable to locate layout for "home": [index.html.html index.html _default/list.html.html _default/list.html theme/index.html.html theme/index.html theme/_default/list.html.html theme/_default/list.html]
WARN 2017/05/09 20:00:53 [en] Unable to locate layout for "page": [page/page.html.html page/page.html _default/page.html.html _default/page.html theme/page/page.html.html theme/page/page.html theme/_default/page.html.html theme/_default/page.html]
WARN 2017/05/09 20:00:53 [en] Unable to locate layout for "taxonomyTerm": [taxonomy/tag.terms.html.html taxonomy/tag.terms.html _default/terms.html.html _default/terms.html indexes/indexes.html.html indexes/indexes.html theme/taxonomy/tag.terms.html.html theme/taxonomy/tag.terms.html theme/_default/terms.html.html theme/_default/terms.html theme/indexes/indexes.html.html theme/indexes/indexes.html]
WARN 2017/05/09 20:00:53 [en] Unable to locate layout for "taxonomyTerm": [taxonomy/category.terms.html.html taxonomy/category.terms.html _default/terms.html.html _default/terms.html indexes/indexes.html.html indexes/indexes.html theme/taxonomy/category.terms.html.html theme/taxonomy/category.terms.html theme/_default/terms.html.html theme/_default/terms.html theme/indexes/indexes.html.html theme/indexes/indexes.html]
WARN 2017/05/09 20:00:53 [en] Unable to locate layout for "404": [404.html]
Built site for language en:
0 draft content
0 future content
0 expired content
4 regular pages created
6 other pages created
0 non-page files copied
0 paginator pages created
0 tags created
0 categories created
total in 5 ms
As alternative for Google Analytics I would like to see support for Piwik, which can be selfhosted.
It's really important for blog to have rss. This is common way to get updates.
I've noticed that the paragraph width is capped at max of 750px however, I'd like my images to be wider than 750px and display in the center like with Medium (examples here). Is this possible?
cocoa-hugo-theme/static/css/main.css
Line 107 in ded90f8
$ hugo server --theme=cocoa --buildDrafts
ERROR: 2016/02/02 template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html
ERROR: 2016/02/02 template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html
2 of 2 drafts rendered
0
$ hugo version
Hugo Static Site Generator v0.15 BuildDate: 2015-11-26T07:29:00+01:00
When I write in Markdown:
1. One
2. Two
3. Three
It gets rendered as:
I tried this theme on a newly created site and the behavior persists. Could you help me with this issue?
I see the code at the link below controls which categories' posts show up on the main page. However, I have two more categories (monthly roundup of links) that needs to display posts on the front page. How can I add support for categories other than "blog"?
https://raw.githubusercontent.com/nishanths/cocoa-hugo-theme/master/layouts/index.html
Please add a option to add an avatar to the landingpage. For example like in http://themes.gohugo.io/theme/hugo-sustain/ or in http://themes.gohugo.io/theme/hugo-goa/
general.go:236: theme/partials/li.html is an incomplete or empty template
Hi when I run:
hugo -t cocoa
I get:
Started building site ERROR: 2016/09/30 17:42:25 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html ERROR: 2016/09/30 17:42:25 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html ERROR: 2016/09/30 17:42:25 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html ERROR: 2016/09/30 17:42:25 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html ERROR: 2016/09/30 17:42:25 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html ERROR: 2016/09/30 17:42:25 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html ERROR: 2016/09/30 17:42:25 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html
Other themes are working.
If you create posts that have a # somewhere in their title, clicking on the link to the post will result in a 404.
I have purchased the ProximaNova
fonts, and copied them into static\webfonts
inside the theme directory. They build properly into the public\static\webfonts
directory on my site, however, they 404 when I try to hit them on a URL. I'm not quite able to see if the proper font is being used. The site in question is http://mattstratton.io.
Would it be possible to add multilingual support to Cocoa? I already have a functional implementation in the i18n
branch of lpancescu/cocoa-hugo-theme
, but I'm not sure how you would like to switch between the languages. Perhaps country flags as SVGs, near the other icons?
I can also send it as a PR, if you prefer that for easier discussion.
$ hugo version
Hugo Static Site Generator v0.17 BuildDate: 2016-10-07T16:45:27+02:00
$ hugo new site blog
Congratulations! Your new Hugo site is created in "hugo/blog".
Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/, or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
$ cd blog
$ git clone https://github.com/nishanths/cocoa-hugo-theme.git themes/cocoa
Cloning into 'themes/cocoa'...
remote: Counting objects: 728, done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 728 (delta 18), reused 0 (delta 0), pack-reused 684
Receiving objects: 100% (728/728), 2.92 MiB | 2.06 MiB/s, done.
Resolving deltas: 100% (369/369), done.
Checking connectivity... done.
$ exec hugo server -t cocoa -p12345 --baseUrl=https://url.tdl --appendPort=false
Started building sites ...
ERROR: 2016/11/09 14:12:30 template.go:132: template: theme/partials/meta.html:6:11: executing "theme/partials/meta.html" at <.Site.Param>: can't evaluate field Param in type *hugolib.SiteInfo in theme/partials/meta.html
ERROR: 2016/11/09 14:12:30 template.go:132: template: theme/partials/head_includes.html:13:12: executing "theme/partials/head_includes.html" at <.Site.Param>: can't evaluate field Param in type *hugolib.SiteInfo in theme/partials/head_includes.html
ERROR: 2016/11/09 14:12:30 template.go:132: template: theme/partials/header.html:6:20: executing "theme/partials/header.html" at <.Site.Param>: can't evaluate field Param in type *hugolib.SiteInfo in theme/partials/header.html
ERROR: 2016/11/09 14:12:30 template.go:132: template: theme/partials/footer_scripts.html:2:11: executing "theme/partials/footer_scripts.html" at <.Site.Param>: can't evaluate field Param in type *hugolib.SiteInfo in theme/partials/footer_scripts.html
ERROR: 2016/11/09 14:12:30 template.go:132: template: theme/partials/meta.html:6:11: executing "theme/partials/meta.html" at <.Site.Param>: can't evaluate field Param in type *hugolib.SiteInfo in theme/partials/meta.html
ERROR: 2016/11/09 14:12:30 template.go:132: template: theme/partials/head_includes.html:13:12: executing "theme/partials/head_includes.html" at <.Site.Param>: can't evaluate field Param in type *hugolib.SiteInfo in theme/partials/head_includes.html
ERROR: 2016/11/09 14:12:30 template.go:132: template: theme/partials/header.html:6:20: executing "theme/partials/header.html" at <.Site.Param>: can't evaluate field Param in type *hugolib.SiteInfo in theme/partials/header.html
ERROR: 2016/11/09 14:12:30 template.go:132: template: theme/partials/footer_scripts.html:2:11: executing "theme/partials/footer_scripts.html" at <.Site.Param>: can't evaluate field Param in type *hugolib.SiteInfo in theme/partials/footer_scripts.html
Built site for language en:
0 draft content
0 future content
0 expired content
0 pages created
0 non-page files copied
0 paginator pages created
0 tags created
0 categories created
total in 29 ms
Watching for changes in hugo/blog/{data,content,layouts,static,themes}
Serving pages from memory
Web Server is available at https://url.tld/ (bind address 127.0.0.1)
Press Ctrl+C to stop
Hi,
I stumbled upon this great theme I use for my personal blog, thanks to @nishanths for that!
However one tiny little detail bothered me: the use of <base href="{{ .Site.BaseURL }}">
tag in the partial head.html.
Is it really necessary in this case? I understand how this could be useful, but here it's doing more harm than good IMHO.
My (very specific) issue was when I tried to put my public/ blog on IPFS. Over there all the URLs are prefixed by /ipfs/[content hash]/
like this: https://ipfs.io/ipns/Qmdr8MhNeWE1sxABevBvxWNWC25iXEicfJRvYNpuCpca8E/ and the base tag is making it not working because the blog isn't at the root of the URL.
I didn't bother to make a pull request as the fix would simply be to remote the <base>
tag. What do you think?
Have a good one!
Vincent
Hi,
While reading the source, I noticed that the font-size
for h3
is the only one set in em
, while all the other heading styles are specified in rem
. Is this perhaps a typo?
https://github.com/nishanths/cocoa-hugo-theme/blob/master/dev/less/markdown.less#L27
Hello guys,
It seems there is something wrong with highlightjs.
For example in the demo: http://themes.gohugo.io/theme/cocoa/blog/use-at-instead-of-head/
When putting firefox in debugging mode I cannot see why its not working. Any ideas?
Is the min hugo version in theme.toml accurate? Particularly after the changes to how the built-in now
function works.
I just dl'd and installed Hugo 0.30.2, and when I generate the site using
hugo --theme=cocoa
all the posts are sorted in ascending order. Before it was descending. I can't find anything in config.toml to influence this.
For us to be able to use the exampleSite on themes.gohugo.io, the about page cannot be about you. If you want the demo site to show, please make it neutral.
I tried to create a new blog page, an it works, but there is noch header information, like date, draft and title.
Hugo spits put a warning too:
From Hugo 0.24 this must be provided in the archetype file itself, if needed. Example:
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
draft: true
---
Is this wanted behaviour?`
Hey, I am currently using cocoa hugo theme for my blog. And I always wanted to have a comment section to communicate with my readers. Since I am in China, the disqus is blocked by the GFW. I have searched for several alternative and others might require building you own database which is not suitable for a static page hosted on github. So I add a gitalk functionality to the theme wondering if you want me to add that functionality to the theme.
So I've created new site with Cocoa, and added image, but it won't scale down. Simple fix with max width probably would do the trick :)
Hi @nishanths! Still a great fan of your theme and the one I continue to use for my website.
One quick question, why the lack of support for indentation on markdown bullets, such as:
- a
- 1
- 2
- 3
- b
cocoa is rendering it as a flat list for me.
Thanks!
I'm being unable to get relativeurls to work with this theme, is it supposed to work?
My blog posts will add up quickly on one page. It will look daunting to see a small list like that without organization.
Would organizing the blogposts by month be in your future plans for this project? I can get started on it if you feel this is the direction you want.
In Hugo 0.14, BaseUrl
was renamed to .BaseURL
. The old name is still available as an alias that triggers a warning. But with the upcoming version 0.15 will remove the aliases.
Check out your head.html partial to update it. Otherwise is it not possible to generate your theme with future releases.
As alternative for Disqus I would like to see support for Isso, which can be selfhosted. For further reading see the quickstart documentation.
Now, you embed Isso to your website:
<script data-isso="//comments.example.tld/" src="//comments.example.tld/js/embed.min.js"></script> <section id="isso-thread"></section>
Hey, thanks for this amazing theme!
When I press the "back to posts" Link in a blog post (e.g. /blog/my-post/
) I am redirected to
/blog
which renders a blank page. In layouts/blog/single.html
maybe the following should be changed:
<p><a href="/blog/">{{ i18n "backToPosts" }}</a></p>
to
<p><a href="/">{{ i18n "backToPosts" }}</a></p>
so that I am back to my start page after clicking the link. Or do I configured something wrong?
Setting params.cachebuster
to true
results in links like this:
<link rel="stylesheet" href="/css/reset.css">
Setting it to false
uses the unix timestamp as a query param, see here. This means clients will have to load the files again when the site is rebuilt. Isn't that supposed to be "cache busting"? Seems the wrong way around.
Is it possible for the theme to add a category tab so that the blogs can be archived better?
Hi, it would be great to add instagram to the list of available links (next to facebook, email, github, linked, etc). I'd be happy to submit a PR for this
Hey!
I'd like to ask please to make it possible for an individual blog posts and pages to have their own meta description.
Currently only the site-wide description is processed:
{{ if .Site.Params.description }}<meta name="description" content="{{ .Site.Params.description }}">{{ end }}
Thanks!
I haven't had a chance to isolate how or why this issue is happening but here are the steps to reproduce ...
Based on the README
, I was under the impression both locations for the fixed pages should produce the same results:
Fixed pages such as an About page should preferably go under a content/fixed or be present at the root of the contents directory.
about.md
page in content/fixed/.
. Be sure to include subtitle with "### subtitle" or inline code with "`code here`"content/about.md
.content/fixed/about.md
content/about.md
Currently, we only support social icons for twitter, github, linkedin, email, and RSS.
We could incrementally add support for:
and so on.
These can be enabled/disabled in config.toml
as usual.
Consider adding support for the built-in syntax highlighter. See the release notes at https://github.com/gohugoio/hugo/releases/tag/v0.28 for details.
just found hugo and your theme, might be a problem on my end. anyway, I get
ERROR: 2016/08/03 13:36:30 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html
ERROR: 2016/08/03 13:36:30 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html
ERROR: 2016/08/03 13:36:30 general.go:222: Error while rendering page blog/test-to-great.md: template: theme/blog/single.html:12:66: executing "theme/blog/single.html" at <.Site.Params.DateFor...>: invalid value; expected string
ERROR: 2016/08/03 13:36:30 template.go:131: template: theme/partials/li.html:2:43: executing "theme/partials/li.html" at <.Site.Params.DateFor...>: invalid value; expected string in theme/partials/li.html
when I start the server with
hugo server --theme=cocoa --buildDrafts
The theme currently uses the ionicon icon font, which results in 230 KB of .css
and .ttf
. For the few icons that are actually used from it, this seems like a significant addition to the page weight.
Have you considered replacing them with SVG icons instead? Simple icons look promising, I found all icons that are referenced in header.html
, and they're typically between 500 bytes and 1 KB.
I can prepare a PR for this if you like the idea (or even if you're unsure about it).
I've installed hugo, created new site, grabbed down cocoa and followed the instructions in it's readme. Adding new content as instructed doesn't produce wroking site at the end. Is there a bug or some sort of mistake made druing transition from old verision? If I move content folder from example site and it's config to mine, it works but as soon as I add new content (for ex.: new blog entry) it messes up displaying part of the front page, where blog titles should be displayed and link doesn't appear at all.
Introduced in df002a3
Achieve the following link http://localhost:1313/hi
.
The following directories:
/content/hi.md
/content/fixed/hi.md
Don't map to any of the layouts:
/layouts/hi.html
/layouts/hi/single.html
Use the link http://localhost:1313/hi9000/index
with the following:
/content/hi9000/index.md
/layouts/hi9000/single.html
In order to achieve the desired effect, I am currently using this alias in hi9000.md
:
+++
title = "hello world"
aliases = [
"/hi",
]
+++
How can I achieve the desired effect that doesn't have index
in the URL?
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.