Git Product home page Git Product logo

Comments (9)

simon-xia avatar simon-xia commented on August 17, 2024 1

it works, thank you very much!

from cocoa-hugo-theme.

nishanths avatar nishanths commented on August 17, 2024
$ hugo version
Hugo Static Site Generator v0.18.1 BuildDate: 2016-12-29T11:12:41-06:00

Running:

$ cd exampleSite
$ git clone https://github.com/nishanths/cocoa-hugo-theme.git themes/cocoa
$ hugo -t cocoa

produces no errors for me.

could you provide the commands you ran and any possible files you edited?

from cocoa-hugo-theme.

simon-xia avatar simon-xia commented on August 17, 2024

in my site dir, running

hugo server --theme=cocoa-hugo-theme

got that error

from cocoa-hugo-theme.

nishanths avatar nishanths commented on August 17, 2024

Assuming you've cloned into themes/cocoa-hugo-theme:

hugo server --theme=cocoa-hugo-theme

also does not return an error for the exampleSite.

Is your site's source somewhere online where I can look at?

from cocoa-hugo-theme.

simon-xia avatar simon-xia commented on August 17, 2024

I only have one post under in content/post/test.md:

+++
title = "test" 
date = "2014-12-02T14:30:26+08:00"
+++

test

from cocoa-hugo-theme.

nishanths avatar nishanths commented on August 17, 2024

Use content/blog, not content/post. See the README for details.

/var/tmp/cocoatest$ tree -d -L 2
.
├── content
│   └── blog
└── themes
    └── cocoa-hugo-theme

content/blog/test.md has the contents from #51 (comment).
The cocoa theme at the current master.
config.toml is copied from exampleSite.

Running

/var/tmp/cocoatest$ hugo server --theme=cocoa-hugo-theme 
Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
1 regular pages created
2 other pages created
0 non-page files copied
0 paginator pages created
0 tags created
0 categories created
total in 26 ms
Watching for changes in /var/tmp/cocoatest/{content,themes}
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

from cocoa-hugo-theme.

nishanths avatar nishanths commented on August 17, 2024
ERROR: 2017/01/15 21:18:40 general.go:236: Error while rendering "page blog/test.md": template: theme/blog/single.html:12:66: executing "theme/blog/single.html" at <.Site.Params.datefor...>: invalid value; expected string

You'll need the config.toml from exampleSite.

ERROR: 2017/01/15 21:18:40 general.go:236: theme/partials/li.html is an incomplete or empty template

Where is cocoa-hugo-theme stored? In themes/cocoa-hugo-theme relative to the root of your site?

from cocoa-hugo-theme.

simon-xia avatar simon-xia commented on August 17, 2024

now I got:

➜  simon-blog-hugo hugo server --theme=cocoa-hugo-theme
Started building sites ...
ERROR: 2017/01/15 21:21:02 general.go:236: Error while rendering "page blog/test.md": template: theme/blog/single.html:12:66: executing "theme/blog/single.html" at <.Site.Params.datefor...>: invalid value; expected string
ERROR: 2017/01/15 21:21:02 general.go:236: theme/partials/li.html is an incomplete or empty template
Built site for language en:
0 draft content
0 future content
0 expired content
1 regular pages created
2 other pages created
0 non-page files copied
0 paginator pages created
0 tags created
0 categories created
total in 12 ms
Watching for changes in /Users/simon/simon-blog-hugo/{data,content,layouts,static,themes}
Serving pages from memory
Web Server is available at //localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

and my config.toml is

baseurl = "localhost:1313"
languageCode = "en-us"
title = "simon xia"

[[menu.main]]
    name = "Blog"
    url = "/blog"
  weight =1
[[menu.main]]
    name = "About"
    url = "/about"
  weight = 2

from cocoa-hugo-theme.

nishanths avatar nishanths commented on August 17, 2024

See above comment regarding config.toml. In particular, you need the dateform fields

[params]
dateform     = "Jan 2, 2006"
dateformfull = "Mon Jan 2 2006 15:04:05 MST"

from cocoa-hugo-theme.

Related Issues (20)

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.