Skip to content

Commit b976df4

Browse files
committed
1.2.1
1 parent fa2192a commit b976df4

16 files changed

+31
-31
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<img src="https://img.shields.io/badge/Deno-1.8.2-brightgreen.svg?logo=deno" alt="deno" />
1616
</a>
1717
<a href="https://pagic.org">
18-
<img src="https://img.shields.io/badge/Pagic-v1.2.0-orange.svg" alt="pagic" />
18+
<img src="https://img.shields.io/badge/Pagic-v1.2.1-orange.svg" alt="pagic" />
1919
</a>
2020
<a href="https://discord.gg/vn3VvdUycW">
2121
<img src="https://img.shields.io/discord/785366263823335424" alt="discord" />

cloudbaserc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"pagic": {
1111
"use": "@cloudbase/framework-plugin-website",
1212
"inputs": {
13-
"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.0/mod.ts build",
13+
"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",
1414
"outputPath": "pagic.cn/dist"
1515
}
1616
}

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pagic",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "A static site generator powered by Deno + React",
55
"main": "mod.ts",
66
"scripts": {

pagic.org/docs/config.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Additional elements that need to be injected into the HTML `<head>` of the curre
268268
For example, add a custom favicon:
269269

270270
```tsx
271-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
271+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
272272

273273
export default {
274274
head: <link rel="icon" type="image/png" href="/favicon.png" />,
@@ -278,7 +278,7 @@ export default {
278278
If you need to inject multiple elements, you need to wrap it with `<>` tags:
279279

280280
```tsx {5,8}
281-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
281+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
282282

283283
export default {
284284
head: (
@@ -299,7 +299,7 @@ export default {
299299
Navigation configuration, an example is as follows:
300300

301301
```tsx
302-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
302+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
303303

304304
export default {
305305
nav: [
@@ -413,7 +413,7 @@ In the above example:
413413
Ads displayed at the top of the table of content, an example is as follows:
414414
415415
```tsx
416-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
416+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
417417

418418
export default {
419419
tocAd: (

pagic.org/docs/content.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ site/
191191
Its content is:
192192

193193
```tsx
194-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
194+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
195195

196196
const Hello = () => <h1>Hello world</h1>;
197197

@@ -227,7 +227,7 @@ Pagic will not only execute the logic in the `tsx` file when building the page,
227227
For example, we can use `React.setState` to implement a counter page:
228228

229229
```tsx {4,9}
230-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
230+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
231231

232232
const Hello = () => {
233233
const [count, setCount] = React.useState(0);
@@ -263,7 +263,7 @@ site/
263263
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`:
264264

265265
```tsx {3,8}
266-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
266+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
267267

268268
import Count from './_count.tsx';
269269

@@ -282,7 +282,7 @@ export default Hello;
282282
Similar to `md` files, `tsx` files also support frontMatter, which is achieved by exporting a `frontMatter` object:
283283

284284
```tsx {7-9}
285-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
285+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
286286

287287
const Hello = () => <h1>Hello world</h1>;
288288

pagic.org/docs/deployment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Build gh-pages
3131
run: |
3232
deno --version
33-
deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.0/mod.ts
33+
deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.1/mod.ts
3434
pagic build
3535
3636
- name: Deploy gh-pages

pagic.org/docs/layout.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ site/
2020
The content of `_layout.tsx` is as follows:
2121

2222
```tsx
23-
import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
23+
import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
2424

2525
const Layout: PagicLayout = ({ title, content }) => (
2626
<html>
@@ -93,7 +93,7 @@ site/
9393
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`:
9494

9595
```tsx {3,12}
96-
import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
96+
import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
9797

9898
import Sidebar from './_sidebar.tsx';
9999

pagic.org/docs/plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ The `fn` function is the core logic of the plugin. Since its parameter `pagic` i
131131
For example, we can create a plugin that adds a prefix to the `title` of all pages:
132132

133133
```ts {6-15}
134-
import { PagicPlugin } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
134+
import { PagicPlugin } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
135135

136136
const prependTitle: PagicPlugin = {
137137
name: 'prepend_title',

pagic.org/docs/usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ deno install --unstable --allow-read --allow-write --allow-net --allow-run --nam
2626
If you need to install a specific version of Pagic, you can add the version in the URL:
2727

2828
```bash
29-
deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.0/mod.ts
29+
deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.1/mod.ts
3030
```
3131

3232
> 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:

pagic.org/zh-CN/docs/config.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export default {
269269
举个例子,增加一个自定义的 favicon:
270270

271271
```tsx
272-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
272+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
273273

274274
export default {
275275
head: <link rel="icon" type="image/png" href="/favicon.png" />,
@@ -279,7 +279,7 @@ export default {
279279
如果需要引入多个标签,则需要用 `<>` 标签包裹:
280280

281281
```tsx {5,8}
282-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
282+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
283283

284284
export default {
285285
head: (
@@ -300,7 +300,7 @@ export default {
300300
导航栏配置,示例如下:
301301

302302
```tsx
303-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
303+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
304304

305305
export default {
306306
nav: [
@@ -414,7 +414,7 @@ export default {
414414
展示在目录上方的广告,示例如下:
415415
416416
```tsx
417-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
417+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
418418

419419
export default {
420420
tocAd: (

pagic.org/zh-CN/docs/content.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ site/
191191
它的内容是:
192192

193193
```tsx
194-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
194+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
195195

196196
const Hello = () => <h1>Hello world</h1>;
197197

@@ -227,7 +227,7 @@ Pagic 不仅会在渲染页面时执行 `tsx` 文件中的逻辑,而且其中
227227
比如,我们可以使用 `React.setState` 实现一个计数器页面:
228228

229229
```tsx {4,9}
230-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
230+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
231231

232232
const Hello = () => {
233233
const [count, setCount] = React.useState(0);
@@ -263,7 +263,7 @@ site/
263263
在上面的例子中,`hello.tsx` 会被构建为 `dist/hello.html`,而 `_count.tsx` 由于是 `_` 开头,所以不会被构建为页面。这样就可以实现对 `hello.tsx` 的拆分,将 `Count` 组件拆分到 `_count.tsx` 文件中,然后在 `hello.tsx` 中引用即可:
264264

265265
```tsx {3,8}
266-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
266+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
267267

268268
import Count from './_count.tsx';
269269

@@ -282,7 +282,7 @@ export default Hello;
282282
`md` 文件类似,`tsx` 文件也支持头信息,它是通过导出一个 `frontMatter` 对象实现的:
283283

284284
```tsx {7-9}
285-
import { React } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
285+
import { React } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
286286

287287
const Hello = () => <h1>Hello world</h1>;
288288

pagic.org/zh-CN/docs/deployment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Build gh-pages
3131
run: |
3232
deno --version
33-
deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.0/mod.ts
33+
deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.1/mod.ts
3434
pagic build
3535
3636
- name: Deploy gh-pages

pagic.org/zh-CN/docs/layout.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ site/
2020
其中 `_layout.tsx` 的内容如下:
2121

2222
```tsx
23-
import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
23+
import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
2424

2525
const Layout: PagicLayout = ({ title, content }) => (
2626
<html>
@@ -93,7 +93,7 @@ site/
9393
在上面的例子中,`hello.tsx` 会被构建为 `dist/hello.html`,而 `_sidebar.tsx` 由于是 `_` 开头,所以不会被构建为页面。这样就可以实现对 `_layout.tsx` 的拆分,将 `Sidebar` 组件拆分到 `_sidebar.tsx` 文件中,然后在 `_layout.tsx` 中引用即可:
9494

9595
```tsx {3,12}
96-
import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
96+
import { React, PagicLayout } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
9797

9898
import Sidebar from './_sidebar.tsx';
9999

pagic.org/zh-CN/docs/plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ interface PagicPlugin {
131131
比如,我们可以创建一个插件,它给所有页面的 `title` 加一个前缀:
132132

133133
```ts {6-15}
134-
import { PagicPlugin } from 'https://deno.land/x/pagic@v1.2.0/mod.ts';
134+
import { PagicPlugin } from 'https://deno.land/x/pagic@v1.2.1/mod.ts';
135135

136136
const prependTitle: PagicPlugin = {
137137
name: 'prepend_title',

pagic.org/zh-CN/docs/usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ deno install --unstable --allow-read --allow-write --allow-net --allow-run --nam
2828
若需要安装指定版本的 Pagic,则可以在安装的 URL 中加入版本号:
2929

3030
```bash
31-
deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.0/mod.ts
31+
deno install --unstable --allow-read --allow-write --allow-net --allow-run --name=pagic https://deno.land/x/pagic@v1.2.1/mod.ts
3232
```
3333

3434
> Pagic 只会要求必须用到的权限,如果你希望更进一步限制 Pagic 运行时的权限,可以通过指定读写目录的方式加以限制:

0 commit comments

Comments
 (0)