Original File computed-grouped-archive.cshtml

ArchiveSources: posts/*
ArchiveKey: => GetDateTime("PostDate").ToString("MMMM")
---
<p>
    This groups the archive using a computed value to get the "PostDate" month. 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 month
    <h3>@Model.GetString(Keys.GroupKey)</h3>
    @foreach (IDocument document in Model.GetChildren())
    {
        <h5>@Html.DocumentLink(document)</h5>
        <p><b>Post Date:</b> @document.GetString("PostDate")</p>
        @Html.Raw(document.GetString(Keys.Excerpt))
    }
}
else
{
    // The main month index
    <h3>All Months</h3>
    @foreach (IDocument document in Model.GetChildren())
    {
        <h5>@Html.DocumentLink(document)</h5>
    }
}

This groups the archive using a computed value to get the "PostDate" month. 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.

January

Tomato

Post Date: 1/5/2018

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]

Avocado

Post Date: 1/7/2018

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

Post Date: 1/1/2018

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.