Add button to remove a tag

This commit is contained in:
Christoph Hagen
2025-05-04 11:55:54 +02:00
parent a8920a4cd2
commit a4710d525b
4 changed files with 40 additions and 6 deletions

View File

@ -145,6 +145,17 @@ final class Content: ObservableObject {
// TODO: Check for page links and other references in content
}
func remove(_ tag: Tag) {
tags.remove(tag)
for post in posts {
post.tags.remove(tag)
}
for page in pages {
page.tags.remove(tag)
}
// TODO: Check for tag links and other references is content
}
// MARK: Loading
func file(withOutputPath: String) -> FileResource? {