I have some problems creating my website using the theme hugo-apero. When I change something in config.toml the page could not load, with error:
Failed to reload config: "D:\ComputationalTool\RStudy\congwang\hugo_apero\config.toml:10:42": unmarshal failed: toml: invalid character in comment .
Even if I undo the changes and return to the original, there will be the same error. I could not reload the page anyhow.
Here is the screenshot:
Here are some supplements for the problem, when I call the package "blogdown", here is the warning message:
Warning message:
In read_utf8(file) :
The file config.toml is not encoded in UTF-8. These lines contain invalid UTF-8 characters: 10
So I think maybe that is the problem, but I still don't know how to solve it.
cderv
August 21, 2022, 2:19pm
2
congwang:
The file config.toml is not encoded in UTF-8. These lines contain invalid UTF-8 characters: 10
So I think maybe that is the problem, but I still don't know how to solve it.
It seems the special character you have on line 10 at the end in the comment is causing the issue.
Can you try remove the comment at the end of line 10 and see if that helps ?
Thanks cderv, it is very silly, the problem is solved by removing the strange comment in line 10, it seems like R put it there automatically.
cderv
August 21, 2022, 3:56pm
4
The line comes from
baseURL = "/"
theme = "hugo-apero"
languageCode = "en"
title = "Hugo Apéro"
author = "Alison Hill"
copyright = "" # set to override the auto generated copyright using org info and now year
googleAnalytics = ""
disqusShortname = "" # see params.utterances to use utterances instead of Disqus
metaDataFormat = "yaml"
footnoteReturnLinkContents = "↩" # ↩
# set deliberately low for testing choose your preffered number based on the blog layout you've chosen
paginate = 5
preserveTaxonomyNames = true
ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_cache$", "\\.knit\\.md$", "\\.utf8\\.md$"]
enableEmoji = true
[markup]
defaultMarkdownHandler = "goldmark"
[markup.goldmark.renderer]
unsafe = true # Enable user to embed HTML snippets in Markdown content.
and it seems the character got change somehow on your system to another one.
What happens is that during the installation by blogdown the file got downloaded / copied to your installation path, and somehow transformed. (maybe your are not using UTF-8... )
Maybe it is an issue with blogdown too...
So maybe you won't be the only one with the same issue.
Would you like to report it on the repo Issues · hugo-apero/hugo-apero · GitHub ?
You can tag me @cderv
and copy some of the above.
Thanks
cderv
August 21, 2022, 4:23pm
5
In fact I see you already have:
opened 10:18AM - 21 Aug 22 UTC
closed 07:38AM - 23 Aug 22 UTC
I have some problems creating my website using the theme hugo-apero. When I chan… ge something in config.toml the page could not load, with error:
Failed to reload config: "D:\ComputationalTool\RStudy\congwang\hugo_apero\config.toml:10:42": unmarshal failed: toml: invalid character in comment .
Even if I undo the changes and return to the original, there will be the same error. I could not reload the page anyhow.
Here is the screenshot:
![image](https://user-images.githubusercontent.com/110236467/185786371-912edbde-8b97-45c7-ab19-e767285c4107.png)
In addition: Warning message:
In read_utf8(file) :
The file config.toml is not encoded in UTF-8. These lines contain invalid UTF-8 characters: 10
So I think maybe that is the problem, but I still don't know how to solve it.
Please next time, share links when you cross post
Posting the same question both here and on other sites
Posting the same question to multiple forums at the same time is often considered impolite. We don't completely ban such cross-posting, but we ask you to think hard before you do it and to follow some rules.
Cross-post sparingly
Rather than post the same thing here and elsewhere from the get-go, post in one place at a time. Let enough time go by (think days, not hours) before you take your question somewhere else. Sometimes people at another site may suggest you post here if your question doesn't fit within the scope of the other site.
Always link to your other posts, and update everywhere with any solution…
system
Closed
September 11, 2022, 4:23pm
6
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.