Git Product home page Git Product logo

Comments (6)

jjallaire avatar jjallaire commented on June 26, 2024

Each post needs to be in it's own folder (that is what is meant by "top-level", a top-level folder for each post)

from distill.

jemus42 avatar jemus42 commented on June 26, 2024

That'sā€¦ not how I interpret that statement, but okay, that's alright.
I moved each Rmd file in its own folder, but they still don't build.
Folder structure here: https://github.com/jemus42/qm.jemu.name/tree/master/_posts

I'm starting to suspect there's either a bug or "You can use whatever scheme you like to organize the _posts directory" is a slight overstatement :/

from distill.

jjallaire avatar jjallaire commented on June 26, 2024

I need more info than "they still don't build". When I try to render your site locally I get this error:

Error in contrib.url(repos, "source") : 
  trying to use CRAN without setting a mirror
Calls: <Anonymous> ... withVisible -> eval -> eval -> install.packages -> contrib.url
Execution halted

Exited with status 1.

Every other Radix blog uses exactly this structure (_posts directory as you have) so my suspicion is that errors you are seeing are not related to folder structure.

from distill.

jemus42 avatar jemus42 commented on June 26, 2024

Sorry. When I click the RStudio "build" button or manually enter rmarkdown::render_site() in the console, the site itself is generated correctly, i.e. the index.html and about.html are generated, but none of the posts under _posts is generated, i.e. no html files are created.

I have now worked around this by manually rendering each .Rmd file under _posts and built the site afterwards, now everything shows up properly.
Since this "concluded" my project and I don't have to touch it again soon, I'm fine with that, but I thought there was either a bug or an issue with the documentation, but if you can't reproduce the problem then I guess you might as well close this issue.

Regarding your problem building the site, the lack of a set CRAN mirror does not look like a problem with my site because I don't touch CRAN repos anywhere oO

from distill.

jjallaire avatar jjallaire commented on June 26, 2024

Okay, now I get what's going on. That's actually the design of Radix -- you render posts individually then they are compiled into a site. If we didn't do it this way then as you got into dozens or hundreds of posts it would take forever to render the site. You also might get into reproducibility issues attempting to render posts from e.g. a couple of years back. So the idea is that you render posts individually as you author them.

from distill.

jemus42 avatar jemus42 commented on June 26, 2024

Well now I feel silly. Thanks for clearing this up m)

For context: I use blogdown (and love it) and wanted to investigate whether radix could be better for a particular use case. In blogdown, I use blogdown::build_site() to rebuild the entire site including all blog posts specifically to catch reproducibility issue in older posts to update them so they are still "valid" today.

The radix approach, however makes a lot of sense, of course, I just wish there was an easy way to build all the posts. Let's say you're importing a bunch of Rmd files from a different project (as I did) and want to render all of them, then having to render them individually is kind of inconvenient. Maybe a simple helper function that looks for Rmd files under _posts and renders them would be neat.

Anyway, my original question in this issue has been cleared up, thanks!

from distill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.