-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
686 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/// Abstract category type. | ||
public protocol EntryCategory { | ||
/// Term used for the category | ||
var term: String { get } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
/** | ||
A descriptor for a category. | ||
- Note: This struct is publicly accessible. | ||
- Important: The `title` and `description` properties are read-only. | ||
- SeeAlso: `Category` | ||
*/ | ||
public struct CategoryDescriptor { | ||
/// The title of the category. | ||
public let title: String | ||
|
||
/// The description of the category. | ||
public let description: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/// A type alias representing a site category. | ||
public typealias SiteCategoryType = String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/// A collection of site language content. | ||
public typealias SiteCollection = [SiteLanguageContent] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
import Foundation | ||
|
||
/// A builder for creating a site collection directory. | ||
public struct SiteCollectionDirectoryBuilder: SiteDirectoryBuilder { | ||
/// Initializes a new instance of `SiteCollectionDirectoryBuilder`. | ||
public init() {} | ||
|
||
/** | ||
Creates a site collection directory from a site collection. | ||
- Parameter blogs: The site collection to build the directory from. | ||
- Returns: A new instance of `SiteCollectionDirectory`. | ||
*/ | ||
public func directory(fromCollection blogs: SiteCollection) -> SiteCollectionDirectory { | ||
SiteCollectionDirectory(blogs: blogs) | ||
} | ||
} | ||
|
||
/// A protocol for building site directories. | ||
public protocol SiteDirectoryBuilder { | ||
/// The type of site directory to build. | ||
associatedtype SiteDirectoryType: SiteDirectory | ||
|
||
/** | ||
Creates a site directory from a site collection. | ||
- Parameter blogs: The site collection to build the directory from. | ||
- Returns: A new instance of `SiteDirectoryType`. | ||
*/ | ||
func directory(fromCollection blogs: SiteCollection) -> SiteDirectoryType | ||
} |
Oops, something went wrong.