From 6d2aab024b0e14a273ff17b39bb69b758c729a40 Mon Sep 17 00:00:00 2001 From: xcatliu Date: Fri, 3 Mar 2023 15:28:55 +0800 Subject: [PATCH] 1.6.1 --- README.md | 2 +- cloudbaserc.json | 2 +- package.json | 2 +- pagic.org/docs/config.md | 10 +++++----- pagic.org/docs/content.md | 8 ++++---- pagic.org/docs/deployment.md | 2 +- pagic.org/docs/layout.md | 4 ++-- pagic.org/docs/plugins.md | 2 +- pagic.org/docs/usage.md | 2 +- pagic.org/zh-CN/docs/config.md | 10 +++++----- pagic.org/zh-CN/docs/content.md | 8 ++++---- pagic.org/zh-CN/docs/deployment.md | 2 +- pagic.org/zh-CN/docs/layout.md | 4 ++-- pagic.org/zh-CN/docs/plugins.md | 2 +- pagic.org/zh-CN/docs/usage.md | 2 +- 15 files changed, 31 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index a71add7..944f0f4 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ deno - pagic + pagic discord diff --git a/cloudbaserc.json b/cloudbaserc.json index 654fd9e..3ec48c4 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-env --allow-run https://deno.land/x/pagic@v1.6.0/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-env --allow-run https://deno.land/x/pagic@v1.6.1/mod.ts build", "outputPath": "pagic.cn/dist" } } diff --git a/package.json b/package.json index 983b8ad..5493d03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pagic", - "version": "1.6.0", + "version": "1.6.1", "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 e484a44..7cb6471 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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; export default { tocAd: ( @@ -463,7 +463,7 @@ export default { The footer of all pages, an example is as follows: ```tsx -import { React } from 'https://deno.land/x/pagic@v1.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; export default { footer: ( diff --git a/pagic.org/docs/content.md b/pagic.org/docs/content.md index eab169c..c90e88b 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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; const Hello = () =>

Hello world

; diff --git a/pagic.org/docs/deployment.md b/pagic.org/docs/deployment.md index 149a583..bf1bdc9 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-env --allow-run --name=pagic https://deno.land/x/pagic@v1.6.0/mod.ts + deno install --unstable --allow-read --allow-write --allow-net --allow-env --allow-run --name=pagic https://deno.land/x/pagic@v1.6.1/mod.ts pagic build - name: Deploy gh-pages diff --git a/pagic.org/docs/layout.md b/pagic.org/docs/layout.md index e0dfa5f..c123604 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.6.0/mod.ts'; +import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; import Sidebar from './_sidebar.tsx'; diff --git a/pagic.org/docs/plugins.md b/pagic.org/docs/plugins.md index 05fc182..ef06bc7 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.6.0/mod.ts'; +import { PagicPlugin } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; const prependTitle: PagicPlugin = { name: 'prepend_title', diff --git a/pagic.org/docs/usage.md b/pagic.org/docs/usage.md index 3b221ee..f50bafc 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-env --all 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-env --allow-run --name=pagic https://deno.land/x/pagic@v1.6.0/mod.ts +deno install --unstable --allow-read --allow-write --allow-net --allow-env --allow-run --name=pagic https://deno.land/x/pagic@v1.6.1/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 79123af..0dd1733 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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; export default { head: , @@ -279,7 +279,7 @@ export default { 如果需要引入多个标签,则需要用 `<>` 标签包裹: ```tsx {5,8} -import { React } from 'https://deno.land/x/pagic@v1.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; export default { head: ( @@ -300,7 +300,7 @@ export default { 导航栏配置,示例如下: ```tsx -import { React } from 'https://deno.land/x/pagic@v1.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; export default { nav: [ @@ -414,7 +414,7 @@ export default { 展示在目录上方的广告,示例如下: ```tsx -import { React } from 'https://deno.land/x/pagic@v1.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; export default { tocAd: ( @@ -464,7 +464,7 @@ export default { 页面底部,会展示在所有页面里,示例如下: ```tsx -import { React } from 'https://deno.land/x/pagic@v1.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/mod.ts'; export default { footer: ( diff --git a/pagic.org/zh-CN/docs/content.md b/pagic.org/zh-CN/docs/content.md index d9d51d7..cf59e24 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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React } from 'https://deno.land/x/pagic@v1.6.1/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 9a5014a..07ffd7e 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-env --allow-run --name=pagic https://deno.land/x/pagic@v1.6.0/mod.ts + deno install --unstable --allow-read --allow-write --allow-net --allow-env --allow-run --name=pagic https://deno.land/x/pagic@v1.6.1/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 af78abe..56a80d3 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.6.0/mod.ts'; +import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.6.1/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.6.0/mod.ts'; +import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.6.1/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 97c852f..6f8e7c0 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.6.0/mod.ts'; +import { PagicPlugin } from 'https://deno.land/x/pagic@v1.6.1/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 54eaf4a..a1df6d5 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-env --all 若需要安装指定版本的 Pagic,则可以在安装的 URL 中加入版本号: ```bash -deno install --unstable --allow-read --allow-write --allow-net --allow-env --allow-run --name=pagic https://deno.land/x/pagic@v1.6.0/mod.ts +deno install --unstable --allow-read --allow-write --allow-net --allow-env --allow-run --name=pagic https://deno.land/x/pagic@v1.6.1/mod.ts ``` > Pagic 只会要求必须用到的权限,如果你希望更进一步限制 Pagic 运行时的权限,可以通过指定读写目录的方式加以限制: