astro-accelerator-utils 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.mts +2 -1
- package/index.mjs +2 -0
- package/lib/config.d.mts +6 -0
- package/lib/config.mjs +44 -0
- package/lib/postQueries.d.mts +2 -2
- package/lib/postQueries.mjs +1 -1
- package/package.json +1 -1
package/index.d.mts
CHANGED
|
@@ -3,10 +3,11 @@ import * as PostFiltering from "./lib/postFiltering.mjs";
|
|
|
3
3
|
import * as PostOrdering from "./lib/postOrdering.mjs";
|
|
4
4
|
import * as PostPaging from "./lib/postPaging.mjs";
|
|
5
5
|
import * as Cache from "./lib/cache.mjs";
|
|
6
|
+
import * as Config from "./lib/config.mjs";
|
|
6
7
|
import * as Dates from "./lib/dates.mjs";
|
|
7
8
|
import * as FooterMenu from "./lib/footerMenu.mjs";
|
|
8
9
|
import * as Markdown from "./lib/markdown.mjs";
|
|
9
10
|
import * as Navigation from "./lib/navigation.mjs";
|
|
10
11
|
import * as Taxonomy from "./lib/taxonomy.mjs";
|
|
11
12
|
import * as Urls from "./lib/urls.mjs";
|
|
12
|
-
export { PostQueries, PostFiltering, PostOrdering, PostPaging, Cache, Dates, FooterMenu, Markdown, Navigation, Taxonomy, Urls };
|
|
13
|
+
export { PostQueries, PostFiltering, PostOrdering, PostPaging, Cache, Config, Dates, FooterMenu, Markdown, Navigation, Taxonomy, Urls };
|
package/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import * as PostFiltering from './lib/postFiltering.mjs';
|
|
|
3
3
|
import * as PostOrdering from './lib/postOrdering.mjs';
|
|
4
4
|
import * as PostPaging from './lib/postPaging.mjs';
|
|
5
5
|
import * as Cache from './lib/cache.mjs';
|
|
6
|
+
import * as Config from './lib/config.mjs';
|
|
6
7
|
import * as Dates from './lib/dates.mjs';
|
|
7
8
|
import * as FooterMenu from './lib/footerMenu.mjs';
|
|
8
9
|
import * as Markdown from './lib/markdown.mjs';
|
|
@@ -16,6 +17,7 @@ export {
|
|
|
16
17
|
PostOrdering,
|
|
17
18
|
PostPaging,
|
|
18
19
|
Cache,
|
|
20
|
+
Config,
|
|
19
21
|
Dates,
|
|
20
22
|
FooterMenu,
|
|
21
23
|
Markdown,
|
package/lib/config.d.mts
ADDED
package/lib/config.mjs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef { import("../types/Site").Site } Site
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** @type {Site} */
|
|
6
|
+
export const SITE = {
|
|
7
|
+
owner: '',
|
|
8
|
+
url: '',
|
|
9
|
+
feedUrl: '',
|
|
10
|
+
title: '',
|
|
11
|
+
description: '',
|
|
12
|
+
themeColor: '#222255',
|
|
13
|
+
subfolder: '',
|
|
14
|
+
defaultLanguage: 'en',
|
|
15
|
+
default: {
|
|
16
|
+
lang: 'en',
|
|
17
|
+
locale: 'en-US',
|
|
18
|
+
dir: 'ltr'
|
|
19
|
+
},
|
|
20
|
+
search: {
|
|
21
|
+
fallbackUrl: 'https://www.google.com/search',
|
|
22
|
+
fallbackSite: 'q',
|
|
23
|
+
fallbackQuery: 'q',
|
|
24
|
+
},
|
|
25
|
+
pageSize: 12,
|
|
26
|
+
pageLinks: 3,
|
|
27
|
+
rssLimit: 20,
|
|
28
|
+
dateOptions: {
|
|
29
|
+
weekday: 'long',
|
|
30
|
+
year: 'numeric',
|
|
31
|
+
month: 'long',
|
|
32
|
+
day: 'numeric',
|
|
33
|
+
},
|
|
34
|
+
featureFlags: {
|
|
35
|
+
codeBlocks: ['copy'],
|
|
36
|
+
figures: ['enlarge'],
|
|
37
|
+
youTubeLinks: ['embed'],
|
|
38
|
+
},
|
|
39
|
+
images: {
|
|
40
|
+
contentSize: '(max-width: 860px) 100vw, 620px',
|
|
41
|
+
listerSize: '(max-width: 860px) 90vw, 350px',
|
|
42
|
+
authorSize: '50px',
|
|
43
|
+
}
|
|
44
|
+
};
|
package/lib/postQueries.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fetches pages
|
|
3
3
|
* @param {PagePredicate} [filter]
|
|
4
|
-
* @returns {Promise<MarkdownInstance}
|
|
4
|
+
* @returns {Promise<MarkdownInstance[]>}
|
|
5
5
|
*/
|
|
6
|
-
export function getPages(filter?: PagePredicate): Promise<MarkdownInstance>;
|
|
6
|
+
export function getPages(filter?: PagePredicate): Promise<MarkdownInstance[]>;
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
9
|
* @param {Site} site
|
package/lib/postQueries.mjs
CHANGED
|
@@ -19,7 +19,7 @@ function fetchAll () {
|
|
|
19
19
|
/**
|
|
20
20
|
* Fetches pages
|
|
21
21
|
* @param {PagePredicate} [filter]
|
|
22
|
-
* @returns {Promise<MarkdownInstance}
|
|
22
|
+
* @returns {Promise<MarkdownInstance[]>}
|
|
23
23
|
*/
|
|
24
24
|
export async function getPages (filter) {
|
|
25
25
|
const key = 'PageQueries__getPages';
|