diff --git a/README.md b/README.md
index d62843e..f2af2b3 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
-
+
diff --git a/cloudbaserc.json b/cloudbaserc.json
index 019eeea..ec76ad7 100644
--- a/cloudbaserc.json
+++ b/cloudbaserc.json
@@ -10,7 +10,7 @@
"pagic": {
"use": "@cloudbase/framework-plugin-website",
"inputs": {
- "buildCommand": "cd pagic.cn && deno run --unstable --allow-read --allow-write build.ts && deno run --unstable --allow-read --allow-write --allow-net --allow-run https://deno.land/x/pagic@v1.2.1/mod.ts build",
+ "buildCommand": "cd pagic.cn && deno run --unstable --allow-read --allow-write build.ts && deno run --unstable --allow-read --allow-write --allow-net --allow-run https://deno.land/x/pagic@v1.3.0/mod.ts build",
"outputPath": "pagic.cn/dist"
}
}
diff --git a/package-lock.json b/package-lock.json
index 0a3150f..ce5b67e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,11 +1,11 @@
{
"name": "pagic",
- "version": "1.2.1",
+ "version": "1.3.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
- "version": "1.2.1",
+ "version": "1.3.0",
"license": "MIT",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.22.1",
diff --git a/package.json b/package.json
index 18ebf8a..259ab17 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pagic",
- "version": "1.2.1",
+ "version": "1.3.0",
"description": "A static site generator powered by Deno + React",
"main": "mod.ts",
"scripts": {
diff --git a/pagic.org/docs/config.md b/pagic.org/docs/config.md
index c242d18..8970237 100644
--- a/pagic.org/docs/config.md
+++ b/pagic.org/docs/config.md
@@ -268,7 +268,7 @@ Additional elements that need to be injected into the HTML `` of the curre
For example, add a custom favicon:
```tsx
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
export default {
head: ,
@@ -278,7 +278,7 @@ export default {
If you need to inject multiple elements, you need to wrap it with `<>` tags:
```tsx {5,8}
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
export default {
head: (
@@ -299,7 +299,7 @@ export default {
Navigation configuration, an example is as follows:
```tsx
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
export default {
nav: [
@@ -413,7 +413,7 @@ In the above example:
Ads displayed at the top of the table of content, an example is as follows:
```tsx
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
export default {
tocAd: (
diff --git a/pagic.org/docs/content.md b/pagic.org/docs/content.md
index c802054..c35d2ab 100644
--- a/pagic.org/docs/content.md
+++ b/pagic.org/docs/content.md
@@ -191,7 +191,7 @@ site/
Its content is:
```tsx
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const Hello = () => Hello world
;
@@ -227,7 +227,7 @@ Pagic will not only execute the logic in the `tsx` file when building the page,
For example, we can use `React.setState` to implement a counter page:
```tsx {4,9}
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const Hello = () => {
const [count, setCount] = React.useState(0);
@@ -263,7 +263,7 @@ site/
In the above example, `hello.tsx` will be constructed as `dist/hello.html`, and `_count.tsx` will not be constructed as a page because it starts with `_`. In this way, we can split the `Count` component into the `_count.tsx` file, and then import it in `hello.tsx`:
```tsx {3,8}
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
import Count from './_count.tsx';
@@ -282,7 +282,7 @@ export default Hello;
Similar to `md` files, `tsx` files also support frontMatter, which is achieved by exporting a `frontMatter` object:
```tsx {7-9}
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const Hello = () => Hello world
;
diff --git a/pagic.org/docs/deployment.md b/pagic.org/docs/deployment.md
index 5c91f66..9e0c2eb 100644
--- a/pagic.org/docs/deployment.md
+++ b/pagic.org/docs/deployment.md
@@ -30,7 +30,7 @@ jobs:
- name: Build gh-pages
run: |
deno --version
- deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.1/mod.ts
+ deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.3.0/mod.ts
pagic build
- name: Deploy gh-pages
diff --git a/pagic.org/docs/layout.md b/pagic.org/docs/layout.md
index 74ad935..bad1a5b 100644
--- a/pagic.org/docs/layout.md
+++ b/pagic.org/docs/layout.md
@@ -20,7 +20,7 @@ site/
The content of `_layout.tsx` is as follows:
```tsx
-import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const Layout: PagicLayout = ({ title, content }) => (
@@ -93,7 +93,7 @@ site/
In the above example, `hello.tsx` will be constructed as `dist/hello.html`, and `_sidebar.tsx` will not be constructed as a page because it starts with `_`. In this way, you can split the `Sidebar` component into the `_sidebar.tsx` file, and then import it in `_layout.tsx`:
```tsx {3,12}
-import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
import Sidebar from './_sidebar.tsx';
diff --git a/pagic.org/docs/plugins.md b/pagic.org/docs/plugins.md
index 76f1607..addf185 100644
--- a/pagic.org/docs/plugins.md
+++ b/pagic.org/docs/plugins.md
@@ -131,7 +131,7 @@ The `fn` function is the core logic of the plugin. Since its parameter `pagic` i
For example, we can create a plugin that adds a prefix to the `title` of all pages:
```ts {6-15}
-import { PagicPlugin } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { PagicPlugin } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const prependTitle: PagicPlugin = {
name: 'prepend_title',
diff --git a/pagic.org/docs/usage.md b/pagic.org/docs/usage.md
index 3a2c51f..969fc1d 100644
--- a/pagic.org/docs/usage.md
+++ b/pagic.org/docs/usage.md
@@ -26,7 +26,7 @@ deno install --unstable --allow-read --allow-write --allow-net --allow-run --nam
If you need to install a specific version of Pagic, you can add the version in the URL:
```bash
-deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.1/mod.ts
+deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.3.0/mod.ts
```
> Pagic will only require the necessary permissions. If you want to further restrict Pagic's runtime permissions, you can limit it by specifying the read and write directories:
diff --git a/pagic.org/zh-CN/docs/config.md b/pagic.org/zh-CN/docs/config.md
index 781fb83..7bb028f 100644
--- a/pagic.org/zh-CN/docs/config.md
+++ b/pagic.org/zh-CN/docs/config.md
@@ -269,7 +269,7 @@ export default {
举个例子,增加一个自定义的 favicon:
```tsx
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
export default {
head: ,
@@ -279,7 +279,7 @@ export default {
如果需要引入多个标签,则需要用 `<>` 标签包裹:
```tsx {5,8}
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
export default {
head: (
@@ -300,7 +300,7 @@ export default {
导航栏配置,示例如下:
```tsx
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
export default {
nav: [
@@ -414,7 +414,7 @@ export default {
展示在目录上方的广告,示例如下:
```tsx
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
export default {
tocAd: (
diff --git a/pagic.org/zh-CN/docs/content.md b/pagic.org/zh-CN/docs/content.md
index 2772f88..e22642f 100644
--- a/pagic.org/zh-CN/docs/content.md
+++ b/pagic.org/zh-CN/docs/content.md
@@ -191,7 +191,7 @@ site/
它的内容是:
```tsx
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const Hello = () => Hello world
;
@@ -227,7 +227,7 @@ Pagic 不仅会在渲染页面时执行 `tsx` 文件中的逻辑,而且其中
比如,我们可以使用 `React.setState` 实现一个计数器页面:
```tsx {4,9}
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const Hello = () => {
const [count, setCount] = React.useState(0);
@@ -263,7 +263,7 @@ site/
在上面的例子中,`hello.tsx` 会被构建为 `dist/hello.html`,而 `_count.tsx` 由于是 `_` 开头,所以不会被构建为页面。这样就可以实现对 `hello.tsx` 的拆分,将 `Count` 组件拆分到 `_count.tsx` 文件中,然后在 `hello.tsx` 中引用即可:
```tsx {3,8}
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
import Count from './_count.tsx';
@@ -282,7 +282,7 @@ export default Hello;
与 `md` 文件类似,`tsx` 文件也支持头信息,它是通过导出一个 `frontMatter` 对象实现的:
```tsx {7-9}
-import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const Hello = () => Hello world
;
diff --git a/pagic.org/zh-CN/docs/deployment.md b/pagic.org/zh-CN/docs/deployment.md
index d3c495b..ca2a92c 100644
--- a/pagic.org/zh-CN/docs/deployment.md
+++ b/pagic.org/zh-CN/docs/deployment.md
@@ -30,7 +30,7 @@ jobs:
- name: Build gh-pages
run: |
deno --version
- deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.1/mod.ts
+ deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.3.0/mod.ts
pagic build
- name: Deploy gh-pages
diff --git a/pagic.org/zh-CN/docs/layout.md b/pagic.org/zh-CN/docs/layout.md
index 954cdc2..626b9e1 100644
--- a/pagic.org/zh-CN/docs/layout.md
+++ b/pagic.org/zh-CN/docs/layout.md
@@ -20,7 +20,7 @@ site/
其中 `_layout.tsx` 的内容如下:
```tsx
-import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const Layout: PagicLayout = ({ title, content }) => (
@@ -93,7 +93,7 @@ site/
在上面的例子中,`hello.tsx` 会被构建为 `dist/hello.html`,而 `_sidebar.tsx` 由于是 `_` 开头,所以不会被构建为页面。这样就可以实现对 `_layout.tsx` 的拆分,将 `Sidebar` 组件拆分到 `_sidebar.tsx` 文件中,然后在 `_layout.tsx` 中引用即可:
```tsx {3,12}
-import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
import Sidebar from './_sidebar.tsx';
diff --git a/pagic.org/zh-CN/docs/plugins.md b/pagic.org/zh-CN/docs/plugins.md
index a1a3dbd..d59a56a 100644
--- a/pagic.org/zh-CN/docs/plugins.md
+++ b/pagic.org/zh-CN/docs/plugins.md
@@ -131,7 +131,7 @@ interface PagicPlugin {
比如,我们可以创建一个插件,它给所有页面的 `title` 加一个前缀:
```ts {6-15}
-import { PagicPlugin } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
+import { PagicPlugin } from 'https://deno.land/x/pagic@v1.3.0/mod.ts';
const prependTitle: PagicPlugin = {
name: 'prepend_title',
diff --git a/pagic.org/zh-CN/docs/usage.md b/pagic.org/zh-CN/docs/usage.md
index 14c402c..391b084 100644
--- a/pagic.org/zh-CN/docs/usage.md
+++ b/pagic.org/zh-CN/docs/usage.md
@@ -28,7 +28,7 @@ deno install --unstable --allow-read --allow-write --allow-net --allow-run --nam
若需要安装指定版本的 Pagic,则可以在安装的 URL 中加入版本号:
```bash
-deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.1/mod.ts
+deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.3.0/mod.ts
```
> Pagic 只会要求必须用到的权限,如果你希望更进一步限制 Pagic 运行时的权限,可以通过指定读写目录的方式加以限制: