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

Listing posts on other pages (not index.Rmd) #22

Closed
annafergusson opened this issue Sep 23, 2018 · 5 comments
Closed

Listing posts on other pages (not index.Rmd) #22

annafergusson opened this issue Sep 23, 2018 · 5 comments

Comments

@annafergusson
Copy link

I get the following error message when I use the metadata entry (see https://rstudio.github.io/radix/blog.html#listing-pages) to list blog posts on pages that are not index.Rmd.

Error: The collection 'posts' does not have an article listing. (try running render_site() to generate the listing)

Weirdly, as long as I use index.Rmd as a listing page, I can use other pages to list posts, but not another page by itself.

@jjallaire
Copy link
Member

I'm not seeing that error in a simple site that I have locally. Could you provide the full source code of a site which exhibits this error? (or a link to a git repo that does)

@annafergusson
Copy link
Author

annafergusson commented Sep 23, 2018

Here's a link to a repo I just created using the default settings for a radix blog: https://github.com/annafergusson/radix-check/. I can't knit about.Rmd to make it the listings page without getting the error above.

Edit: If I copy the posts.json file from the _site/posts folder into the _posts folder, then I can knit the about.Rmd page to make it the listing page.

@jjallaire
Copy link
Member

The issue is that you are missing this line in the YAML for index.Rmd:

site: radix::radix_website

If you used the RStudio template or radix::create_blog() function to create the site then this should have been added automatically, not sure why it's absent.

@annafergusson
Copy link
Author

Why is it absent? :-) Because this human didn't read https://rstudio.github.io/radix/blog.html#listing-pages properly! Thanks @jjallaire

@jjallaire
Copy link
Member

You bet, glad it's all working now :-)

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