2025-03-05 00:04:07 +01:00
|
|
|
/// An enumeration that represents basic configuration static files which will be created by the `DocC` building process.
|
2025-02-25 01:55:49 +01:00
|
|
|
enum StaticFile: String, CaseIterable {
|
2025-03-05 00:04:07 +01:00
|
|
|
/// A file defining the root of the articles' folder, which will be used to redirect to the root of the archives' root article.
|
2025-02-25 01:55:49 +01:00
|
|
|
case documentation = "documentation.json"
|
2025-03-05 00:04:07 +01:00
|
|
|
/// A file containing the icon in `.ico` format for the documentation generated by the `DocC` building process.
|
2025-02-25 01:55:49 +01:00
|
|
|
case faviconICO = "favicon.ico"
|
2025-03-05 00:04:07 +01:00
|
|
|
/// A file containing the icon in `.svg` format for the documentation generated by the `DocC` building process.
|
2025-02-25 01:55:49 +01:00
|
|
|
case faviconSVG = "favicon.svg"
|
2025-03-05 00:04:07 +01:00
|
|
|
/// A file containing the theme settings for the documentation generated by the `DocC` building process.
|
2025-02-25 01:55:49 +01:00
|
|
|
case themeSettings = "theme-settings.json"
|
|
|
|
}
|
|
|
|
|
|
|
|
// MARK: - Pathable
|
|
|
|
|
|
|
|
extension StaticFile: Pathable {
|
|
|
|
|
|
|
|
// MARK: Computed
|
|
|
|
|
|
|
|
var path: String {
|
|
|
|
switch self {
|
2025-03-05 00:04:07 +01:00
|
|
|
case .documentation: .init(format: .Format.Path.data, rawValue)
|
|
|
|
default: .init(format: .Format.Path.root, rawValue)
|
2025-02-25 01:55:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|