import_post: Import a post into a blog

View source: R/import.R

import_postR Documentation

Import a post into a blog

Description

Import a distill post from an external source (e.g. GitHub repo, RPubs article, etc.). Importable posts must have distill::distill_article as the output format in the YAML.

Usage

import_post(
  url,
  slug = "auto",
  date = Sys.Date(),
  date_prefix = date,
  check_license = TRUE,
  overwrite = FALSE,
  view = interactive()
)

update_post(slug, view = interactive())

Arguments

url

URL for distill post to import

slug

Post slug (directory name). Automatically computed from title if not provided.

date

Post date (defaults to current date)

date_prefix

Date prefix for post slug (preserves chronological order for posts within the filesystem). Pass NULL for no date prefix.

check_license

Verify that the imported posted has a creative commons license

overwrite

Overwrite existing post? (defaults to FALSE, use update_post() to update an existing post in-place).

view

View the post after importing it.

Value

Returns (invisibly) a logical indicating whether the operation completed (it may not complete if, for example, the user chose not to import an article that lacked a creative commons license).


distill documentation built on Oct. 6, 2023, 5:06 p.m.