New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

min_version is treated as a float, thus can't have two dots like 0.18.1 #3025

Closed
anthonyfok opened this Issue Feb 10, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@anthonyfok
Contributor

anthonyfok commented Feb 10, 2017

Perhaps a bug, and perhaps not a bug:

After building a local copy of themes.gohugo.io using spf13/hugoThemeSiteScript,
running hugo server -s hugoThemeSite/themeSite fails to start the server due to the
following fatal error:

ERROR: page.go:1309: Error parsing page meta data for startbootstrap-clean-blog.md
ERROR: page.go:1310: (15, 15): cannot have two dots in one float
ERROR: page.go:683: (15, 15): cannot have two dots in one float

It turns out that the author of the said theme has set the min_version in his theme.toml to 0.18.1, but min_version is currently treated as a float number in hugo, and thus can't have two or more "decimal points".

I have sent a pull request to change 0.18.1 to 0.18 at humboldtux/startbootstrap-clean-blog#26

Though I wonder if we should change min_version to read a string (so 0.18.1 would work) in some future version, or if we should just document the current behaviour?

@moorereason

This comment has been minimized.

Show comment
Hide comment
@moorereason
Contributor

moorereason commented Feb 11, 2017

We should start using https://github.com/Masterminds/semver.

@moorereason moorereason added the Bug label Feb 28, 2017

@bep bep added this to the v0.20 milestone Feb 28, 2017

@bep bep self-assigned this Mar 1, 2017

@bep bep closed this in 3669015 Mar 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment