This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.wyam
80 lines (70 loc) · 2.82 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Preprocessor directives
#recipe Docs
#theme Samson
// Hosting information
Settings[Keys.Host] = "calvinverse.github.io";
Settings[Keys.LinkRoot] = "";
// Site information
Settings[DocsKeys.Title] = "Calvinverse";
// Edit settings
Settings[DocsKeys.BaseEditUrl] = "https://github.com/calvinverse/calvinverse.docs/tree/master/src/";
// pipelines
// Update the blog files to not all use the same template because then we can't
// add the index to the navbar
// Categories
int categoryIndex = Pipelines.IndexOf(Docs.BlogCategories);
Pipelines.Remove(Docs.BlogCategories);
Pipelines.Insert(categoryIndex, Docs.BlogCategories,
(IPipeline)new Wyam.Web.Pipelines.Archive(
Docs.BlogCategories,
new Wyam.Web.Pipelines.ArchiveSettings
{
Pipelines = new string[] { nameof(Wyam.Docs.Docs.BlogPosts) },
TemplateFile = ctx => "_BlogArchive.cshtml",
}));
// BlogArchives
int archiveIndex = Pipelines.IndexOf(Docs.BlogArchives);
Pipelines.Remove(Docs.BlogArchives);
Pipelines.Insert(archiveIndex, Docs.BlogArchives,
(IPipeline)new Wyam.Web.Pipelines.Archive(
Docs.BlogArchives,
new Wyam.Web.Pipelines.ArchiveSettings
{
Pipelines = new string[] { nameof(Wyam.Docs.Docs.BlogPosts) },
TemplateFile = ctx => "_BlogArchive.cshtml",
}));
// BlogYearlyArchives
int yearlyCategoryIndex = Pipelines.IndexOf(Docs.BlogYearlyArchives);
Pipelines.Remove(Docs.BlogYearlyArchives);
Pipelines.Insert(yearlyCategoryIndex, Docs.BlogYearlyArchives,
(IPipeline)new Wyam.Web.Pipelines.Archive(
Docs.BlogYearlyArchives,
new Wyam.Web.Pipelines.ArchiveSettings
{
Pipelines = new string[] { nameof(Wyam.Docs.Docs.BlogPosts) },
TemplateFile = ctx => "_BlogArchive.cshtml",
}));
// Tags
int tagIndex = Pipelines.IndexOf(Docs.BlogTags);
Pipelines.Remove(Docs.BlogTags);
Pipelines.Insert(tagIndex, Docs.BlogTags,
(IPipeline)new Wyam.Web.Pipelines.Archive(
Docs.BlogTags,
new Wyam.Web.Pipelines.ArchiveSettings
{
Pipelines = new string[] { nameof(Wyam.Docs.Docs.BlogPosts) },
TemplateFile = ctx => "_BlogTag.cshtml",
}));
// BlogAuthors
int authorTagIndex = Pipelines.IndexOf(Docs.BlogAuthors);
Pipelines.Remove(Docs.BlogAuthors);
Pipelines.Insert(authorTagIndex, Docs.BlogAuthors,
(IPipeline)new Wyam.Web.Pipelines.Archive(
Docs.BlogAuthors,
new Wyam.Web.Pipelines.ArchiveSettings
{
Pipelines = new string[] { nameof(Wyam.Docs.Docs.BlogPosts) },
TemplateFile = ctx => "_BlogTag.cshtml",
}));
// Remove the pipelines we don't want
Pipelines.Remove("Name");