Blockquotes
A blockquote element rendered using standard markdown blockquote syntax > and alternative shortcode {{< blockquote >}}.
Features#
- Supports standard Markdown blockquote syntax
>and alternative shortcode{{< blockquote >}}. - Supports GitHub Flavored Markdown (GFM) alert syntax
> [!TYPE]for styled alert boxes with an icon. - Supports author and source attribution via
authorandsourceattributes. - Supports a
citeURL used both as the<blockquote cite="...">attribute and as the href for the source link. - Supports preset style
variationfor contextual theming of regular blockquotes. - Allows adding custom CSS classes via the
classattribute.
Syntax#
Basic blockquote syntax:
> Blockquote text here.
{author="Author Name" cite="https://example.com" source="Source Title" variation="accent"}{{% blockquote
author="Author Name"
cite="https://example.com"
source="Source Title"
variation="accent"
%}}Alert blockquote syntax:
> [!NOTE]
> This is a note.{{% blockquote type="alert" variation="note" %}}
This is a note.
{{% /blockquote %}}Parameters#
type(shortcode only)- (optional) Set to
"alert"to render an alert box with a variation icon and an i18n title label. author(basic blockquote only)- (optional) The name of the person being quoted. Displayed in the
<figcaption>below the blockquote. source(basic blockquote only)- (optional) The title of the work being cited. Displayed as a linked
<cite>element ifciteis also set. cite(basic blockquote only)- (optional) A URL used as the
<blockquote cite="...">attribute and as thehreffor the source link whensourceis set. variation- (optional) Applies a preset color theme to the blockquote. Available values:
accent— styled with the site accent color (default themed)info— bluenote— yellowtip— cyanwarning— orangeimportant— purplecaution— red
class- (optional) One or more CSS classes to apply to the wrapping
<figure>element (default:fr-blockquote).
Theming#
Regular blockquotes use:
--color-accentfor the left border color--color-surfacefor the background fill
{
:root {
// ...
--color-accent: #01827c;
--color-surface: color-mix(in srgb, var(--color-accent) 20%, transparent);
// ...
}
@media (prefers-color-scheme: dark) {
:root {
// ...
--color-accent: #00fff2;
--color-surface: color-mix(in srgb, var(--color-accent) 20%, transparent);
// ...
}
}
}Variation-styled blockquotes (both regular and alert) use per-variation tokens:
--color-surface-{variation}for background--color-text-{variation}for text color--color-border-{variation}for border color
Refer to the Theme Customization guide for guidance on how to customize these properties for your site.
Examples#
Example 1: Basic Blockquote#
> The quick brown fox jumps over the lazy dog.{{% blockquote %}}
The quick brown fox jumps over the lazy dog.
{{% /blockquote %}}The quick brown fox jumps over the lazy dog.
Example 2: Blockquote with Author Attribution#
> Be yourself; everyone else is already taken.
{author="Oscar Wilde"}{{% blockquote author="Oscar Wilde" %}}
Be yourself; everyone else is already taken.
{{% /blockquote %}}Be yourself; everyone else is already taken.
Example 3: Blockquote with Author, Source and Cite URL#
> Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.
{author="Albert Einstein" source="Quote Investigator" cite="https://quoteinvestigator.com/2010/05/04/universe-einstein/"}{{% blockquote
author="Albert Einstein"
cite="https://quoteinvestigator.com/2010/05/04/universe-einstein/"
source="Quote Investigator"
%}}
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.
{{% /blockquote %}}Two things are infinite: the universe and human stupidity; and I’m not sure about the universe.
Example 4: Styled Blockquote with Variation#
> This blockquote uses the accent variation for contextual emphasis.
{variation="info"}{{% blockquote variation="info" %}}
This blockquote uses the accent variation for contextual emphasis.
{{% /blockquote %}}This blockquote uses the info variation.
This blockquote uses the note variation.
This blockquote uses the tip variation.
This blockquote uses the warning variation.
This blockquote uses the important variation.
This blockquote uses the caution variation.
This blockquote uses the accent variation. (default style)
This blockquote uses the inverted variation.
Example 5: Alert Blockquote with variation#
> [!NOTE]
> This is an Alert blockquote using the ++note++ variation.{{% blockquote type="alert" variation="note" %}}
This is an Alert blockquote using the ++note++ variation.
{{% /blockquote %}}This is an Alert blockquote using the note variation.
This is an Alert blockquote using the info variation.
This is an Alert blockquote using the tip variation.
This is an Alert blockquote using the warning variation.
This is an Alert blockquote using the important variation.
This is an Alert blockquote using the caution variation.
This is an Alert blockquote using the accent variation.
This is an Alert blockquote using the inverted variation.
Example 6: Alert Blockquote with Custom Title#
> [!NOTE] Custom Alert Title
> Highlights information that users should take into account, even when skimming.{{% blockquote type="alert" variation="note" title="Custom Alert Title" %}}
Highlights information that users should take into account, even when skimming.
{{% /blockquote %}}Highlights information that users should take into account, even when skimming.