Original File grouped-archive.cshtml

ArchiveSources: posts/*
ArchiveKey: Colors
---
<p>
    This groups the archive using the "Colors" metadata property. Note how if <code>GroupKey</code> is defined for the document
    we can assume it's the index for a given color, but if it's not then it's the index for all colors.
</p>

@if (Model.ContainsKey(Keys.GroupKey))
{
    // An individual color
    <h3>@Model.GetString(Keys.GroupKey)</h3>
    @foreach (IDocument document in Model.GetChildren())
    {
        <h5>@Html.DocumentLink(document)</h5>
        <p><b>Colors:</b> @string.Join(", ", document.GetList<string>("Colors"))</p>
        @Html.Raw(document.GetString(Keys.Excerpt))
    }
}
else
{
    // The main color index
    <h3>All Colors</h3>
    @foreach (IDocument document in Model.GetChildren())
    {
        <h5>@Html.DocumentLink(document)</h5>
    }
}

This groups the archive using the "Colors" metadata property. Note how if GroupKey is defined for the document we can assume it's the index for a given color, but if it's not then it's the index for all colors.

Green

Pepper

Colors: Red, Green

The bell pepper (also known as sweet pepper, pepper or capsicum /ˈkæpsɪkəm/)[1] is the fruit of plants in the Grossum cultivar group of the species Capsicum annuum.[2][3] Cultivars of the plant produce fruits in different colours, including red, yellow, orange, green, white, and purple. Bell peppers are sometimes grouped with less pungent pepper varieties as "sweet peppers". While they are fruits—botanically classified as berries—they are commonly used as a vegetable ingredient or side dish.

Pear

Colors: Green, Yellow

Pears are fruits produced and consumed around the world, growing on a tree and harvested in late Summer into October. The pear tree and shrub are a species of genus Pyrus /ˈpaɪrəs/, in the family Rosaceae, bearing the pomaceous fruit of the same name. Several species of pears are valued for their edible fruit and juices, while others are cultivated as trees.

Avocado

Colors: Green

The avocado (Persea americana), a tree likely originating from south central Mexico,[2][3][4] is classified as a member of the flowering plant family Lauraceae.[2] The fruit of the plant, also called an avocado (or avocado pear or alligator pear), is botanically a large berry containing a single large seed.[5]

Apple

Colors: Red, Green

An apple is an edible fruit produced by an apple tree (Malus domestica). Apple trees are cultivated worldwide and are the most widely grown species in the genus Malus. The tree originated in Central Asia, where its wild ancestor, Malus sieversii, is still found today. Apples have been grown for thousands of years in Asia and Europe and were brought to North America by European colonists. Apples have religious and mythological significance in many cultures, including Norse, Greek, and European Christian tradition.