Coder Social home page Coder Social logo

nishanths / cocoa-hugo-theme Goto Github PK

View Code? Open in Web Editor NEW
325.0 325.0 157.0 3.68 MB

Responsive Hugo blog theme (note: not actively worked on)

Home Page: https://cocoa-hugo-theme-demo.netlify.app/

License: MIT License

CSS 54.91% HTML 44.74% Makefile 0.35%
hugo hugo-blog-theme hugo-theme

cocoa-hugo-theme's People

Contributors

andy4thehuynh avatar bep avatar christarazi avatar crodjer avatar evrifaessa avatar haruair avatar hrafven avatar irus avatar li-kai avatar lpancescu avatar michaelmoussa avatar mikoim avatar mvrilo avatar nishanths avatar oboukli avatar pgrandinetti avatar phxql avatar pingrunhuang avatar rahiel avatar rahul147 avatar remeh avatar robinst avatar saifulbkhan avatar scriptnull avatar semanticdata avatar singhkays avatar stephenfin avatar tminecola avatar tribunex avatar vkobel 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-hugo-theme's Issues

Support more social icons

Currently, we only support social icons for twitter, github, linkedin, email, and RSS.

We could incrementally add support for:

  • telegram
  • pinterest
  • keybase
  • foursquare
  • are.na

and so on.

These can be enabled/disabled in config.toml as usual.

Markdown incomplete for fixed pages in content root

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.


Fixed pages in content root do not render all markdown

  1. Put the about.md page in content/fixed/.. Be sure to include subtitle with "### subtitle" or inline code with "`code here`"
  2. View the content in browser. Markdown should be formatted correctly.
  3. Move the file to content/about.md.
  4. [Issue] The markdown will not be fully rendered. No subtitle or inline code formatting. These will look like normal text

Screenshots

content/fixed/about.md

screen shot 2016-12-05 at 1 25 56 pm


content/about.md

screen shot 2016-12-05 at 1 27 35 pm

Support for Isso (a Disqus alternative)

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>

reconcile differences between dev/less and css 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.

  • Having normal CSS makes the development process easier (no preprocess step).
  • The CSS isn't too large that it requires less, and will likely not reach the point that the lack of a preprocessor becomes an issue

Add an instagram link

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

Ordered List not being rendered

When I write in Markdown:

1. One
2. Two 
3. Three

It gets rendered as:

  • One
  • Two
  • Three

I tried this theme on a newly created site and the behavior persists. Could you help me with this issue?

No image support?

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

Footnotes not showing properly

I use RMarkdown, and include footnotes like 1 and then at the end of the document

The footnote in the text does not get superscripted, and the footnote text at the end of the page is in an unordered list (meaning it has a disk symbol, and not a number).

Footnotes

  1. โ†ฉ

"back to posts" link does not redirect to blog posts

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?

changed sorting parameter in latest hugo release?

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.

Highlight.js background is not used in <code> blocks

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):
screen shot 2017-06-02 at 11 18 53 am

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):
screen shot 2017-06-02 at 11 16 34 am

Cocoa theme doesn't provide the standard header for .md files

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?`

The "base href" parameter is doing more harm than good

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

Does not create index.html

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

Support for markdown bulleted identation

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
- a
  - 1 
  - 2
  - 3
- b

cocoa is rendering it as a flat list for me.

Thanks!

can't evaluate field Param in type *hugolib.SiteInfo

$ 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

Custom content requires 'index' in its path

Desired effect

Achieve the following link http://localhost:1313/hi.

Issue

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

Current Workaround

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",
]
+++

Question

How can I achieve the desired effect that doesn't have index in the URL?

Replace icon font with SVG icons?

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

Per page, blog post meta description

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!

Theme builds with errors, looks incomplete

$ 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

Support for comment functionality

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.

Support rss.

It's really important for blog to have rss. This is common way to get updates.

The /about page in /exampleSite

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.

errors with latest hugo release

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

Use .BaseURL instead of .BaseUrl

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.

cachebuster the wrong way around?

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.

exampleSite contains redundant files

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.

error using cocoa theme

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.

Support multilingual sites

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.

Adding Content Troubles

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.

Add highlight js

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.

Support for separating blogs by month

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.

Cannot figure out exactly where to put the webfonts

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.

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.