Skip to main content

Funding YAML Example

Using FUNDING.yml

This document demonstrates how to use a FUNDING.yml file to configure the support-this extension in Quarto. The extension will read the funding information from the FUNDING.yml file located in the same directory as this document. We have specified the use_funding_yml: true option in the extension configuration to enable this feature.

title: "Funding YAML Example"
format: html
extensions:
    support-this:
        heading: "Support My Work (Based on FUNDING.yml)"
        use_funding_yml: true

FUNDING.yml Structure

The FUNDING.yml file can include multiple platforms and custom links, allowing you to easily manage your funding options in one place. For more details on the format of the FUNDING.yml file, refer to the GitHub documentation on funding files.

Here is the content of the FUNDING.yml file used in this example:

github: [coatless, octocat]
patreon: username
custom: ["https://paypal.me/username", thecoatlessprofessor.com]

Where the file is found

support-this uses the first of these it finds:

  1. FUNDING.yml or .github/FUNDING.yml next to the document, as on this page.
  2. The same at the root of the Quarto project.
  3. The same at the root of the git repository. This is where GitHub keeps the file, so a project in a docs/ folder can reuse the repository’s .github/FUNDING.yml.

Keys without a value, as in GitHub’s default template, are skipped, and keys for platforms support-this doesn’t know are ignored.

Combining with platforms

FUNDING.yml is the base. Platforms listed under platforms are added to it, and a platform set in both places uses the document’s accounts. For example, with the FUNDING.yml above, this configuration keeps the GitHub and Patreon links but replaces the two custom links with one:

extensions:
  support-this:
    use_funding_yml: true
    platforms:
      custom: "https://thecoatlessprofessor.com"