Remove dead TemplateContext protocol

This commit is contained in:
Sami Samhuri 2019-12-09 23:34:39 -08:00
parent 4b3dee6706
commit d184ed06fa
4 changed files with 6 additions and 16 deletions

View file

@ -14,7 +14,7 @@ struct PageContext {
let metadata: [String: String]
}
extension PageContext: TemplateContext {
extension PageContext {
var template: String {
page.template ?? site.template
}

View file

@ -17,7 +17,7 @@ struct SiteContext {
}
}
extension SiteContext: TemplateContext {
extension SiteContext {
var dictionary: [String: Any] {
[
"site": site,

View file

@ -1,14 +0,0 @@
//
// TemplateContext.swift
// SiteGenerator
//
// Created by Sami Samhuri on 2019-12-02.
//
import Foundation
protocol TemplateContext {
var template: String { get }
var dictionary: [String : Any] { get }
}

View file

@ -20,6 +20,8 @@ struct MonthPosts {
}
}
// MARK: -
struct YearPosts {
let year: Int
var byMonth: [Month: MonthPosts]
@ -46,6 +48,8 @@ struct YearPosts {
}
}
// MARK: -
struct PostsByYear {
private(set) var byYear: [Int: YearPosts]