Is this possible in R Markdown?
May 2, 2020 8:38 AM   Subscribe

Can I get R Markdown to automatically create a link to all the other documents in a folder.

I've put together a simple web page for my wife to publish some daily writing projects. I've done this using R Markdown, pushed to github and then auto built and deployed using netlify.

At the moment I need to add a link to the front page that lists the new piece.
Is it possible to automatically create that link?

It sort of feels like it should be?
But I don't know R Markdown all that well. (or even really at all).

Updating is no problem, because Netlify will automatically build the site whenever a new thing is posted to GitHub. So we just need a way for index.html to list everything else in the site when it's turning the RMDs into html.
posted by Just this guy, y'know to Computers & Internet (3 answers total) 2 users marked this as a favorite
 
Best answer: You should be able to. Have index.rmd list the directory and write the result in a list.

That said, if your wife isn't using the fact that it's R markdown and is just writing plain markdown, you may find moving to more general static site generator like Hugo or Jekyll (which is what GithubPages uses, coincidentally) easier overal.
posted by hoyland at 8:48 AM on May 2, 2020 [2 favorites]


Response by poster: Ah, terminology problem.
I am actually using the R blogdown package which is hugo based.

How would this work in pure Hugo?
posted by Just this guy, y'know at 1:01 PM on May 2, 2020


Response by poster: Actually figuring out that it was Hugo behind the scenes gave me the clues I needed on what to google to figure it out.
So, thanks!
posted by Just this guy, y'know at 12:29 PM on May 3, 2020


« Older Scheduling time slots for visitors to cultural...   |   Quarantine birthday Newer »
This thread is closed to new comments.