feat: Working on rendering a search index / json file.
This commit is contained in:
@@ -35,6 +35,7 @@ struct Run {
|
||||
writers: [
|
||||
.itemWriter(swim(renderArticle)),
|
||||
.listWriter(swim(renderArticles)),
|
||||
.listWriter(renderJson, output: "../static/search.json"),
|
||||
.tagWriter(swim(renderTag), tags: \.metadata.tags),
|
||||
.yearWriter(swim(renderYear)),
|
||||
// Atom feed for all articles, and a feed per tag
|
||||
@@ -72,5 +73,18 @@ struct Run {
|
||||
// All the remaining files that were not parsed to markdown, so for example images, raw html files and css,
|
||||
// are copied as-is to the output folder.
|
||||
.staticFiles()
|
||||
|
||||
// Run saga again on articles, to collect search index.
|
||||
// try await Saga(input: "content", output: "deploy")
|
||||
// .register(
|
||||
// folder: "articles",
|
||||
// metadata: ArticleMetadata.self,
|
||||
// readers: [.plainReader],
|
||||
// filter: \.public,
|
||||
// writers: [
|
||||
// .listWriter(renderJson, output: "../search.json")
|
||||
// ]
|
||||
// )
|
||||
// .run()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user