astro-pure 1.2.5 → 1.2.6
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/README.md +2 -0
- package/bun.lockb +0 -0
- package/components/pages/TOCHeading.astro +3 -1
- package/index.ts +4 -2
- package/package.json +3 -2
- package/types/integrations-config.ts +1 -1
- package/utils/index.ts +1 -1
package/README.md
CHANGED
|
@@ -32,6 +32,8 @@ const config = {
|
|
|
32
32
|
export default config
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
UnoCSS is more recommended, and TailwindCSS method will be removed soon.
|
|
36
|
+
|
|
35
37
|
See [User Components](https://astro-pure.js.org/docs/integrations/components) & [Advanced Components](https://astro-pure.js.org/docs/integrations/advanced) to learn how to use.
|
|
36
38
|
|
|
37
39
|
> Some part of Advanced Components may require Astro Integration config.
|
package/bun.lockb
CHANGED
|
Binary file
|
|
@@ -7,8 +7,10 @@ interface Props {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
|
-
heading: { depth, slug, subheadings, text }
|
|
10
|
+
heading: { depth, slug, subheadings, text: rawText }
|
|
11
11
|
} = Astro.props
|
|
12
|
+
// TODO: Temporary fix for the issue with the headings that end with link reference text
|
|
13
|
+
const text = rawText.endsWith('#') ? rawText.slice(0, -1) : rawText
|
|
12
14
|
---
|
|
13
15
|
|
|
14
16
|
<li>
|
package/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { AstroIntegration, RehypePlugins, RemarkPlugins } from 'astro'
|
|
|
7
7
|
import mdx from '@astrojs/mdx'
|
|
8
8
|
import sitemap from '@astrojs/sitemap'
|
|
9
9
|
import rehypeExternalLinks from 'rehype-external-links'
|
|
10
|
+
import UnoCSS from 'unocss/astro'
|
|
10
11
|
|
|
11
12
|
import { remarkAddZoomable, remarkReadingTime } from './plugins/remark-plugins'
|
|
12
13
|
import { vitePluginUserConfig } from './plugins/virtual-user-config'
|
|
@@ -37,6 +38,9 @@ export default function AstroPureIntegration(opts: UserInputConfig): AstroIntegr
|
|
|
37
38
|
if (!allIntegrations.find(({ name }) => name === '@astrojs/mdx')) {
|
|
38
39
|
integrations.push(mdx({ optimize: true }))
|
|
39
40
|
}
|
|
41
|
+
if (!allIntegrations.find(({ name }) => name === 'unocss')) {
|
|
42
|
+
integrations.push(UnoCSS({ injectReset: true }))
|
|
43
|
+
}
|
|
40
44
|
|
|
41
45
|
// Add supported remark plugins based on user config.
|
|
42
46
|
if (userConfig.integ.mediumZoom.enable)
|
|
@@ -58,8 +62,6 @@ export default function AstroPureIntegration(opts: UserInputConfig): AstroIntegr
|
|
|
58
62
|
// integrations.push(starlightDirectivesRestorationIntegration())
|
|
59
63
|
|
|
60
64
|
// Add integrations immediately after Starlight in the config array.
|
|
61
|
-
// e.g. if a user has `integrations: [starlight(), tailwind()]`, then the order will be
|
|
62
|
-
// `[starlight(), expressiveCode(), sitemap(), mdx(), tailwind()]`.
|
|
63
65
|
// This ensures users can add integrations before/after Starlight and we respect that order.
|
|
64
66
|
const selfIndex = config.integrations.findIndex((i) => i.name === 'astro-pure')
|
|
65
67
|
config.integrations.splice(selfIndex + 1, 0, ...integrations)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-pure",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "A simple, clean but powerful blog theme build by astro.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "CWorld",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"hast-util-select": "^6.0.3",
|
|
43
43
|
"node-html-parser": "^7.0.1",
|
|
44
44
|
"pagefind": "^1.2.0",
|
|
45
|
-
"rehype-external-links": "^3.0.0"
|
|
45
|
+
"rehype-external-links": "^3.0.0",
|
|
46
|
+
"unocss": "^65.4.3"
|
|
46
47
|
}
|
|
47
48
|
}
|
package/utils/index.ts
CHANGED