Add tag overview, improve assets
This commit is contained in:
@ -18,11 +18,16 @@ extension Content {
|
||||
!posts.contains { $0.id == id }
|
||||
}
|
||||
|
||||
func isValidIdForTagOrTagOrPost(_ id: String) -> Bool {
|
||||
func isValidIdForTagOrPageOrPost(_ id: String) -> Bool {
|
||||
id.rangeOfCharacter(from: Content.disallowedCharactersInIds) == nil
|
||||
}
|
||||
|
||||
func isValidIdForFile(_ id: String) -> Bool {
|
||||
id.rangeOfCharacter(from: Content.disallowedCharactersInFileIds) == nil
|
||||
}
|
||||
|
||||
func containsTag(withUrlComponent urlComponent: String) -> Bool {
|
||||
(tagOverview?.contains(urlComponent: urlComponent) ?? false) ||
|
||||
tags.contains { $0.contains(urlComponent: urlComponent) }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user