astro-accelerator 0.0.110 → 0.0.111
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/package.json +1 -1
- package/src/layouts/Redirect.astro +0 -1
- package/src/layouts/Search.astro +0 -1
- package/src/pages/articles/[page].astro +4 -4
- package/src/pages/category/[category]/[page].astro +4 -4
- package/src/pages/tag/[tag]/[page].astro +4 -4
- package/src/themes/accelerator/components/ArticleList.astro +4 -4
- package/src/themes/accelerator/components/Authors.astro +4 -4
- package/src/themes/accelerator/components/AuthorsMini.astro +4 -4
- package/src/themes/accelerator/components/Breadcrumbs.astro +4 -4
- package/src/themes/accelerator/components/Copyright.astro +4 -4
- package/src/themes/accelerator/components/Footer.astro +4 -4
- package/src/themes/accelerator/components/FooterItem.astro +5 -4
- package/src/themes/accelerator/components/Header.astro +4 -4
- package/src/themes/accelerator/components/HtmlHead.astro +4 -4
- package/src/themes/accelerator/components/Navigation.astro +4 -4
- package/src/themes/accelerator/components/NavigationBar.astro +4 -4
- package/src/themes/accelerator/components/NavigationItem.astro +4 -4
- package/src/themes/accelerator/components/PagingLinks.astro +4 -4
- package/src/themes/accelerator/components/Related.astro +4 -4
- package/src/themes/accelerator/components/SkipLinks.astro +5 -4
- package/src/themes/accelerator/components/TableOfContents.astro +4 -4
- package/src/themes/accelerator/components/Taxonomy.astro +4 -4
- package/src/themes/accelerator/layouts/Author.astro +4 -4
- package/src/themes/accelerator/layouts/Default.astro +4 -4
- package/src/themes/accelerator/layouts/Redirect.astro +4 -5
- package/src/themes/accelerator/layouts/Search.astro +4 -5
- package/src/env.d.ts +0 -1
package/package.json
CHANGED
package/src/layouts/Search.astro
CHANGED
|
@@ -12,6 +12,10 @@ import Default from 'src/layouts/Default.astro';
|
|
|
12
12
|
import ArticleList from '@components/ArticleList.astro';
|
|
13
13
|
import PagingLinks from '@components/PagingLinks.astro';
|
|
14
14
|
|
|
15
|
+
const accelerator = new Accelerator(SITE);
|
|
16
|
+
const stats = new accelerator.statistics('pages/articles/[page].astro');
|
|
17
|
+
stats.start();
|
|
18
|
+
|
|
15
19
|
const lang = SITE.default.lang;
|
|
16
20
|
|
|
17
21
|
// Props
|
|
@@ -34,10 +38,6 @@ const frontmatter: Frontmatter = {
|
|
|
34
38
|
const _ = Lang(lang);
|
|
35
39
|
|
|
36
40
|
// Logic
|
|
37
|
-
const accelerator = new Accelerator(SITE);
|
|
38
|
-
const stats = new accelerator.statistics('pages/articles/[page].astro');
|
|
39
|
-
stats.start();
|
|
40
|
-
|
|
41
41
|
export async function getData() {
|
|
42
42
|
const sourcePosts = await Astro.glob('./**/*.md', './**/*.mdx') as MarkdownInstance[];
|
|
43
43
|
const posts = sourcePosts
|
|
@@ -12,6 +12,10 @@ import Default from 'src/layouts/Default.astro';
|
|
|
12
12
|
import ArticleList from '@components/ArticleList.astro';
|
|
13
13
|
import PagingLinks from '@components/PagingLinks.astro';
|
|
14
14
|
|
|
15
|
+
const accelerator = new Accelerator(SITE);
|
|
16
|
+
const stats = new accelerator.statistics('pages/authors/[category]/[page].astro');
|
|
17
|
+
stats.start();
|
|
18
|
+
|
|
15
19
|
const lang = SITE.default.lang;
|
|
16
20
|
const currentUrl = new URL(Astro.request.url);
|
|
17
21
|
const slug = currentUrl.pathname.split('/')[3];
|
|
@@ -38,10 +42,6 @@ const frontmatter: Frontmatter = {
|
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
// Logic
|
|
41
|
-
const accelerator = new Accelerator(SITE);
|
|
42
|
-
const stats = new accelerator.statistics('pages/authors/[category]/[page].astro');
|
|
43
|
-
stats.start();
|
|
44
|
-
|
|
45
45
|
type CategoryData = {
|
|
46
46
|
posts: MarkdownInstance[];
|
|
47
47
|
categories: string[];
|
|
@@ -12,6 +12,10 @@ import Default from 'src/layouts/Default.astro';
|
|
|
12
12
|
import ArticleList from '@components/ArticleList.astro';
|
|
13
13
|
import PagingLinks from '@components/PagingLinks.astro';
|
|
14
14
|
|
|
15
|
+
const accelerator = new Accelerator(SITE);
|
|
16
|
+
const stats = new accelerator.statistics('pages/authors/[tag]/[page].astro');
|
|
17
|
+
stats.start();
|
|
18
|
+
|
|
15
19
|
const lang = SITE.default.lang;
|
|
16
20
|
const currentUrl = new URL(Astro.request.url);
|
|
17
21
|
const slug = currentUrl.pathname.split('/')[3];
|
|
@@ -38,10 +42,6 @@ const frontmatter: Frontmatter = {
|
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
// Logic
|
|
41
|
-
const accelerator = new Accelerator(SITE);
|
|
42
|
-
const stats = new accelerator.statistics('pages/authors/[tag]/[page].astro');
|
|
43
|
-
stats.start();
|
|
44
|
-
|
|
45
45
|
type CacheData = {
|
|
46
46
|
posts: MarkdownInstance[];
|
|
47
47
|
tags: string[];
|
|
@@ -6,6 +6,10 @@ import { SITE } from '@config';
|
|
|
6
6
|
import { getImageInfo } from '@util/custom-markdown.mjs';
|
|
7
7
|
import AuthorsMini from '@components/AuthorsMini.astro';
|
|
8
8
|
|
|
9
|
+
const accelerator = new Accelerator(SITE);
|
|
10
|
+
const stats = new accelerator.statistics('accelerator/components/ArticleList.astro');
|
|
11
|
+
stats.start();
|
|
12
|
+
|
|
9
13
|
// Properties
|
|
10
14
|
type Props = {
|
|
11
15
|
lang: string;
|
|
@@ -14,10 +18,6 @@ type Props = {
|
|
|
14
18
|
const { lang, posts } = Astro.props satisfies Props;
|
|
15
19
|
|
|
16
20
|
// Logic
|
|
17
|
-
const accelerator = new Accelerator(SITE);
|
|
18
|
-
const stats = new accelerator.statistics('accelerator/components/ArticleList.astro');
|
|
19
|
-
stats.start();
|
|
20
|
-
|
|
21
21
|
type ImageInfo = {
|
|
22
22
|
src: string;
|
|
23
23
|
srcset: string;
|
|
@@ -5,6 +5,10 @@ import { SITE } from '@config';
|
|
|
5
5
|
import { Translations, Lang } from '@util/Languages';
|
|
6
6
|
import { getImageInfo } from '@util/custom-markdown.mjs';
|
|
7
7
|
|
|
8
|
+
const accelerator = new Accelerator(SITE);
|
|
9
|
+
const stats = new accelerator.statistics('accelerator/components/Authors.astro');
|
|
10
|
+
stats.start();
|
|
11
|
+
|
|
8
12
|
// Properties
|
|
9
13
|
type Props = {
|
|
10
14
|
lang: string;
|
|
@@ -16,10 +20,6 @@ const { lang, frontmatter } = Astro.props satisfies Props;
|
|
|
16
20
|
const _ = Lang(lang);
|
|
17
21
|
|
|
18
22
|
// Logic
|
|
19
|
-
const accelerator = new Accelerator(SITE);
|
|
20
|
-
const stats = new accelerator.statistics('accelerator/components/Authors.astro');
|
|
21
|
-
stats.start();
|
|
22
|
-
|
|
23
23
|
const authorList = accelerator.authors.forPost(frontmatter);
|
|
24
24
|
|
|
25
25
|
// Get image info
|
|
@@ -4,6 +4,10 @@ import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
|
|
|
4
4
|
import { SITE } from '@config';
|
|
5
5
|
import { Translations, Lang } from '@util/Languages';;
|
|
6
6
|
|
|
7
|
+
const accelerator = new Accelerator(SITE);
|
|
8
|
+
const stats = new accelerator.statistics('accelerator/components/AuthorsMini.astro');
|
|
9
|
+
stats.start();
|
|
10
|
+
|
|
7
11
|
// Properties
|
|
8
12
|
type Props = {
|
|
9
13
|
lang: string;
|
|
@@ -15,10 +19,6 @@ const { lang, frontmatter } = Astro.props satisfies Props;
|
|
|
15
19
|
const _ = Lang(lang);
|
|
16
20
|
|
|
17
21
|
// Logic
|
|
18
|
-
const accelerator = new Accelerator(SITE);
|
|
19
|
-
const stats = new accelerator.statistics('accelerator/components/AuthorsMini.astro');
|
|
20
|
-
stats.start();
|
|
21
|
-
|
|
22
22
|
const authorList = accelerator.authors.forPost(frontmatter);
|
|
23
23
|
|
|
24
24
|
stats.stop();
|
|
@@ -4,6 +4,10 @@ import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
|
|
|
4
4
|
import { SITE } from '@config';
|
|
5
5
|
import { Translations, Lang } from '@util/Languages';
|
|
6
6
|
|
|
7
|
+
const accelerator = new Accelerator(SITE);
|
|
8
|
+
const stats = new accelerator.statistics('accelerator/components/Breadcrumbs.astro');
|
|
9
|
+
stats.start();
|
|
10
|
+
|
|
7
11
|
// Properties
|
|
8
12
|
type Props = {
|
|
9
13
|
lang: string;
|
|
@@ -17,10 +21,6 @@ const { lang, breadcrumbs } = Astro.props satisfies Props;
|
|
|
17
21
|
const _ = Lang(lang);
|
|
18
22
|
|
|
19
23
|
// Logic
|
|
20
|
-
const accelerator = new Accelerator(SITE);
|
|
21
|
-
const stats = new accelerator.statistics('accelerator/components/Breadcrumbs.astro');
|
|
22
|
-
stats.start();
|
|
23
|
-
|
|
24
24
|
const currentUrl = new URL(Astro.request.url);
|
|
25
25
|
const navPages = accelerator.navigation.breadcrumbs(currentUrl, SITE.subfolder, breadcrumbs?.length ?? 0);
|
|
26
26
|
|
|
@@ -4,6 +4,10 @@ import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
|
|
|
4
4
|
import { SITE } from '@config';
|
|
5
5
|
import { Translations, Lang } from '@util/Languages';
|
|
6
6
|
|
|
7
|
+
const accelerator = new Accelerator(SITE);
|
|
8
|
+
const stats = new accelerator.statistics('accelerator/components/Copyright.astro');
|
|
9
|
+
stats.start();
|
|
10
|
+
|
|
7
11
|
// Properties
|
|
8
12
|
type Props = {
|
|
9
13
|
lang: string;
|
|
@@ -16,10 +20,6 @@ const { lang } = Astro.props satisfies Props;
|
|
|
16
20
|
const _ = Lang(lang);
|
|
17
21
|
|
|
18
22
|
// Logic
|
|
19
|
-
const accelerator = new Accelerator(SITE);
|
|
20
|
-
const stats = new accelerator.statistics('accelerator/components/Copyright.astro');
|
|
21
|
-
stats.start();
|
|
22
|
-
|
|
23
23
|
stats.stop();
|
|
24
24
|
---
|
|
25
25
|
<p>{ _(Translations.footer.copyright) } © { new Date().getFullYear() } { SITE.owner }</p>
|
|
@@ -6,6 +6,10 @@ import { Translations, Lang } from '@util/Languages';
|
|
|
6
6
|
import { menu } from 'src/data/footer';
|
|
7
7
|
import FooterItem from '@components/FooterItem.astro';
|
|
8
8
|
|
|
9
|
+
const accelerator = new Accelerator(SITE);
|
|
10
|
+
const stats = new accelerator.statistics('accelerator/components/Footer.astro');
|
|
11
|
+
stats.start();
|
|
12
|
+
|
|
9
13
|
// Properties
|
|
10
14
|
type Props = {
|
|
11
15
|
lang: string;
|
|
@@ -18,10 +22,6 @@ const { lang } = Astro.props satisfies Props;
|
|
|
18
22
|
const _ = Lang(lang);
|
|
19
23
|
|
|
20
24
|
// Logic
|
|
21
|
-
const accelerator = new Accelerator(SITE);
|
|
22
|
-
const stats = new accelerator.statistics('accelerator/components/Footer.astro');
|
|
23
|
-
stats.start();
|
|
24
|
-
|
|
25
25
|
const currentUrl = new URL(Astro.request.url);
|
|
26
26
|
const pages = accelerator.navigation.footer(currentUrl, _, Translations, SITE.subfolder, menu);
|
|
27
27
|
|
|
@@ -3,6 +3,10 @@ import type { NavPage } from 'astro-accelerator-utils/types/NavPage';
|
|
|
3
3
|
import { Accelerator } from 'astro-accelerator-utils';
|
|
4
4
|
import { SITE } from '@config';
|
|
5
5
|
|
|
6
|
+
const accelerator = new Accelerator(SITE);
|
|
7
|
+
const stats = new accelerator.statistics('accelerator/components/FooterItem.astro');
|
|
8
|
+
stats.start();
|
|
9
|
+
|
|
6
10
|
// Properties
|
|
7
11
|
type Props = {
|
|
8
12
|
lang: string;
|
|
@@ -10,10 +14,7 @@ type Props = {
|
|
|
10
14
|
};
|
|
11
15
|
const { lang, page } = Astro.props satisfies Props;
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
const stats = new accelerator.statistics('accelerator/components/FooterItem.astro');
|
|
15
|
-
stats.start();
|
|
16
|
-
|
|
17
|
+
// Logic
|
|
17
18
|
stats.stop();
|
|
18
19
|
---
|
|
19
20
|
{page.children.length > 0 && (
|
|
@@ -4,6 +4,10 @@ import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
|
|
|
4
4
|
import { SITE } from '@config';
|
|
5
5
|
import { Translations, Lang } from '@util/Languages';
|
|
6
6
|
|
|
7
|
+
const accelerator = new Accelerator(SITE);
|
|
8
|
+
const stats = new accelerator.statistics('accelerator/components/Header.astro');
|
|
9
|
+
stats.start();
|
|
10
|
+
|
|
7
11
|
// Properties
|
|
8
12
|
type Props = {
|
|
9
13
|
lang: string;
|
|
@@ -16,10 +20,6 @@ const { lang } = Astro.props satisfies Props;
|
|
|
16
20
|
const _ = Lang(lang);
|
|
17
21
|
|
|
18
22
|
// Logic
|
|
19
|
-
const accelerator = new Accelerator(SITE);
|
|
20
|
-
const stats = new accelerator.statistics('accelerator/components/Header.astro');
|
|
21
|
-
stats.start();
|
|
22
|
-
|
|
23
23
|
const search = accelerator.posts.all().filter(PostFiltering.isSearch).shift() ?? null;
|
|
24
24
|
|
|
25
25
|
stats.stop();
|
|
@@ -3,6 +3,10 @@ import { Accelerator } from 'astro-accelerator-utils';
|
|
|
3
3
|
import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
|
|
4
4
|
import { SITE, OPEN_GRAPH, HEADER_SCRIPTS } from '@config';
|
|
5
5
|
|
|
6
|
+
const accelerator = new Accelerator(SITE);
|
|
7
|
+
const stats = new accelerator.statistics('accelerator/components/HtmlHead.astro');
|
|
8
|
+
stats.start();
|
|
9
|
+
|
|
6
10
|
// Properties
|
|
7
11
|
type Props = {
|
|
8
12
|
lang: string;
|
|
@@ -12,10 +16,6 @@ type Props = {
|
|
|
12
16
|
const { frontmatter } = Astro.props;
|
|
13
17
|
|
|
14
18
|
// Logic
|
|
15
|
-
const accelerator = new Accelerator(SITE);
|
|
16
|
-
const stats = new accelerator.statistics('accelerator/components/HtmlHead.astro');
|
|
17
|
-
stats.start();
|
|
18
|
-
|
|
19
19
|
const imageSrc = frontmatter.bannerImage?.src ?? OPEN_GRAPH.image.src;
|
|
20
20
|
const imageAlt = frontmatter.bannerImage?.alt ?? OPEN_GRAPH.image.alt;
|
|
21
21
|
const robots = frontmatter.robots ?? 'index, follow';
|
|
@@ -5,6 +5,10 @@ import NavigationItem from '@components/NavigationItem.astro';
|
|
|
5
5
|
import { SITE } from '@config';
|
|
6
6
|
import { menu } from '@data/navigation';
|
|
7
7
|
|
|
8
|
+
const accelerator = new Accelerator(SITE);
|
|
9
|
+
const stats = new accelerator.statistics('accelerator/components/Navigation.astro');
|
|
10
|
+
stats.start();
|
|
11
|
+
|
|
8
12
|
// Properties
|
|
9
13
|
type Props = {
|
|
10
14
|
lang: string;
|
|
@@ -15,10 +19,6 @@ const { lang } = Astro.props satisfies Props;
|
|
|
15
19
|
const _ = Lang(lang);
|
|
16
20
|
|
|
17
21
|
// Logic
|
|
18
|
-
const accelerator = new Accelerator(SITE);
|
|
19
|
-
const stats = new accelerator.statistics('accelerator/components/Navigation.astro');
|
|
20
|
-
stats.start();
|
|
21
|
-
|
|
22
22
|
const currentUrl = new URL(Astro.request.url);
|
|
23
23
|
const pages = accelerator.navigation.menu(currentUrl, SITE.subfolder, menu);
|
|
24
24
|
|
|
@@ -4,6 +4,10 @@ import { Translations, Lang } from '@util/Languages';
|
|
|
4
4
|
import { SITE } from '@config';
|
|
5
5
|
import { menu } from '@data/navigation';
|
|
6
6
|
|
|
7
|
+
const accelerator = new Accelerator(SITE);
|
|
8
|
+
const stats = new accelerator.statistics('accelerator/components/NavigationBar.astro');
|
|
9
|
+
stats.start();
|
|
10
|
+
|
|
7
11
|
// Properties
|
|
8
12
|
type Props = {
|
|
9
13
|
lang: string;
|
|
@@ -14,10 +18,6 @@ const { lang } = Astro.props satisfies Props;
|
|
|
14
18
|
const _ = Lang(lang);
|
|
15
19
|
|
|
16
20
|
// Logic
|
|
17
|
-
const accelerator = new Accelerator(SITE);
|
|
18
|
-
const stats = new accelerator.statistics('accelerator/components/NavigationBar.astro');
|
|
19
|
-
stats.start();
|
|
20
|
-
|
|
21
21
|
const currentUrl = new URL(Astro.request.url);
|
|
22
22
|
const pages = accelerator.navigation.menu(currentUrl, SITE.subfolder, menu);
|
|
23
23
|
|
|
@@ -3,6 +3,10 @@ import { Accelerator } from 'astro-accelerator-utils';
|
|
|
3
3
|
import type { NavPage } from 'astro-accelerator-utils/types/NavPage';
|
|
4
4
|
import { SITE } from '@config';
|
|
5
5
|
|
|
6
|
+
const accelerator = new Accelerator(SITE);
|
|
7
|
+
const stats = new accelerator.statistics('accelerator/components/NavigationItem.astro');
|
|
8
|
+
stats.start();
|
|
9
|
+
|
|
6
10
|
// Properties
|
|
7
11
|
type Props = {
|
|
8
12
|
lang: string;
|
|
@@ -11,10 +15,6 @@ type Props = {
|
|
|
11
15
|
const { lang, page } = Astro.props satisfies Props;
|
|
12
16
|
|
|
13
17
|
// Logic
|
|
14
|
-
const accelerator = new Accelerator(SITE);
|
|
15
|
-
const stats = new accelerator.statistics('accelerator/components/NavigationItem.astro');
|
|
16
|
-
stats.start();
|
|
17
|
-
|
|
18
18
|
const linkTitle = (page.title === page.fullTitle)
|
|
19
19
|
? null
|
|
20
20
|
: page.fullTitle;
|
|
@@ -5,6 +5,10 @@ import { SITE } from '@config';
|
|
|
5
5
|
import type { MarkdownInstance, Page } from 'astro';
|
|
6
6
|
import { Translations, Lang } from '@util/Languages';
|
|
7
7
|
|
|
8
|
+
const accelerator = new Accelerator(SITE);
|
|
9
|
+
const stats = new accelerator.statistics('accelerator/components/PagingLinks.astro');
|
|
10
|
+
stats.start();
|
|
11
|
+
|
|
8
12
|
// Properties
|
|
9
13
|
type Props = {
|
|
10
14
|
lang: string;
|
|
@@ -17,10 +21,6 @@ const { lang, page, pageLinks } = Astro.props satisfies Props;
|
|
|
17
21
|
const _ = Lang(lang);
|
|
18
22
|
|
|
19
23
|
// Logic
|
|
20
|
-
const accelerator = new Accelerator(SITE);
|
|
21
|
-
const stats = new accelerator.statistics('accelerator/components/PagingLinks.astro');
|
|
22
|
-
stats.start();
|
|
23
|
-
|
|
24
24
|
stats.stop();
|
|
25
25
|
---
|
|
26
26
|
<nav class="post-paging" aria-label={ _(Translations.aria.paging) }>
|
|
@@ -7,6 +7,10 @@ import { getImageInfo } from '@util/custom-markdown.mjs'
|
|
|
7
7
|
|
|
8
8
|
import AuthorsMini from '@components/AuthorsMini.astro';
|
|
9
9
|
|
|
10
|
+
const accelerator = new Accelerator(SITE);
|
|
11
|
+
const stats = new accelerator.statistics('accelerator/components/Related.astro');
|
|
12
|
+
stats.start();
|
|
13
|
+
|
|
10
14
|
// Properties
|
|
11
15
|
type Props = {
|
|
12
16
|
lang: string;
|
|
@@ -16,10 +20,6 @@ type Props = {
|
|
|
16
20
|
const { lang, frontmatter, headings } = Astro.props satisfies Props;
|
|
17
21
|
|
|
18
22
|
// Logic
|
|
19
|
-
const accelerator = new Accelerator(SITE);
|
|
20
|
-
const stats = new accelerator.statistics('accelerator/components/Related.astro');
|
|
21
|
-
stats.start();
|
|
22
|
-
|
|
23
23
|
let relatedPosts: MarkdownInstance<Record<string, any>>[] = [];
|
|
24
24
|
const parentCagory = (frontmatter.categories ?? [null])[0];
|
|
25
25
|
|
|
@@ -4,6 +4,10 @@ import { Translations, Lang } from '@util/Languages';
|
|
|
4
4
|
import { Accelerator } from 'astro-accelerator-utils';
|
|
5
5
|
import { SITE } from '@config';
|
|
6
6
|
|
|
7
|
+
const accelerator = new Accelerator(SITE);
|
|
8
|
+
const stats = new accelerator.statistics('accelerator/components/SkipLinks.astro');
|
|
9
|
+
stats.start();
|
|
10
|
+
|
|
7
11
|
// Properties
|
|
8
12
|
type Props = {
|
|
9
13
|
lang: string;
|
|
@@ -15,10 +19,7 @@ const { lang } = Astro.props satisfies Props;
|
|
|
15
19
|
// Language
|
|
16
20
|
const _ = Lang(lang);
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
const stats = new accelerator.statistics('accelerator/components/SkipLinks.astro');
|
|
20
|
-
stats.start();
|
|
21
|
-
|
|
22
|
+
// Logic
|
|
22
23
|
stats.stop();
|
|
23
24
|
---
|
|
24
25
|
<nav class="skip-links" aria-label={ _(Translations.aria.skiplinks) } id="site-top">
|
|
@@ -4,6 +4,10 @@ import { SITE } from '@config';
|
|
|
4
4
|
import { Translations, Lang } from '@util/Languages';
|
|
5
5
|
import { Accelerator } from 'astro-accelerator-utils';
|
|
6
6
|
|
|
7
|
+
const accelerator = new Accelerator(SITE);
|
|
8
|
+
const stats = new accelerator.statistics('accelerator/components/TableOfContents.astro');
|
|
9
|
+
stats.start();
|
|
10
|
+
|
|
7
11
|
// Properties
|
|
8
12
|
type Props = {
|
|
9
13
|
lang: string;
|
|
@@ -17,10 +21,6 @@ const { lang, frontmatter, headings, expanded } = Astro.props satisfies Props;
|
|
|
17
21
|
const _ = Lang(lang);
|
|
18
22
|
|
|
19
23
|
// Logic
|
|
20
|
-
const accelerator = new Accelerator(SITE);
|
|
21
|
-
const stats = new accelerator.statistics('accelerator/components/TableOfContents.astro');
|
|
22
|
-
stats.start();
|
|
23
|
-
|
|
24
24
|
let openAttribute = null;
|
|
25
25
|
let openInteraction = null;
|
|
26
26
|
|
|
@@ -4,6 +4,10 @@ import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
|
|
|
4
4
|
import { Translations, Lang } from '@util/Languages';
|
|
5
5
|
import { SITE } from '@config';
|
|
6
6
|
|
|
7
|
+
const accelerator = new Accelerator(SITE);
|
|
8
|
+
const stats = new accelerator.statistics('accelerator/components/Taxonomy.astro');
|
|
9
|
+
stats.start();
|
|
10
|
+
|
|
7
11
|
// Properties
|
|
8
12
|
type Props = {
|
|
9
13
|
lang: string;
|
|
@@ -15,10 +19,6 @@ const { lang, frontmatter } = Astro.props satisfies Props;
|
|
|
15
19
|
const _ = Lang(lang);
|
|
16
20
|
|
|
17
21
|
// Logic
|
|
18
|
-
const accelerator = new Accelerator(SITE);
|
|
19
|
-
const stats = new accelerator.statistics('accelerator/components/Taxonomy.astro');
|
|
20
|
-
stats.start();
|
|
21
|
-
|
|
22
22
|
const categories = frontmatter.categories ?? [];
|
|
23
23
|
const tags = frontmatter.tags ?? [];
|
|
24
24
|
|
|
@@ -4,6 +4,10 @@ import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
|
|
|
4
4
|
import { SITE } from '@config';
|
|
5
5
|
import Redirect from './Redirect.astro';
|
|
6
6
|
|
|
7
|
+
const accelerator = new Accelerator(SITE);
|
|
8
|
+
const stats = new accelerator.statistics('accelerator/layouts/Author.astro');
|
|
9
|
+
stats.start();
|
|
10
|
+
|
|
7
11
|
// Properties
|
|
8
12
|
type Props = {
|
|
9
13
|
frontmatter: Frontmatter
|
|
@@ -13,10 +17,6 @@ const { frontmatter, headings } = Astro.props satisfies Props;
|
|
|
13
17
|
const lang = frontmatter.lang ?? SITE.default.lang;
|
|
14
18
|
|
|
15
19
|
// Logic
|
|
16
|
-
const accelerator = new Accelerator(SITE);
|
|
17
|
-
const stats = new accelerator.statistics('accelerator/layouts/Author.astro');
|
|
18
|
-
stats.start();
|
|
19
|
-
|
|
20
20
|
const redirectFrontmatter = {
|
|
21
21
|
...frontmatter,
|
|
22
22
|
redirect: accelerator.urlFormatter.formatAddress(Astro.request.url) + '1/'
|
|
@@ -15,6 +15,10 @@ import Authors from '@components/Authors.astro';
|
|
|
15
15
|
import Taxonomy from '@components/Taxonomy.astro';
|
|
16
16
|
import Related from '@components/Related.astro';
|
|
17
17
|
|
|
18
|
+
const accelerator = new Accelerator(SITE);
|
|
19
|
+
const stats = new accelerator.statistics('accelerator/layouts/Default.astro');
|
|
20
|
+
stats.start();
|
|
21
|
+
|
|
18
22
|
type Props = {
|
|
19
23
|
frontmatter: Frontmatter
|
|
20
24
|
headings: { depth: number; slug: string; text: string; }[];
|
|
@@ -26,10 +30,6 @@ const lang = frontmatter.lang ?? SITE.default.lang;
|
|
|
26
30
|
const textDirection = frontmatter.dir ?? SITE.default.dir;
|
|
27
31
|
|
|
28
32
|
// Logic
|
|
29
|
-
const accelerator = new Accelerator(SITE);
|
|
30
|
-
const stats = new accelerator.statistics('accelerator/layouts/Default.astro');
|
|
31
|
-
stats.start();
|
|
32
|
-
|
|
33
33
|
const metaImage = frontmatter.bannerImage
|
|
34
34
|
? getImageInfo(frontmatter.bannerImage.src, '', SITE.images.contentSize)
|
|
35
35
|
: null
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
|
|
3
3
|
import { Accelerator } from 'astro-accelerator-utils';
|
|
4
4
|
import { SITE } from '@config';
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
const accelerator = new Accelerator(SITE);
|
|
7
|
+
const stats = new accelerator.statistics('accelerator/layouts/Redirect.astro');
|
|
8
|
+
stats.start();
|
|
6
9
|
|
|
7
10
|
// Properties
|
|
8
11
|
type Props = {
|
|
@@ -13,10 +16,6 @@ const { frontmatter, headings } = Astro.props satisfies Props;
|
|
|
13
16
|
|
|
14
17
|
|
|
15
18
|
// Logic
|
|
16
|
-
const accelerator = new Accelerator(SITE);
|
|
17
|
-
const stats = new accelerator.statistics('accelerator/layouts/Redirect.astro');
|
|
18
|
-
stats.start();
|
|
19
|
-
|
|
20
19
|
const destination = frontmatter.redirect;
|
|
21
20
|
const metaContent = `0; URL=${ destination }`;
|
|
22
21
|
|
|
@@ -5,6 +5,10 @@ import { Translations, Lang } from '@util/Languages';
|
|
|
5
5
|
import Default from './Default.astro';
|
|
6
6
|
import { Accelerator } from 'astro-accelerator-utils';
|
|
7
7
|
|
|
8
|
+
const accelerator = new Accelerator(SITE);
|
|
9
|
+
const stats = new accelerator.statistics('accelerator/layouts/Search.astro');
|
|
10
|
+
stats.start();
|
|
11
|
+
|
|
8
12
|
// Properties
|
|
9
13
|
type Props = {
|
|
10
14
|
frontmatter: Frontmatter
|
|
@@ -17,11 +21,6 @@ const lang = frontmatter.lang ?? SITE.default.lang;
|
|
|
17
21
|
const _ = Lang(lang);
|
|
18
22
|
|
|
19
23
|
// Logic
|
|
20
|
-
// Logic
|
|
21
|
-
const accelerator = new Accelerator(SITE);
|
|
22
|
-
const stats = new accelerator.statistics('accelerator/layouts/Search.astro');
|
|
23
|
-
stats.start();
|
|
24
|
-
|
|
25
24
|
const siteUrl = Astro.site ? Astro.site.href : '';
|
|
26
25
|
|
|
27
26
|
stats.stop();
|
package/src/env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="astro/client" />
|