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.

October

Onion

Post Date: 10/11/2018

The onion (Allium cepa L., from Latin cepa "onion"), also known as the bulb onion or common onion, is a vegetable that is the most widely cultivated species of the genus Allium. Its close relatives include the garlic, scallion, shallot, leek, chive,[2] and Chinese onion.[3]