gethugothemes / bigspring-light-hugo

Bigspring is a Hugo startup theme. It has a clean, minimal, fresh UI.
https://gethugothemes.com/products/bigspring/?utm_source=bigspring_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
198 stars 299 forks source link

How do I add a new post in knitted in R blogdown? #55

Closed eteitelbaum closed 2 years ago

eteitelbaum commented 2 years ago

I am able to see a folder called post in the content folder and I can knit the example .Rmd file there and display it in a browser. However, I am unable to link to the post in the menu. When I add:

[[main]] name = "Posts" url = "post" weight = 6

to menus.en.toml I see a link called "Posts" in the menu bar but when I click on it I get a 404 page not found error. How can I incorporate .html files knitted in blogdown into the site?

tfsomrat commented 2 years ago

Hello @eteitelbaum

Are you sure that you are using the Bigspring Light theme? Because we don't have any post folder in this theme, we have a blog folder, and the page is also linked in the main menu.

eteitelbaum commented 2 years ago

Hi! Yes, I am sure that is theme I am using. I realize now that the post folder is put there by the blogdown package in R.

With blogdown you knit your RMarkdown file and then it creates a folder for each post. Not sure it that workflow is going to be compatible with your theme or not.

tfsomrat commented 2 years ago

Of course, it will support RMarkdown, But you need to know how to use it. Can you tell me how you are using this? via any tool? or something else?

eteitelbaum commented 2 years ago

Thanks for your quick response!

I am trying to generate new posts using the new post add in tool in R Studio.

Now I can see that if I move the folder with post that blogdown generates from the post folder that I was talking about to the blog folder, the new post shows up on the site. However, if I use the new post add in tool and select english\blog as the directory it creates a new sub-directory english\blog within the original english folder.

This is no big deal. I can take the posts and move them, but I thought I would let you know about the issue.

tfsomrat commented 2 years ago

Well, thanks for letting me know about this, just don't create any subdirectory into the blog folder, create a new folder in the content folder, so it looks like content/posts. it will do the job for you