check_site: Provide diagnostics for a website project

View source: R/check.R

check_siteR Documentation

Provide diagnostics for a website project

Description

The function check_site() runs all check_*() functions on this page against a website project. See ‘Details’ for what each check_*() function does.

Usage

check_site()

check_config()

check_gitignore()

check_hugo()

check_netlify()

check_vercel()

check_content()

Details

check_config() checks the configuration file (‘config.yaml’ or ‘config.toml’) for settings such as baseURL and ignoreFiles.

check_gitignore() checks if necessary files are incorrectly ignored in GIT.

check_hugo() checks possible problems with the Hugo installation and version.

check_netlify() checks the Hugo version specification and the publish directory in the Netlify config file ‘netlify.toml’. Specifically, it will check if the local Hugo version matches the version specified in ‘netlify.toml’ (in the environment variable HUGO_VERSION), and if the publish setting in ‘netlify.toml’ matches the publishDir setting in Hugo's config file (if it is set).

check_vercel() checks if the Hugo version specified in ‘vercel.json’ (if it exists) matches the Hugo version used in the current system.

check_content() checks for possible problems in the content files. First, it checks for the validity of YAML metadata of all posts. Then it searches for posts with future dates and draft posts, and lists them if found (such posts appear in the local preview by default, but will be ignored by default when building the site). Then it checks for R Markdown posts that have not been rendered, or have output files older than the source files, and plain Markdown posts that have ‘.html’ output files (which they should not have). At last, it detects ‘.html’ files that seem to be generated by clicking the Knit button in RStudio with blogdown < v0.21. Such ‘.html’ files should be deleted, since the Knit button only works with blogdown >= v0.21.


blogdown documentation built on May 29, 2024, 8:55 a.m.