diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-10-22 20:06:01 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-10-22 20:06:01 +0300 |
commit | eeb3bcec19b15e6b7d30f983c8f613dedb1a9b32 (patch) | |
tree | fc3b0be53cb839be0a02106b9d140f2afb0c98b6 /src/lib/types.ts | |
parent | 82de4ac15e6a942c3b004efad24a3dc8a4ab7edf (diff) | |
download | benzin-next-eeb3bcec19b15e6b7d30f983c8f613dedb1a9b32.tar.gz |
refactor: separate Nginx adapter
Diffstat (limited to 'src/lib/types.ts')
-rw-r--r-- | src/lib/types.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/types.ts b/src/lib/types.ts new file mode 100644 index 0000000..8bbf5bb --- /dev/null +++ b/src/lib/types.ts @@ -0,0 +1,15 @@ +import { GetStaticPathsResult } from 'next'; + +/* Collection of methods to fetch data & metadata from CDN */ +export interface Adapter { + getStaticMarkdownPaths: (cdn: string) => Promise<GetStaticPathsResult['paths']>; + getMarkdownSource: (cdn: string, path: string[]) => Promise<string>; + getEmojiFileNames: (cdn: string) => Promise<string[]>; +} + +export interface BenzinConfig { + CDN: string; + adapter: Adapter; +} + + |