Skip to content
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

Setting author's name and picture leads to failed to load config #77

Open
abelsiqueira opened this issue Sep 10, 2024 · 3 comments
Open

Comments

@abelsiqueira
Copy link

Here is how I reproduced minimally:

  • cd abelsiqueira.github.io # freshly cloned
  • npx blowfish-tools
  • select "Install Blowfish on an existing website"
  • select "Configure overall site"
  • select "Author's name"
  • input value "Abel"
  • select "Author's picture"
  • input value "static/images/me.jpg"
  • go to localhost:1313

You should have the following error:

Failed to reload config: failed to load config: failed to unmarshal config for path "/home/abel/projects/priv/abelsiqueira.github.io/config/_default/languages.en.toml": "_stream.toml:1:1": unmarshal failed: toml: key author should be a table, not a value 
/home/abel/projects/priv/abelsiqueira.github.io/config/_default/languages.en.toml:1:1:
disabled = false
languageCode = "en"
languageName = "English"
hugo v0.134.1+extended linux/amd64 BuildDate=unknown

Contents of config/_default/languages.en.toml show that params.author is being defined twice.

───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: config/_default/languages.en.toml
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ disabled = false
   2   │ languageCode = "en"
   3   │ languageName = "English"
   4   │ weight = 1
   5   │ title = "Blowfish"
   6   │
   7   │ [params]
   8   │ displayName = "EN"
   9   │ isoCode = "en"
  10   │ rtl = false
  11   │ dateFormat = "2 January 2006"
  12   │ author = { name = "Abel" }
  13   │
  14   │ [params.author]
  15   │ image = "me.jpg"
@pranavnasrani
Copy link

Did you get any solution for this? Facing the same issue

@pranavnasrani
Copy link

i think i figured a temporary solution.

in languages.en.toml:

define the image (for the author) in the [params] section, not [params.author] this will prevent the conflict and works better for me:

should look something like this:

   7   │ [params]
   8   │ displayName = "EN"
   9   │ isoCode = "en"
  10   │ rtl = false
  11   │ dateFormat = "2 January 2006"
  12   │ author = { name = "Abel", image="me.jpg"}

@abelsiqueira try this and let me know if it works. you should delete 14 │ [params.author]

the tools should be updated; although useful, it creates more problems than i can comprehend! 😂

@abelsiqueira
Copy link
Author

Thanks, but I'm not using the tool anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants