Skip to contents

Given a blog post location and which post to fetch (either latest or a post title), fetches it and starts setting up the email.

Usage

b2n_post_to_email(blog_dir, post = "latest")

Arguments

blog_dir

where the blog is (see details)

post

whether to fetch the latest post or matching a title

Value

list

Details

While it is expected that most of the time that blog_dir will point to a local copy of a blog, and that the RSS file is at _site/index.xml, it doesn't have to. blog_dir can also be a fully qualified path the RSS file itself, or even the URL of an RSS file on the web, if you are using some other blogging platform and dont want to copy the RSS file to your local filesystem.

Examples

if (FALSE) {
## Using a local quarto blog,
## where index.xml is under _site/index.xml
b2n_post_to_email("path/to/local/blog")

## using a local index.xml that is not in a quarto blog, or a non-standard location
b2n_post_to_email("path/to/local/blog/_out/index.xml")

## using a url
b2n_post_to_email("https://myblog.com/index.xml")
}