astro-accelerator 0.0.65 → 0.0.66
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/astro.config.mjs +2 -0
- package/package.json +3 -2
- package/src/pages/articles/[page].astro +1 -1
- package/src/pages/articles/feed.xml.ts +1 -1
- package/src/pages/authors/[author]/[page].astro +1 -1
- package/src/pages/category/[category]/[page].astro +1 -1
- package/src/pages/search.json.ts +1 -1
- package/src/pages/sitemap.xml.ts +1 -1
- package/src/pages/tag/[tag]/[page].astro +1 -1
- package/src/themes/accelerator/components/TableOfContents.astro +2 -0
- package/src/themes/accelerator/layouts/Default.astro +2 -0
package/astro.config.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import mdx from '@astrojs/mdx';
|
|
1
2
|
import remarkDirective from 'remark-directive';
|
|
2
3
|
import { defineConfig } from 'astro/config';
|
|
3
4
|
import { attributeMarkdown, wrapTables } from '/src/themes/accelerator/utilities/custom-markdown.mjs';
|
|
@@ -5,6 +6,7 @@ import { attributeMarkdown, wrapTables } from '/src/themes/accelerator/utilities
|
|
|
5
6
|
// https://astro.build/config
|
|
6
7
|
export default defineConfig({
|
|
7
8
|
site: 'https://astro.stevefenton.co.uk',
|
|
9
|
+
integrations: [mdx()],
|
|
8
10
|
markdown: {
|
|
9
11
|
remarkPlugins: [
|
|
10
12
|
remarkDirective,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.66",
|
|
3
3
|
"author": "Steve Fenton",
|
|
4
4
|
"name": "astro-accelerator",
|
|
5
5
|
"description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
"dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@astrojs/mdx": "^0.17.0",
|
|
27
28
|
"@squoosh/lib": "^0.4.0",
|
|
28
29
|
"astro": "^2.0.13",
|
|
29
|
-
"astro-accelerator-utils": "^0.2.
|
|
30
|
+
"astro-accelerator-utils": "^0.2.23",
|
|
30
31
|
"hast-util-from-selector": "^2.0.1",
|
|
31
32
|
"remark-directive": "^2.0.1"
|
|
32
33
|
},
|
|
@@ -37,7 +37,7 @@ const _ = Lang(lang);
|
|
|
37
37
|
const accelerator = new Accelerator(SITE);
|
|
38
38
|
|
|
39
39
|
export async function getData() {
|
|
40
|
-
const sourcePosts = await Astro.glob('./**/*.md') as MarkdownInstance[];
|
|
40
|
+
const sourcePosts = await Astro.glob('./**/*.md', './**/*.mdx') as MarkdownInstance[];
|
|
41
41
|
const posts = sourcePosts
|
|
42
42
|
.filter(PostFiltering.isListable)
|
|
43
43
|
.sort(PostOrdering.sortByPubDateDesc);
|
|
@@ -6,7 +6,7 @@ import { Accelerator, PostFiltering } from 'astro-accelerator-utils';
|
|
|
6
6
|
|
|
7
7
|
async function getData() {
|
|
8
8
|
//@ts-ignore
|
|
9
|
-
const allArticles = import.meta.glob('./**/*.md');
|
|
9
|
+
const allArticles = import.meta.glob('./**/*.md', './**/*.mdx');
|
|
10
10
|
|
|
11
11
|
const accelerator = new Accelerator(SITE);
|
|
12
12
|
|
|
@@ -55,7 +55,7 @@ type AuthorData = {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export async function getData() {
|
|
58
|
-
const sourcePosts = await Astro.glob('../../**/*.md') satisfies MarkdownInstance[];
|
|
58
|
+
const sourcePosts = await Astro.glob(['../../**/*.md', '../../**/*.mdx']) satisfies MarkdownInstance[];
|
|
59
59
|
const data: AuthorData = { posts: [], authors: []};
|
|
60
60
|
|
|
61
61
|
data.posts = sourcePosts
|
|
@@ -47,7 +47,7 @@ type CategoryData = {
|
|
|
47
47
|
|
|
48
48
|
export async function getData() {
|
|
49
49
|
// TODO: Replace with call to Posts.all()
|
|
50
|
-
const sourcePosts = await Astro.glob('../../**/*.md') as MarkdownInstance[];
|
|
50
|
+
const sourcePosts = await Astro.glob(['../../**/*.md', '../../**/*.mdx']) as MarkdownInstance[];
|
|
51
51
|
|
|
52
52
|
const data: CategoryData = { posts: [], categories: []};
|
|
53
53
|
|
package/src/pages/search.json.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { SITE } from '@config';
|
|
|
6
6
|
|
|
7
7
|
const getData = async () => {
|
|
8
8
|
//@ts-ignore
|
|
9
|
-
const allPages = import.meta.glob('./**/*.md');
|
|
9
|
+
const allPages = import.meta.glob(['./**/*.md'), './**/*.mdx')]);
|
|
10
10
|
const items = [];
|
|
11
11
|
|
|
12
12
|
const accelerator = new Accelerator(SITE);
|
package/src/pages/sitemap.xml.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { PostFiltering, Accelerator } from 'astro-accelerator-utils';
|
|
|
6
6
|
|
|
7
7
|
async function getData() {
|
|
8
8
|
//@ts-ignore
|
|
9
|
-
const allPages = import.meta.glob('./**/*.md');
|
|
9
|
+
const allPages = import.meta.glob('./**/*.md', './**/*.mdx');
|
|
10
10
|
|
|
11
11
|
const accelerator = new Accelerator(SITE);
|
|
12
12
|
let pages = [];
|
|
@@ -46,7 +46,7 @@ type CacheData = {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export async function getData() {
|
|
49
|
-
const sourcePosts = await Astro.glob('../../**/*.md') satisfies MarkdownInstance[];
|
|
49
|
+
const sourcePosts = await Astro.glob(['../../**/*.md', '../../**/*.mdx']) satisfies MarkdownInstance[];
|
|
50
50
|
|
|
51
51
|
const data: CacheData = { posts: [], tags: []};
|
|
52
52
|
|