Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

[BUG] Theme Version Settings #232

Closed
ktasper opened this issue Jul 3, 2021 · 1 comment
Closed

[BUG] Theme Version Settings #232

ktasper opened this issue Jul 3, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@ktasper
Copy link
Contributor

ktasper commented Jul 3, 2021

Describe the bug

When I try to set the theme using the latest release found here I see the latest is 0.1.2

So of course I try to set my theme using this in the config

[params]
  # CodeIT theme version
  version = "0.1.2"
  # site default theme ("light", "dark", "auto")
  defaultTheme = "auto"

Expected behavior

That it works and uses that version of the them.

What Actually Happens

Start building sites … 
hugo v0.84.4+extended darwin/amd64 BuildDate=unknown
INFO 2021/07/03 21:34:33 syncing static files to /
ERROR 2021/07/03 21:34:33 Compatibility Error 兼容性错误

0.1.2 -> 0.2.X:
You have an incompatible update. See https://github.com/suntprogramator/CodeIT/releases
你进行了一次不兼容的更新. 参考 https://github.com/suntprogramator/CodeIT/releases
WARN 2021/07/03 21:34:33 

Current environment is "development". The "comment system", "CDN" and "fingerprint" will be disabled.
当前运行环境是 "development". "评论系统", "CDN" 和 "fingerprint" 不会启用.
Built in 143 ms
Error: Error building site: logged 1 error(s)

But this does work:

[params]
  # CodeIT theme version
  version = "0.2.X"
  # site default theme ("light", "dark", "auto")
  defaultTheme = "auto"
  # public git repo url only then enableGitInfo is true

Build Environment

  • OS:macos BigSur
  • Theme version/commit: I am not sure due to this impacting this
  • Hugo version hugo v0.84.4+extended darwin/amd64 BuildDate=unknown
@ktasper ktasper added the bug Something isn't working label Jul 3, 2021
@victor-pogor
Copy link
Member

victor-pogor commented Jul 12, 2021

Hi @ktw717,

The problem is that the version does not correspond in the init.html file:

https://github.com/sunt-programator/CodeIT/blob/d1fa3573eb1aaacd9f448b2e5053fc058aa1d72c/layouts/partials/init.html#L3-L11

With the version provided in the config.toml file (v0.1.2 in our case).

https://github.com/sunt-programator/CodeIT/blob/d1fa3573eb1aaacd9f448b2e5053fc058aa1d72c/exampleSite/config.toml#L629-L631

The next version will be v0.2.0 and the problem should disappear.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants