kandi X-RAY | wowchemy-hugo-modules Summary
kandi X-RAY | wowchemy-hugo-modules Summary
🔥 The website builder for Hugo. No code, build with widgets! 创建在线课程，学术简历或初创网站。
Top functions reviewed by kandi - BETA
wowchemy-hugo-modules Key Features
wowchemy-hugo-modules Examples and Code Snippets
Trending Discussions on wowchemy-hugo-modules
I've been following the instructions here to install the R blogdown package and get my new site running. When I get to the step where I run serve_site(), I get the following error message:...
ANSWERAnswered 2021-Dec-21 at 04:29
The config file is
config/_default/config.yaml in your website project. Add
After installed (see previous post) and configured my personal Hugo website for a multilingual setup (by directories), I wanted to start creating content. Ideally, I wanted to use
blogdown in RStudio, via the addins. The website uses the Academic theme, rebranded now as Wowchemy.
The content directory tree is as follows:...
ANSWERAnswered 2020-Nov-05 at 09:17
I am not good at using the debug tools, so just stepped through the code. (Appreciate the suggestion of good tutorials!)
First things first: When in Doubt, Try to Upgrade Your Software Packages This is the
blogdown package creator's advice. Checked.
- Launching the addin,
- This calls
new_post.R. The source code can be find at: https://github.com/rstudio/blogdown/blob/master/inst/scripts/new_post.R
blogdown::new_post()is called at the end, with
fileparameter from the updated input text field, which is in the case of the question: "post\2020-11-04-how-this-site-was-created\index.en.md"
new_post()function (in hugo.R) calls
new_content()with the third argument,
open = FALSE, which means it will not open the file, just overwrite the value of the
filevariable (the path hereafter). At the end of
new_post()the file should be opened: this is where the error occurs (by trying to open the file at the wrong place, a wrong path). This means that something bad has to happen in
new_content()modify the path with
content_file(). Also this is the step, where the file is actually created.
content_file()modify the path by adding a prefix to it generated by
get_config()tries to extract the value of a field in the configuration, in the case of Hugo: try to find
contentDir. If this results in NULL (there's no such list item), then see the other possibility and lastly return the default value (which is in the case of Hugo:
content). And that's it! RStudio tries to open a file in the content directory, not in a language subdirectory!
- That means that the last option is returned in the row of
%n%(which is imported from knitr and stands for:
if (is.null(x)) y else x). That means that the previous arguments returned NULL, which means contentDir cannot be found in
configvariable. The default value of
configis set by
config = load_config(). This uses
find_config()to find the config file to parse.
config_files()to set the value in case of Hugo:
c('config.toml', 'config.yaml'). But my setting is in a subdirectory: in the
/config/default_/languages.tomlfile! Oh, another Academic theme woe...
To conclude this:
blogdown is currently loads only the
config.toml in the root directory to check the
contentDir value. The Academic, now Wowchemy Hugo theme however keep config files in the
/config/default_/ directory also, where the
languages.toml contains the needed value.
To keep or not to keep Academic theme? Stick with
blogdown or not? Maybe the config files should be merged into one config.toml, but couldn't find hint or examples for Academic on the web.
Edit: OK, the root of the problem has been found, but the actual error which raised the error message is in connection with
hugo_convert_one(), as the traceback suggests in the question. This was the first (and last) try to open the file of the wrong path.
I wanted to set up a personal website with
blogdown, using the Academic Hugo theme. I almost read the entire book of blogdown: Creating Websites with R Markdown and several tutorials, like Allison Hill's or Annie Lyu's.
I have chosen blogdown because I am familiar with RStudio and R and Academic because there are suggestions in the references to pick a maintained theme, like Academic. I installed
blogdown and Hugo as the book suggests and tried to install the theme by the RStudio way: click File -> New project -> New Directory -> Website using blogdown. If I tried the hugo-lithium theme, everything flows great. If I tried Academic, then the following message and error appeared (with some already installed files in the specified directory):
ANSWERAnswered 2020-Sep-15 at 12:21
Following the Edit your site on your PC docs on the Academic theme's webpage:
Before downloading your site, lets first install Hugo Extended and its prerequisites.
On Windows: Git, OpenSSH and Go have to be installed beside Hugo Extended. Because I already have Git, I did not install it, only OpenSSH and Hugo Extended via Scope (and beforehand Powershell 5 to install Scope). Go was installed via the executable from the Go documentaion site.
After this, Academic theme can be deployed with the RStudio method specified in the question. Maybe the blogdown book need to be updated.
Note: also, in the referenced document:
Convert an old Academic Kickstarter site If you have an existing site based on the Academic Kickstarter Template that was created before 3rd September 2020, it may need converting to use Hugo’s new modular system.
I am trying to create a website using R Blogdown Hugo-Academic theme. Typically, I would create a website by running the following commands:...
ANSWERAnswered 2020-Sep-03 at 19:56
I had the same problem, and resolved it by editing my config.toml file:
Check that your theme is set correctly (mine was):
No vulnerabilities reported
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page