astro-accelerator-utils 0.0.40 → 0.0.42

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 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, Language };
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';
@@ -10,16 +11,20 @@ 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
13
 
14
+ import * as Language from './lib/_language.json';
15
+
13
16
  export {
14
17
  PostQueries,
15
18
  PostFiltering,
16
19
  PostOrdering,
17
20
  PostPaging,
18
21
  Cache,
22
+ Config,
19
23
  Dates,
20
24
  FooterMenu,
21
25
  Markdown,
22
26
  Navigation,
23
27
  Taxonomy,
24
- Urls
28
+ Urls,
29
+ Language
25
30
  };
@@ -0,0 +1,114 @@
1
+ {
2
+ "aria": {
3
+ "breadcrumbs": {
4
+ "en": "Breadcrumb"
5
+ },
6
+ "site_navigation": {
7
+ "en": "Site Navigation"
8
+ },
9
+ "toc": {
10
+ "en": "Table of contents"
11
+ },
12
+ "paging": {
13
+ "en": "Paging"
14
+ },
15
+ "skiplinks": {
16
+ "en": "Skip Links"
17
+ },
18
+ "back_to_top": {
19
+ "en": "Skip Back"
20
+ }
21
+ },
22
+ "skiplinks": {
23
+ "skip_to_top": {
24
+ "en": "Back to top"
25
+ },
26
+ "skip_to_navigation": {
27
+ "en": "Skip to navigation"
28
+ },
29
+ "skip_to_content": {
30
+ "en": "Skip to main content"
31
+ },
32
+ "skip_to_footer": {
33
+ "en": "Skip to footer"
34
+ }
35
+ },
36
+ "header": {
37
+ "open_menu": {
38
+ "en": "Open menu"
39
+ },
40
+ "open_search": {
41
+ "en": "Open site search"
42
+ }
43
+ },
44
+ "navigation": {
45
+ "title": {
46
+ "en": "Navigation"
47
+ }
48
+ },
49
+ "toc": {
50
+ "title":{
51
+ "en": "Table of contents"
52
+ }
53
+ },
54
+ "footer": {
55
+ "copyright": {
56
+ "en": "Copyright"
57
+ }
58
+ },
59
+ "post": {
60
+ "written_by": {
61
+ "en": "Written by"
62
+ },
63
+ "last_modified": {
64
+ "en": "Revised"
65
+ }
66
+ },
67
+ "author": {
68
+ "recent_articles": {
69
+ "en": "Recent Articles"
70
+ },
71
+ "twitter": {
72
+ "en": "Twitter"
73
+ }
74
+ },
75
+ "search": {
76
+ "search_for": {
77
+ "en": "Search for"
78
+ },
79
+ "submit": {
80
+ "en": "Go"
81
+ },
82
+ "results_title": {
83
+ "en": "Results"
84
+ },
85
+ "no_results_title": {
86
+ "en": "No Results"
87
+ }
88
+ },
89
+ "articles": {
90
+ "page_title": {
91
+ "en": "Page {n}"
92
+ },
93
+ "previous": {
94
+ "en": "Prev"
95
+ },
96
+ "next": {
97
+ "en": "Next"
98
+ },
99
+ "category_title": {
100
+ "en": "Categories"
101
+ },
102
+ "tag_title": {
103
+ "en": "Tags"
104
+ },
105
+ "category": {
106
+ "_note": "This must match your URL path to category pages, as in /category/example/1/",
107
+ "en": "category"
108
+ },
109
+ "tag": {
110
+ "_note": "This must match your URL path to tag pages, as in /tag/example/1/",
111
+ "en": "tag"
112
+ }
113
+ }
114
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @typedef { import("../types/Site").Site } Site
3
+ */
4
+ /**
5
+ * Gets default configuration
6
+ * @returns {Site}
7
+ */
8
+ export function getDefault(): Site;
9
+ export type Site = import("../types/Site").Site;
package/lib/config.mjs ADDED
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @typedef { import("../types/Site").Site } Site
3
+ */
4
+
5
+ /**
6
+ * Gets default configuration
7
+ * @returns {Site}
8
+ */
9
+ export function getDefault() {
10
+ return {
11
+ owner: '',
12
+ url: '',
13
+ feedUrl: '',
14
+ title: '',
15
+ description: '',
16
+ themeColor: '#222255',
17
+ subfolder: '',
18
+ defaultLanguage: 'en',
19
+ default: {
20
+ lang: 'en',
21
+ locale: 'en-US',
22
+ dir: 'ltr'
23
+ },
24
+ search: {
25
+ fallbackUrl: 'https://www.google.com/search',
26
+ fallbackSite: 'q',
27
+ fallbackQuery: 'q',
28
+ },
29
+ pageSize: 12,
30
+ pageLinks: 3,
31
+ rssLimit: 20,
32
+ dateOptions: {
33
+ weekday: 'long',
34
+ year: 'numeric',
35
+ month: 'long',
36
+ day: 'numeric',
37
+ },
38
+ featureFlags: {
39
+ codeBlocks: ['copy'],
40
+ figures: ['enlarge'],
41
+ youTubeLinks: ['embed'],
42
+ },
43
+ images: {
44
+ contentSize: '(max-width: 860px) 100vw, 620px',
45
+ listerSize: '(max-width: 860px) 90vw, 350px',
46
+ authorSize: '50px',
47
+ }
48
+ };
49
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-accelerator-utils",
3
- "version": "0.0.40",
3
+ "version": "0.0.42",
4
4
  "description": "Astro utilities for Astro Accelerator.",
5
5
  "main": "index.mjs",
6
6
  "files": [