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.

Red

Tomato

Colors: Red

The tomato is the edible berry of the plant Solanum lycopersicum,[1][2] commonly known as a tomato plant. The species originated in western South America and Central America.[2][3] The Nahuatl (the language used by the Aztecs) word tomatl gave rise to the Spanish word tomate, from which the English word tomato derived.[3][4] Its domestication and use as a cultivated food may have originated with the indigenous peoples of Mexico.[2][5] The Aztecs used tomatoes in their cooking at the time of the Spanish conquest of the Aztec Empire, and after the Spanish encountered the tomato for the first time after their contact with the Aztecs, they brought the plant to Europe. From there, the tomato was introduced to other parts of the European-colonized world during the 16th century.[2]

Strawberry

Colors: Red

The garden strawberry (or simply strawberry; Fragaria × ananassa)[1] is a widely grown hybrid species of the genus Fragaria, collectively known as the strawberries, which are cultivated worldwide for their fruit. The fruit is widely appreciated for its characteristic aroma, bright red color, juicy texture, and sweetness. It is consumed in large quantities, either fresh or in such prepared foods as jam, juice, pies, ice cream, milkshakes, and chocolates. Artificial strawberry flavorings and aromas are also widely used in products such as candy, soap, lip gloss, perfume, and many others.

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.

Cherry

Colors: Red

A cherry is the fruit of many plants of the genus Prunus, and is a fleshy drupe (stone fruit).

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.