-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
98 lines (92 loc) · 2.26 KB
/
index.d.ts
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
declare class TemplateCollection {
getAll: () => Array<CollectionItem>;
items: Array<CollectionItem>;
}
declare type CollectionItem = {
data: CollectionData;
date: Date;
filePathStem: string;
fileSlug: string;
inputPath: string;
outputPath: string;
template: Template;
templateContent: string;
url: string;
};
declare type CollectionData = {
collections: Object;
images?: Array<PostImage>;
layout: string;
metadata: Object;
navtitle?: string;
page: Object;
pkg: Object;
tags?: Array<string>;
templateClass: string;
title: string;
};
declare type PostImage = {
alt: string;
imageUrl: string;
unsplashUrl: string;
};
declare type Template = {
extraOutputSubdirectory: string;
filePathStem: string;
fileSlugStr: string;
inputContent: string;
inputDir: string;
inputPath: string;
isDryRun: boolean;
isVerbose: boolean;
outputDir: string;
paginationData: Object;
parsed: Object;
plugins: Object;
skippedCount: number;
wrapWithLayouts: boolean;
writeCount: number;
};
declare type EleventyConfig = {
addCollection: (
name: string,
collection:
| Array<string>
| ((collection: TemplateCollection) => Array<CollectionItem>),
) => void;
addFilter: (
name: string,
filterFunction: (...args: any) => string | string[],
) => void;
addPlugin: (plugin: unknown, options?: Record<string, unknown>) => void;
addShortcode: (
name: string,
shortcodeFunction: (...args: any) => string,
) => void;
addTransform: (
name: string,
transformFunction: (content: string, outputPath: string) => string,
) => void;
addLayoutAlias: (alias: string, path: string) => void;
addPassthroughCopy: (glob: string) => void;
setDataDeepMerge: (value: boolean) => void;
setLibrary: (name: string, renderer: any) => void;
addWatchTarget: (glob: string) => void;
setBrowserSyncConfig: (config: {
callbacks: { ready: (error: Error, browserSync: any) => void };
}) => void;
};
declare type EleventyFinalConfig = {
templateFormats: Array<string>;
pathPrefix: string;
markdownTemplateEngine: string;
htmlTemplateEngine: string;
dataTemplateEngine: string;
passthroughFileCopy: boolean;
dir: {
input: string;
includes: string;
data: string;
output: string;
};
};