@astrojs/markdown-remark 0.8.3 → 0.9.0
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/CHANGELOG.md +14 -0
- package/astrojs-markdown-remark-0.9.0.tgz +0 -0
- package/dist/index.d.ts +3 -16
- package/dist/index.js +4 -34
- package/dist/load-plugins.d.ts +1 -2
- package/dist/rehype-collect-headers.d.ts +0 -0
- package/dist/rehype-escape.d.ts +0 -0
- package/dist/rehype-expressions.d.ts +0 -0
- package/dist/rehype-islands.d.ts +0 -0
- package/dist/rehype-jsx.d.ts +0 -0
- package/dist/remark-expressions.d.ts +0 -0
- package/dist/remark-jsx.d.ts +0 -0
- package/dist/remark-prism.d.ts +0 -0
- package/dist/remark-scoped-styles.d.ts +0 -0
- package/dist/remark-shiki.d.ts +1 -28
- package/dist/remark-shiki.js +1 -1
- package/dist/remark-slug.d.ts +0 -0
- package/dist/remark-unwrap.d.ts +0 -0
- package/dist/types.d.ts +20 -9
- package/package.json +4 -2
- package/src/index.ts +6 -22
- package/src/load-plugins.ts +3 -2
- package/src/remark-shiki.ts +2 -29
- package/src/types.ts +31 -9
- package/.turbo/turbo-build.log +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @astrojs/markdown-remark
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`53162534`](https://github.com/withastro/astro/commit/53162534450e160f65b95e7ef1523a106347ca28) Thanks [@FredKSchott](https://github.com/FredKSchott)! - - Removed `renderMarkdownWithFrontmatter` because it wasn't being used
|
|
8
|
+
- All options of `renderMarkdown` are now required — see the exported interface `AstroMarkdownOptions`
|
|
9
|
+
- New types: RemarkPlugin, RehypePlugin and ShikiConfig
|
|
10
|
+
|
|
11
|
+
## 0.8.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#2970](https://github.com/withastro/astro/pull/2970) [`b835e285`](https://github.com/withastro/astro/commit/b835e285defb4f31fc5ac1039c7f607c07f3c00b) Thanks [@JuanM04](https://github.com/JuanM04)! - Improved type checking
|
|
16
|
+
|
|
3
17
|
## 0.8.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export
|
|
3
|
-
/** Internal utility for rendering a full markdown file and extracting Frontmatter data */
|
|
4
|
-
export declare function renderMarkdownWithFrontmatter(contents: string, opts?: MarkdownRenderingOptions | null): Promise<{
|
|
5
|
-
frontmatter: {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
metadata: {
|
|
9
|
-
headers: any[];
|
|
10
|
-
source: string;
|
|
11
|
-
html: string;
|
|
12
|
-
};
|
|
13
|
-
code: string;
|
|
14
|
-
}>;
|
|
1
|
+
import type { MarkdownRenderingOptions } from './types';
|
|
2
|
+
export * from './types.js';
|
|
15
3
|
export declare const DEFAULT_REMARK_PLUGINS: string[];
|
|
16
4
|
export declare const DEFAULT_REHYPE_PLUGINS: string[];
|
|
17
5
|
/** Shared utility for rendering markdown */
|
|
18
|
-
export declare function renderMarkdown(content: string, opts
|
|
6
|
+
export declare function renderMarkdown(content: string, opts: MarkdownRenderingOptions): Promise<{
|
|
19
7
|
metadata: {
|
|
20
8
|
headers: any[];
|
|
21
9
|
source: string;
|
|
@@ -23,4 +11,3 @@ export declare function renderMarkdown(content: string, opts?: MarkdownRendering
|
|
|
23
11
|
};
|
|
24
12
|
code: string;
|
|
25
13
|
}>;
|
|
26
|
-
export default renderMarkdownWithFrontmatter;
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
1
|
import createCollectHeaders from "./rehype-collect-headers.js";
|
|
21
2
|
import scopedStyles from "./remark-scoped-styles.js";
|
|
22
3
|
import { remarkExpressions, loadRemarkExpressions } from "./remark-expressions.js";
|
|
@@ -34,21 +15,13 @@ import markdown from "remark-parse";
|
|
|
34
15
|
import markdownToHtml from "remark-rehype";
|
|
35
16
|
import rehypeStringify from "rehype-stringify";
|
|
36
17
|
import rehypeRaw from "rehype-raw";
|
|
37
|
-
|
|
38
|
-
async function renderMarkdownWithFrontmatter(contents, opts) {
|
|
39
|
-
const { data: frontmatter, content } = matter(contents);
|
|
40
|
-
const value = await renderMarkdown(content, opts);
|
|
41
|
-
return __spreadProps(__spreadValues({}, value), { frontmatter });
|
|
42
|
-
}
|
|
18
|
+
export * from "./types.js";
|
|
43
19
|
const DEFAULT_REMARK_PLUGINS = ["remark-gfm", "remark-smartypants"];
|
|
44
20
|
const DEFAULT_REHYPE_PLUGINS = ["rehype-slug"];
|
|
45
21
|
async function renderMarkdown(content, opts) {
|
|
46
22
|
var _a;
|
|
47
|
-
let {
|
|
48
|
-
const scopedClassName = (_a = opts
|
|
49
|
-
const mode = (opts == null ? void 0 : opts.mode) ?? "mdx";
|
|
50
|
-
const syntaxHighlight = (opts == null ? void 0 : opts.syntaxHighlight) ?? "shiki";
|
|
51
|
-
const shikiConfig = (opts == null ? void 0 : opts.shikiConfig) ?? {};
|
|
23
|
+
let { mode, syntaxHighlight, shikiConfig, remarkPlugins, rehypePlugins } = opts;
|
|
24
|
+
const scopedClassName = (_a = opts.$) == null ? void 0 : _a.scopedClassName;
|
|
52
25
|
const isMDX = mode === "mdx";
|
|
53
26
|
const { headers, rehypeCollectHeaders } = createCollectHeaders();
|
|
54
27
|
await Promise.all([loadRemarkExpressions(), loadRemarkJsx()]);
|
|
@@ -96,11 +69,8 @@ async function renderMarkdown(content, opts) {
|
|
|
96
69
|
code: result.toString()
|
|
97
70
|
};
|
|
98
71
|
}
|
|
99
|
-
var src_default = renderMarkdownWithFrontmatter;
|
|
100
72
|
export {
|
|
101
73
|
DEFAULT_REHYPE_PLUGINS,
|
|
102
74
|
DEFAULT_REMARK_PLUGINS,
|
|
103
|
-
|
|
104
|
-
renderMarkdown,
|
|
105
|
-
renderMarkdownWithFrontmatter
|
|
75
|
+
renderMarkdown
|
|
106
76
|
};
|
package/dist/load-plugins.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import * as unified from 'unified';
|
|
2
|
-
|
|
3
|
-
export declare function loadPlugins(items: Plugin[]): Promise<[unified.Plugin, any?]>[];
|
|
2
|
+
export declare function loadPlugins(items: (string | [string, any] | unified.Plugin<any[], any> | [unified.Plugin<any[], any>, any])[]): Promise<[unified.Plugin, any?]>[];
|
|
File without changes
|
package/dist/rehype-escape.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/rehype-islands.d.ts
CHANGED
|
File without changes
|
package/dist/rehype-jsx.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/remark-jsx.d.ts
CHANGED
|
File without changes
|
package/dist/remark-prism.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/remark-shiki.d.ts
CHANGED
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export interface ShikiConfig {
|
|
3
|
-
/**
|
|
4
|
-
* The languages loaded to Shiki.
|
|
5
|
-
* Supports all languages listed here: https://github.com/shikijs/shiki/blob/main/docs/languages.md#all-languages
|
|
6
|
-
* Instructions for loading a custom language: https://github.com/shikijs/shiki/blob/main/docs/languages.md#supporting-your-own-languages-with-shiki
|
|
7
|
-
*
|
|
8
|
-
* @default []
|
|
9
|
-
*/
|
|
10
|
-
langs?: shiki.ILanguageRegistration[];
|
|
11
|
-
/**
|
|
12
|
-
* The styling theme.
|
|
13
|
-
* Supports all themes listed here: https://github.com/shikijs/shiki/blob/main/docs/themes.md#all-themes
|
|
14
|
-
* Instructions for loading a custom theme: https://github.com/shikijs/shiki/blob/main/docs/themes.md#loading-theme
|
|
15
|
-
*
|
|
16
|
-
* @default "github-dark"
|
|
17
|
-
*/
|
|
18
|
-
theme?: shiki.IThemeRegistration;
|
|
19
|
-
/**
|
|
20
|
-
* Enable word wrapping.
|
|
21
|
-
* - true: enabled.
|
|
22
|
-
* - false: enabled.
|
|
23
|
-
* - null: All overflow styling removed. Code will overflow the element by default.
|
|
24
|
-
*
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
wrap?: boolean | null;
|
|
28
|
-
}
|
|
1
|
+
import type { ShikiConfig } from './types.js';
|
|
29
2
|
declare const remarkShiki: ({ langs, theme, wrap }: ShikiConfig, scopedClassName?: string | null | undefined) => Promise<() => (tree: any) => void>;
|
|
30
3
|
export default remarkShiki;
|
package/dist/remark-shiki.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getHighlighter } from "shiki";
|
|
2
2
|
import { visit } from "unist-util-visit";
|
|
3
3
|
const highlighterCacheAsync = /* @__PURE__ */ new Map();
|
|
4
|
-
const remarkShiki = async ({ langs
|
|
4
|
+
const remarkShiki = async ({ langs, theme, wrap }, scopedClassName) => {
|
|
5
5
|
const cacheID = typeof theme === "string" ? theme : theme.name;
|
|
6
6
|
let highlighterAsync = highlighterCacheAsync.get(cacheID);
|
|
7
7
|
if (!highlighterAsync) {
|
package/dist/remark-slug.d.ts
CHANGED
|
File without changes
|
package/dist/remark-unwrap.d.ts
CHANGED
|
File without changes
|
package/dist/types.d.ts
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import type * as unified from 'unified';
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type * as mdast from 'mdast';
|
|
3
|
+
import type * as hast from 'hast';
|
|
4
|
+
import type { ILanguageRegistration, IThemeRegistration, Theme } from 'shiki';
|
|
5
|
+
export type { Node } from 'unist';
|
|
6
|
+
export declare type RemarkPlugin<PluginParameters extends any[] = any[]> = unified.Plugin<PluginParameters, mdast.Root>;
|
|
7
|
+
export declare type RemarkPlugins = (string | [string, any] | RemarkPlugin | [RemarkPlugin, any])[];
|
|
8
|
+
export declare type RehypePlugin<PluginParameters extends any[] = any[]> = unified.Plugin<PluginParameters, hast.Root>;
|
|
9
|
+
export declare type RehypePlugins = (string | [string, any] | RehypePlugin | [RehypePlugin, any])[];
|
|
10
|
+
export interface ShikiConfig {
|
|
11
|
+
langs: ILanguageRegistration[];
|
|
12
|
+
theme: Theme | IThemeRegistration;
|
|
13
|
+
wrap: boolean | null;
|
|
14
|
+
}
|
|
5
15
|
export interface AstroMarkdownOptions {
|
|
6
|
-
mode
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
mode: 'md' | 'mdx';
|
|
17
|
+
drafts: boolean;
|
|
18
|
+
syntaxHighlight: 'shiki' | 'prism' | false;
|
|
19
|
+
shikiConfig: ShikiConfig;
|
|
20
|
+
remarkPlugins: RemarkPlugins;
|
|
21
|
+
rehypePlugins: RehypePlugins;
|
|
11
22
|
}
|
|
12
|
-
export interface MarkdownRenderingOptions extends
|
|
23
|
+
export interface MarkdownRenderingOptions extends AstroMarkdownOptions {
|
|
13
24
|
/** @internal */
|
|
14
25
|
$?: {
|
|
15
26
|
scopedClassName: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/markdown-remark",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "withastro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"@astrojs/prism": "^0.4.1",
|
|
27
27
|
"assert": "^2.0.0",
|
|
28
28
|
"github-slugger": "^1.4.0",
|
|
29
|
-
"gray-matter": "^4.0.3",
|
|
30
29
|
"mdast-util-mdx-expression": "^1.2.0",
|
|
31
30
|
"mdast-util-mdx-jsx": "^1.2.0",
|
|
32
31
|
"mdast-util-to-string": "^3.1.0",
|
|
@@ -47,7 +46,10 @@
|
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@types/github-slugger": "^1.3.0",
|
|
49
|
+
"@types/hast": "^2.3.4",
|
|
50
|
+
"@types/mdast": "^3.0.10",
|
|
50
51
|
"@types/prismjs": "^1.26.0",
|
|
52
|
+
"@types/unist": "^2.0.6",
|
|
51
53
|
"astro-scripts": "workspace:*"
|
|
52
54
|
}
|
|
53
55
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MarkdownRenderingOptions } from './types';
|
|
2
2
|
|
|
3
3
|
import createCollectHeaders from './rehype-collect-headers.js';
|
|
4
4
|
import scopedStyles from './remark-scoped-styles.js';
|
|
@@ -18,31 +18,17 @@ import markdown from 'remark-parse';
|
|
|
18
18
|
import markdownToHtml from 'remark-rehype';
|
|
19
19
|
import rehypeStringify from 'rehype-stringify';
|
|
20
20
|
import rehypeRaw from 'rehype-raw';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export { AstroMarkdownOptions, MarkdownRenderingOptions, ShikiConfig, Plugin };
|
|
24
|
-
|
|
25
|
-
/** Internal utility for rendering a full markdown file and extracting Frontmatter data */
|
|
26
|
-
export async function renderMarkdownWithFrontmatter(
|
|
27
|
-
contents: string,
|
|
28
|
-
opts?: MarkdownRenderingOptions | null
|
|
29
|
-
) {
|
|
30
|
-
const { data: frontmatter, content } = matter(contents);
|
|
31
|
-
const value = await renderMarkdown(content, opts);
|
|
32
|
-
return { ...value, frontmatter };
|
|
33
|
-
}
|
|
21
|
+
|
|
22
|
+
export * from './types.js';
|
|
34
23
|
|
|
35
24
|
export const DEFAULT_REMARK_PLUGINS = ['remark-gfm', 'remark-smartypants'];
|
|
36
25
|
|
|
37
26
|
export const DEFAULT_REHYPE_PLUGINS = ['rehype-slug'];
|
|
38
27
|
|
|
39
28
|
/** Shared utility for rendering markdown */
|
|
40
|
-
export async function renderMarkdown(content: string, opts
|
|
41
|
-
let {
|
|
42
|
-
const scopedClassName = opts
|
|
43
|
-
const mode = opts?.mode ?? 'mdx';
|
|
44
|
-
const syntaxHighlight = opts?.syntaxHighlight ?? 'shiki';
|
|
45
|
-
const shikiConfig = opts?.shikiConfig ?? {};
|
|
29
|
+
export async function renderMarkdown(content: string, opts: MarkdownRenderingOptions) {
|
|
30
|
+
let { mode, syntaxHighlight, shikiConfig, remarkPlugins, rehypePlugins } = opts;
|
|
31
|
+
const scopedClassName = opts.$?.scopedClassName;
|
|
46
32
|
const isMDX = mode === 'mdx';
|
|
47
33
|
const { headers, rehypeCollectHeaders } = createCollectHeaders();
|
|
48
34
|
|
|
@@ -111,5 +97,3 @@ export async function renderMarkdown(content: string, opts?: MarkdownRenderingOp
|
|
|
111
97
|
code: result.toString(),
|
|
112
98
|
};
|
|
113
99
|
}
|
|
114
|
-
|
|
115
|
-
export default renderMarkdownWithFrontmatter;
|
package/src/load-plugins.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as unified from 'unified';
|
|
2
|
-
import type { Plugin } from './types';
|
|
3
2
|
|
|
4
3
|
async function importPlugin(p: string | unified.Plugin): Promise<unified.Plugin> {
|
|
5
4
|
if (typeof p === 'string') {
|
|
@@ -10,7 +9,9 @@ async function importPlugin(p: string | unified.Plugin): Promise<unified.Plugin>
|
|
|
10
9
|
return p;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export function loadPlugins(
|
|
12
|
+
export function loadPlugins(
|
|
13
|
+
items: (string | [string, any] | unified.Plugin<any[], any> | [unified.Plugin<any[], any>, any])[]
|
|
14
|
+
): Promise<[unified.Plugin, any?]>[] {
|
|
14
15
|
return items.map((p) => {
|
|
15
16
|
return new Promise((resolve, reject) => {
|
|
16
17
|
if (Array.isArray(p)) {
|
package/src/remark-shiki.ts
CHANGED
|
@@ -1,34 +1,7 @@
|
|
|
1
1
|
import type * as shiki from 'shiki';
|
|
2
2
|
import { getHighlighter } from 'shiki';
|
|
3
3
|
import { visit } from 'unist-util-visit';
|
|
4
|
-
|
|
5
|
-
export interface ShikiConfig {
|
|
6
|
-
/**
|
|
7
|
-
* The languages loaded to Shiki.
|
|
8
|
-
* Supports all languages listed here: https://github.com/shikijs/shiki/blob/main/docs/languages.md#all-languages
|
|
9
|
-
* Instructions for loading a custom language: https://github.com/shikijs/shiki/blob/main/docs/languages.md#supporting-your-own-languages-with-shiki
|
|
10
|
-
*
|
|
11
|
-
* @default []
|
|
12
|
-
*/
|
|
13
|
-
langs?: shiki.ILanguageRegistration[];
|
|
14
|
-
/**
|
|
15
|
-
* The styling theme.
|
|
16
|
-
* Supports all themes listed here: https://github.com/shikijs/shiki/blob/main/docs/themes.md#all-themes
|
|
17
|
-
* Instructions for loading a custom theme: https://github.com/shikijs/shiki/blob/main/docs/themes.md#loading-theme
|
|
18
|
-
*
|
|
19
|
-
* @default "github-dark"
|
|
20
|
-
*/
|
|
21
|
-
theme?: shiki.IThemeRegistration;
|
|
22
|
-
/**
|
|
23
|
-
* Enable word wrapping.
|
|
24
|
-
* - true: enabled.
|
|
25
|
-
* - false: enabled.
|
|
26
|
-
* - null: All overflow styling removed. Code will overflow the element by default.
|
|
27
|
-
*
|
|
28
|
-
* @default false
|
|
29
|
-
*/
|
|
30
|
-
wrap?: boolean | null;
|
|
31
|
-
}
|
|
4
|
+
import type { ShikiConfig } from './types.js';
|
|
32
5
|
|
|
33
6
|
/**
|
|
34
7
|
* getHighlighter() is the most expensive step of Shiki. Instead of calling it on every page,
|
|
@@ -38,7 +11,7 @@ export interface ShikiConfig {
|
|
|
38
11
|
const highlighterCacheAsync = new Map<string, Promise<shiki.Highlighter>>();
|
|
39
12
|
|
|
40
13
|
const remarkShiki = async (
|
|
41
|
-
{ langs
|
|
14
|
+
{ langs, theme, wrap }: ShikiConfig,
|
|
42
15
|
scopedClassName?: string | null
|
|
43
16
|
) => {
|
|
44
17
|
const cacheID: string = typeof theme === 'string' ? theme : theme.name;
|
package/src/types.ts
CHANGED
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
import type * as unified from 'unified';
|
|
2
|
-
import type
|
|
3
|
-
|
|
2
|
+
import type * as mdast from 'mdast';
|
|
3
|
+
import type * as hast from 'hast';
|
|
4
|
+
import type { ILanguageRegistration, IThemeRegistration, Theme } from 'shiki';
|
|
4
5
|
|
|
5
|
-
export type
|
|
6
|
+
export type { Node } from 'unist';
|
|
7
|
+
|
|
8
|
+
export type RemarkPlugin<PluginParameters extends any[] = any[]> = unified.Plugin<
|
|
9
|
+
PluginParameters,
|
|
10
|
+
mdast.Root
|
|
11
|
+
>;
|
|
12
|
+
|
|
13
|
+
export type RemarkPlugins = (string | [string, any] | RemarkPlugin | [RemarkPlugin, any])[];
|
|
14
|
+
|
|
15
|
+
export type RehypePlugin<PluginParameters extends any[] = any[]> = unified.Plugin<
|
|
16
|
+
PluginParameters,
|
|
17
|
+
hast.Root
|
|
18
|
+
>;
|
|
19
|
+
|
|
20
|
+
export type RehypePlugins = (string | [string, any] | RehypePlugin | [RehypePlugin, any])[];
|
|
21
|
+
|
|
22
|
+
export interface ShikiConfig {
|
|
23
|
+
langs: ILanguageRegistration[];
|
|
24
|
+
theme: Theme | IThemeRegistration;
|
|
25
|
+
wrap: boolean | null;
|
|
26
|
+
}
|
|
6
27
|
|
|
7
28
|
export interface AstroMarkdownOptions {
|
|
8
|
-
mode
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
29
|
+
mode: 'md' | 'mdx';
|
|
30
|
+
drafts: boolean;
|
|
31
|
+
syntaxHighlight: 'shiki' | 'prism' | false;
|
|
32
|
+
shikiConfig: ShikiConfig;
|
|
33
|
+
remarkPlugins: RemarkPlugins;
|
|
34
|
+
rehypePlugins: RehypePlugins;
|
|
13
35
|
}
|
|
14
36
|
|
|
15
|
-
export interface MarkdownRenderingOptions extends
|
|
37
|
+
export interface MarkdownRenderingOptions extends AstroMarkdownOptions {
|
|
16
38
|
/** @internal */
|
|
17
39
|
$?: {
|
|
18
40
|
scopedClassName: string | null;
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
[33m@astrojs/markdown-remark:build: [0mcache hit, replaying output [2m5817ab166c77bc86[0m
|
|
2
|
-
[33m@astrojs/markdown-remark:build: [0m
|
|
3
|
-
[33m@astrojs/markdown-remark:build: [0m> @astrojs/markdown-remark@0.8.1 build /Users/fks/Code/astro/packages/markdown/remark
|
|
4
|
-
[33m@astrojs/markdown-remark:build: [0m> astro-scripts build "src/**/*.ts" && tsc -p tsconfig.json
|
|
5
|
-
[33m@astrojs/markdown-remark:build: [0m
|