-
Notifications
You must be signed in to change notification settings - Fork 10
/
config.wyam
53 lines (47 loc) · 2 KB
/
config.wyam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Settings[Keys.Host] = "cake-contrib.github.io/Cake.Issues.Website";
Settings[DocsKeys.Title] = "Cake Issues";
Settings[DocsKeys.BaseEditUrl] = "https://github.com/cake-contrib/Cake.Issues.Website/blob/develop/input/";
Settings[DocsKeys.IncludeGlobalNamespace] = false;
Settings[DocsKeys.BlogPath] = "news";
Settings[DocsKeys.BlogTitle] = "News";
Pipelines.InsertBefore(Docs.Code, "Addins",
ReadFiles("../addins/*.yml"),
OrderBy(@doc.String(Keys.SourceFileName)),
Yaml()
);
// Remove any symbols generated by Fody.Costura
Pipelines[Docs.Api].Add(Where([email protected](CodeAnalysisKeys.QualifiedName).StartsWith("Costura")));
Pipelines.InsertAfter("Addins", "AddinCategories",
GroupByMany(@doc.List<string>("Categories"),
Documents("Addins")
),
Meta(Keys.WritePath, new FilePath("addins/" + @doc.String(Keys.GroupKey).ToLower().Replace(" ", "-") + "/index.html")),
Meta(Keys.RelativeFilePath, @doc.FilePath(Keys.WritePath)),
OrderBy(@doc.String(Keys.GroupKey))
);
Pipelines.InsertAfter(Docs.Api, "DslAliases",
GroupByMany(
@doc.DocumentList(CodeAnalysisKeys.Attributes)
.Where(attr => attr.String(CodeAnalysisKeys.Name) == "CakeAliasCategoryAttribute")
.Select(attr => attr.Get<Microsoft.CodeAnalysis.AttributeData>(CodeAnalysisKeys.AttributeData).ConstructorArguments.FirstOrDefault().Value),
Documents(Docs.Api),
Where(
@doc.String(CodeAnalysisKeys.Kind) == "NamedType" &&
@doc.DocumentList(CodeAnalysisKeys.Attributes)
.Any(attr => attr.String(CodeAnalysisKeys.Name) == "CakeAliasCategoryAttribute")
)
),
Meta(Keys.WritePath, new FilePath("dsl/index.html")),
Meta(Keys.RelativeFilePath, @doc.FilePath(Keys.WritePath)),
OrderBy(@doc.String(Keys.GroupKey))
);
Pipelines.Add("RenderAddins",
Documents("AddinCategories"),
Razor()
.WithLayout("/_AddinsLayout.cshtml"),
WriteFiles()
);
Pipelines.InsertBefore(Docs.Pages, "Issues",
ReadFiles("./issues/*.yml"),
Yaml()
);