adminforth 1.0.63 → 1.0.65
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/dist/index.js +18 -18
- package/dist/spa/spa/src/views/ListView.vue +2 -5
- package/dist/spa/spa/src/views/ShowView.vue +0 -1
- package/documentation/README.md +41 -0
- package/documentation/babel.config.js +3 -0
- package/documentation/blog/2019-05-28-first-blog-post.md +12 -0
- package/documentation/blog/2019-05-29-long-blog-post.md +44 -0
- package/documentation/blog/2021-08-01-mdx-blog-post.mdx +20 -0
- package/documentation/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
- package/documentation/blog/2021-08-26-welcome/index.md +25 -0
- package/documentation/blog/authors.yml +17 -0
- package/documentation/blog/tags.yml +16 -0
- package/documentation/docusaurus.config.ts +159 -0
- package/documentation/package-lock.json +14655 -0
- package/documentation/package.json +51 -0
- package/documentation/sidebars.ts +51 -0
- package/documentation/src/components/HomepageFeatures/index.tsx +70 -0
- package/documentation/src/components/HomepageFeatures/styles.module.css +11 -0
- package/documentation/src/css/custom.css +30 -0
- package/documentation/src/pages/index.module.css +23 -0
- package/documentation/src/pages/index.tsx +43 -0
- package/documentation/src/pages/markdown-page.md +7 -0
- package/documentation/static/.nojekyll +0 -0
- package/documentation/static/img/docusaurus-social-card.jpg +0 -0
- package/documentation/static/img/docusaurus.png +0 -0
- package/documentation/static/img/favicon.ico +0 -0
- package/documentation/static/img/logo.svg +1 -0
- package/documentation/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/documentation/static/img/undraw_docusaurus_react.svg +170 -0
- package/documentation/static/img/undraw_docusaurus_tree.svg +40 -0
- package/documentation/typedoc-plugin.mjs +11 -0
- package/index.ts +2 -2
- package/package.json +2 -3
- package/spa/src/views/ListView.vue +2 -5
- package/spa/src/views/ShowView.vue +0 -1
- package/tsconfig.json +1 -1
- package/types/AdminForthConfig.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -590,7 +590,7 @@ class AdminForth {
|
|
|
590
590
|
method: 'POST',
|
|
591
591
|
path: '/get_resource_foreign_data',
|
|
592
592
|
handler: (_p) => __awaiter(this, [_p], void 0, function* ({ body, adminUser }) {
|
|
593
|
-
var _q, _r;
|
|
593
|
+
var _q, _r, _s, _t;
|
|
594
594
|
const { resourceId, column } = body;
|
|
595
595
|
if (!this.statuses.dbDiscover) {
|
|
596
596
|
return { error: 'Database discovery not started' };
|
|
@@ -611,7 +611,7 @@ class AdminForth {
|
|
|
611
611
|
}
|
|
612
612
|
const targetResourceId = columnConfig.foreignResource.resourceId;
|
|
613
613
|
const targetResource = this.config.resources.find((res) => res.resourceId == targetResourceId);
|
|
614
|
-
for (const hook of getFunctionList((_q = columnConfig.foreignResource.hooks) === null || _q === void 0 ? void 0 : _q.beforeDatasourceRequest)) {
|
|
614
|
+
for (const hook of getFunctionList((_r = (_q = columnConfig.foreignResource.hooks) === null || _q === void 0 ? void 0 : _q.dropdownList) === null || _r === void 0 ? void 0 : _r.beforeDatasourceRequest)) {
|
|
615
615
|
const resp = yield hook({ query: body, adminUser });
|
|
616
616
|
if (!resp || (!resp.ok && !resp.error)) {
|
|
617
617
|
throw new Error(`Hook must return object with {ok: true} or { error: 'Error' } `);
|
|
@@ -640,7 +640,7 @@ class AdminForth {
|
|
|
640
640
|
const response = {
|
|
641
641
|
items
|
|
642
642
|
};
|
|
643
|
-
for (const hook of getFunctionList((
|
|
643
|
+
for (const hook of getFunctionList((_t = (_s = columnConfig.foreignResource.hooks) === null || _s === void 0 ? void 0 : _s.dropdownList) === null || _t === void 0 ? void 0 : _t.afterDatasourceResponse)) {
|
|
644
644
|
const resp = yield hook({ response, adminUser });
|
|
645
645
|
if (!resp || (!resp.ok && !resp.error)) {
|
|
646
646
|
throw new Error(`Hook must return object with {ok: true} or { error: 'Error' } `);
|
|
@@ -655,7 +655,7 @@ class AdminForth {
|
|
|
655
655
|
server.endpoint({
|
|
656
656
|
method: 'POST',
|
|
657
657
|
path: '/get_min_max_for_columns',
|
|
658
|
-
handler: (
|
|
658
|
+
handler: (_u) => __awaiter(this, [_u], void 0, function* ({ body }) {
|
|
659
659
|
const { resourceId } = body;
|
|
660
660
|
if (!this.statuses.dbDiscover) {
|
|
661
661
|
return { error: 'Database discovery not started' };
|
|
@@ -684,8 +684,8 @@ class AdminForth {
|
|
|
684
684
|
server.endpoint({
|
|
685
685
|
method: 'POST',
|
|
686
686
|
path: '/create_record',
|
|
687
|
-
handler: (
|
|
688
|
-
var
|
|
687
|
+
handler: (_v) => __awaiter(this, [_v], void 0, function* ({ body, adminUser }) {
|
|
688
|
+
var _w, _x, _y, _z, _0;
|
|
689
689
|
console.log('create_record', body, this.config.resources);
|
|
690
690
|
const resource = this.config.resources.find((res) => res.resourceId == body['resourceId']);
|
|
691
691
|
if (!resource) {
|
|
@@ -693,7 +693,7 @@ class AdminForth {
|
|
|
693
693
|
}
|
|
694
694
|
const record = body['record'];
|
|
695
695
|
// execute hook if needed
|
|
696
|
-
for (const hook of getFunctionList((
|
|
696
|
+
for (const hook of getFunctionList((_x = (_w = resource.hooks) === null || _w === void 0 ? void 0 : _w.create) === null || _x === void 0 ? void 0 : _x.beforeSave)) {
|
|
697
697
|
const resp = yield hook({ resource, record, adminUser });
|
|
698
698
|
if (!resp || (!resp.ok && !resp.error)) {
|
|
699
699
|
throw new Error(`Hook beforeSave must return object with {ok: true} or { error: 'Error' } `);
|
|
@@ -710,7 +710,7 @@ class AdminForth {
|
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
if (((
|
|
713
|
+
if (((_y = column.required) === null || _y === void 0 ? void 0 : _y.create) && body['record'][column.name] === undefined) {
|
|
714
714
|
return { error: `Column '${column.name}' is required` };
|
|
715
715
|
}
|
|
716
716
|
if (column.isUnique) {
|
|
@@ -735,7 +735,7 @@ class AdminForth {
|
|
|
735
735
|
const connector = this.connectors[resource.dataSource];
|
|
736
736
|
yield connector.createRecord({ resource, record });
|
|
737
737
|
// execute hook if needed
|
|
738
|
-
for (const hook of getFunctionList((
|
|
738
|
+
for (const hook of getFunctionList((_0 = (_z = resource.hooks) === null || _z === void 0 ? void 0 : _z.create) === null || _0 === void 0 ? void 0 : _0.afterSave)) {
|
|
739
739
|
const resp = yield hook({ resource, record, adminUser });
|
|
740
740
|
if (!resp || (!resp.ok && !resp.error)) {
|
|
741
741
|
throw new Error(`Hook afterSave must return object with {ok: true} or { error: 'Error' } `);
|
|
@@ -752,8 +752,8 @@ class AdminForth {
|
|
|
752
752
|
server.endpoint({
|
|
753
753
|
method: 'POST',
|
|
754
754
|
path: '/update_record',
|
|
755
|
-
handler: (
|
|
756
|
-
var
|
|
755
|
+
handler: (_1) => __awaiter(this, [_1], void 0, function* ({ body, adminUser }) {
|
|
756
|
+
var _2, _3, _4, _5;
|
|
757
757
|
const resource = this.config.resources.find((res) => res.resourceId == body['resourceId']);
|
|
758
758
|
if (!resource) {
|
|
759
759
|
return { error: `Resource '${body['resourceId']}' not found` };
|
|
@@ -767,7 +767,7 @@ class AdminForth {
|
|
|
767
767
|
}
|
|
768
768
|
const record = body['record'];
|
|
769
769
|
// execute hook if needed
|
|
770
|
-
for (const hook of getFunctionList((
|
|
770
|
+
for (const hook of getFunctionList((_3 = (_2 = resource.hooks) === null || _2 === void 0 ? void 0 : _2.edit) === null || _3 === void 0 ? void 0 : _3.beforeSave)) {
|
|
771
771
|
const resp = yield hook({ resource, record, adminUser });
|
|
772
772
|
if (!resp || (!resp.ok && !resp.error)) {
|
|
773
773
|
throw new Error(`Hook beforeSave must return object with {ok: true} or { error: 'Error' } `);
|
|
@@ -793,7 +793,7 @@ class AdminForth {
|
|
|
793
793
|
yield connector.updateRecord({ resource, recordId, record, newValues });
|
|
794
794
|
}
|
|
795
795
|
// execute hook if needed
|
|
796
|
-
for (const hook of getFunctionList((
|
|
796
|
+
for (const hook of getFunctionList((_5 = (_4 = resource.hooks) === null || _4 === void 0 ? void 0 : _4.edit) === null || _5 === void 0 ? void 0 : _5.afterSave)) {
|
|
797
797
|
const resp = yield hook({ resource, record, adminUser });
|
|
798
798
|
if (!resp || (!resp.ok && !resp.error)) {
|
|
799
799
|
throw new Error(`Hook afterSave must return object with {ok: true} or { error: 'Error' } `);
|
|
@@ -810,15 +810,15 @@ class AdminForth {
|
|
|
810
810
|
server.endpoint({
|
|
811
811
|
method: 'POST',
|
|
812
812
|
path: '/delete_record',
|
|
813
|
-
handler: (
|
|
814
|
-
var
|
|
813
|
+
handler: (_6) => __awaiter(this, [_6], void 0, function* ({ body, adminUser }) {
|
|
814
|
+
var _7, _8, _9, _10;
|
|
815
815
|
const resource = this.config.resources.find((res) => res.resourceId == body['resourceId']);
|
|
816
816
|
const record = yield this.connectors[resource.dataSource].getRecordByPrimaryKey(resource, body['primaryKey']);
|
|
817
817
|
if (!resource) {
|
|
818
818
|
return { error: `Resource '${body['resourceId']}' not found` };
|
|
819
819
|
}
|
|
820
820
|
// execute hook if needed
|
|
821
|
-
for (const hook of getFunctionList((
|
|
821
|
+
for (const hook of getFunctionList((_8 = (_7 = resource.hooks) === null || _7 === void 0 ? void 0 : _7.delete) === null || _8 === void 0 ? void 0 : _8.beforeSave)) {
|
|
822
822
|
const resp = yield hook({ resource, record, adminUser });
|
|
823
823
|
if (!resp || (!resp.ok && !resp.error)) {
|
|
824
824
|
throw new Error(`Hook beforeSave must return object with {ok: true} or { error: 'Error' } `);
|
|
@@ -830,7 +830,7 @@ class AdminForth {
|
|
|
830
830
|
const connector = this.connectors[resource.dataSource];
|
|
831
831
|
yield connector.deleteRecord({ resource, recordId: body['primaryKey'] });
|
|
832
832
|
// execute hook if needed
|
|
833
|
-
for (const hook of getFunctionList((
|
|
833
|
+
for (const hook of getFunctionList((_10 = (_9 = resource.hooks) === null || _9 === void 0 ? void 0 : _9.delete) === null || _10 === void 0 ? void 0 : _10.afterSave)) {
|
|
834
834
|
const resp = yield hook({ resource, record, adminUser });
|
|
835
835
|
if (!resp || (!resp.ok && !resp.error)) {
|
|
836
836
|
throw new Error(`Hook afterSave must return object with {ok: true} or { error: 'Error' } `);
|
|
@@ -847,7 +847,7 @@ class AdminForth {
|
|
|
847
847
|
server.endpoint({
|
|
848
848
|
method: 'POST',
|
|
849
849
|
path: '/start_bulk_action',
|
|
850
|
-
handler: (
|
|
850
|
+
handler: (_11) => __awaiter(this, [_11], void 0, function* ({ body }) {
|
|
851
851
|
const { resourceId, actionId, recordIds } = body;
|
|
852
852
|
const resource = this.config.resources.find((res) => res.resourceId == resourceId);
|
|
853
853
|
if (!resource) {
|
|
@@ -448,10 +448,7 @@ fetchStatus.value.pending = false;
|
|
|
448
448
|
allowedActions.value = data.options?.allowedActions;
|
|
449
449
|
|
|
450
450
|
|
|
451
|
-
|
|
452
|
-
// initFlowbite();
|
|
453
|
-
// console.log('initFlowbite');
|
|
454
|
-
// });
|
|
451
|
+
|
|
455
452
|
}
|
|
456
453
|
|
|
457
454
|
|
|
@@ -528,7 +525,7 @@ async function init() {
|
|
|
528
525
|
}
|
|
529
526
|
|
|
530
527
|
onMounted(async () => {
|
|
531
|
-
|
|
528
|
+
initFlowbite();
|
|
532
529
|
|
|
533
530
|
await init();
|
|
534
531
|
|
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
<script setup>
|
|
81
81
|
|
|
82
82
|
import BreadcrumbsWithButtons from '@/components/BreadcrumbsWithButtons.vue';
|
|
83
|
-
import ShowTableItem from '@/components/ShowTableItem.vue';
|
|
84
83
|
|
|
85
84
|
import ValueRenderer from '@/components/ValueRenderer.vue';
|
|
86
85
|
import { useCoreStore } from '@/stores/core';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Website
|
|
2
|
+
|
|
3
|
+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
|
4
|
+
|
|
5
|
+
### Installation
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
$ yarn
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Local Development
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
$ yarn start
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
|
18
|
+
|
|
19
|
+
### Build
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
$ yarn build
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
|
26
|
+
|
|
27
|
+
### Deployment
|
|
28
|
+
|
|
29
|
+
Using SSH:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
$ USE_SSH=true yarn deploy
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Not using SSH:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
$ GIT_USER=<Your GitHub username> yarn deploy
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: first-blog-post
|
|
3
|
+
title: First Blog Post
|
|
4
|
+
authors:
|
|
5
|
+
name: Gao Wei
|
|
6
|
+
title: Docusaurus Core Team
|
|
7
|
+
url: https://github.com/wgao19
|
|
8
|
+
image_url: https://github.com/wgao19.png
|
|
9
|
+
tags: [hola, docusaurus]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: long-blog-post
|
|
3
|
+
title: Long Blog Post
|
|
4
|
+
authors: endi
|
|
5
|
+
tags: [hello, docusaurus]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
This is the summary of a very long blog post,
|
|
9
|
+
|
|
10
|
+
Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
|
|
11
|
+
|
|
12
|
+
<!--truncate-->
|
|
13
|
+
|
|
14
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
15
|
+
|
|
16
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
17
|
+
|
|
18
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
19
|
+
|
|
20
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
21
|
+
|
|
22
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
23
|
+
|
|
24
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
25
|
+
|
|
26
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
27
|
+
|
|
28
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
29
|
+
|
|
30
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
31
|
+
|
|
32
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
33
|
+
|
|
34
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
35
|
+
|
|
36
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
37
|
+
|
|
38
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
39
|
+
|
|
40
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
41
|
+
|
|
42
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
43
|
+
|
|
44
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: mdx-blog-post
|
|
3
|
+
title: MDX Blog Post
|
|
4
|
+
authors: [slorber]
|
|
5
|
+
tags: [docusaurus]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
|
|
9
|
+
|
|
10
|
+
:::tip
|
|
11
|
+
|
|
12
|
+
Use the power of React to create interactive blog posts.
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
<button onClick={() => alert('button clicked!')}>Click me!</button>
|
|
19
|
+
|
|
20
|
+
:::
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: welcome
|
|
3
|
+
title: Welcome
|
|
4
|
+
authors: [slorber, yangshun]
|
|
5
|
+
tags: [facebook, hello, docusaurus]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
|
|
9
|
+
|
|
10
|
+
Simply add Markdown files (or folders) to the `blog` directory.
|
|
11
|
+
|
|
12
|
+
Regular blog authors can be added to `authors.yml`.
|
|
13
|
+
|
|
14
|
+
The blog post date can be extracted from filenames, such as:
|
|
15
|
+
|
|
16
|
+
- `2019-05-30-welcome.md`
|
|
17
|
+
- `2019-05-30-welcome/index.md`
|
|
18
|
+
|
|
19
|
+
A blog post folder can be convenient to co-locate blog post images:
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
The blog supports tags as well!
|
|
24
|
+
|
|
25
|
+
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
endi:
|
|
2
|
+
name: Endilie Yacop Sucipto
|
|
3
|
+
title: Maintainer of Docusaurus
|
|
4
|
+
url: https://github.com/endiliey
|
|
5
|
+
image_url: https://github.com/endiliey.png
|
|
6
|
+
|
|
7
|
+
yangshun:
|
|
8
|
+
name: Yangshun Tay
|
|
9
|
+
title: Front End Engineer @ Facebook
|
|
10
|
+
url: https://github.com/yangshun
|
|
11
|
+
image_url: https://github.com/yangshun.png
|
|
12
|
+
|
|
13
|
+
slorber:
|
|
14
|
+
name: Sébastien Lorber
|
|
15
|
+
title: Docusaurus maintainer
|
|
16
|
+
url: https://sebastienlorber.com
|
|
17
|
+
image_url: https://github.com/slorber.png
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
facebook:
|
|
2
|
+
label: Facebook
|
|
3
|
+
permalink: /facebook
|
|
4
|
+
description: Facebook tag description
|
|
5
|
+
hello:
|
|
6
|
+
label: Hello
|
|
7
|
+
permalink: /hello
|
|
8
|
+
description: Hello tag description
|
|
9
|
+
docusaurus:
|
|
10
|
+
label: Docusaurus
|
|
11
|
+
permalink: /docusaurus
|
|
12
|
+
description: Docusaurus tag description
|
|
13
|
+
hola:
|
|
14
|
+
label: Hola
|
|
15
|
+
permalink: /hola
|
|
16
|
+
description: Hola tag description
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import {themes as prismThemes} from 'prism-react-renderer';
|
|
2
|
+
import type {Config} from '@docusaurus/types';
|
|
3
|
+
import type * as Preset from '@docusaurus/preset-classic';
|
|
4
|
+
|
|
5
|
+
const config: Config = {
|
|
6
|
+
title: 'AdminForth',
|
|
7
|
+
tagline: 'AdminForth Open-Source Vue-driven Next-Gen Admin Panel',
|
|
8
|
+
favicon: 'img/favicon.ico',
|
|
9
|
+
|
|
10
|
+
// Set the production url of your site here
|
|
11
|
+
url: 'https://adminforth.devforth.io',
|
|
12
|
+
// Set the /<baseUrl>/ pathname under which your site is served
|
|
13
|
+
// For GitHub pages deployment, it is often '/<projectName>/'
|
|
14
|
+
baseUrl: '/',
|
|
15
|
+
|
|
16
|
+
// GitHub pages deployment config.
|
|
17
|
+
// If you aren't using GitHub pages, you don't need these.
|
|
18
|
+
organizationName: 'devforth', // Usually your GitHub org/user name.
|
|
19
|
+
projectName: 'adminforth', // Usually your repo name.
|
|
20
|
+
|
|
21
|
+
onBrokenLinks: 'throw',
|
|
22
|
+
onBrokenMarkdownLinks: 'warn',
|
|
23
|
+
|
|
24
|
+
// Even if you don't use internationalization, you can use this field to set
|
|
25
|
+
// useful metadata like html lang. For example, if your site is Chinese, you
|
|
26
|
+
// may want to replace "en" with "zh-Hans".
|
|
27
|
+
i18n: {
|
|
28
|
+
defaultLocale: 'en',
|
|
29
|
+
locales: ['en'],
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
presets: [
|
|
33
|
+
[
|
|
34
|
+
'classic',
|
|
35
|
+
{
|
|
36
|
+
docs: {
|
|
37
|
+
sidebarPath: './sidebars.ts',
|
|
38
|
+
// Please change this to your repo.
|
|
39
|
+
// Remove this to remove the "edit this page" links.
|
|
40
|
+
// editUrl:
|
|
41
|
+
// 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
42
|
+
},
|
|
43
|
+
// blog: {
|
|
44
|
+
// showReadingTime: true,
|
|
45
|
+
// // Please change this to your repo.
|
|
46
|
+
// // Remove this to remove the "edit this page" links.
|
|
47
|
+
// // editUrl:
|
|
48
|
+
// // 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
49
|
+
// },
|
|
50
|
+
theme: {
|
|
51
|
+
customCss: './src/css/custom.css',
|
|
52
|
+
},
|
|
53
|
+
} satisfies Preset.Options,
|
|
54
|
+
],
|
|
55
|
+
],
|
|
56
|
+
|
|
57
|
+
plugins: [
|
|
58
|
+
[
|
|
59
|
+
"docusaurus-plugin-typedoc",
|
|
60
|
+
{
|
|
61
|
+
entryPoints: "../index.ts",
|
|
62
|
+
plugin: ["./typedoc-plugin.mjs"],
|
|
63
|
+
readme: "none",
|
|
64
|
+
indexFormat: "table",
|
|
65
|
+
disableSources: true,
|
|
66
|
+
sidebar: { pretty: true },
|
|
67
|
+
textContentMappings: {
|
|
68
|
+
"title.indexPage": "TypeDoc API",
|
|
69
|
+
"title.memberPage": "{name}",
|
|
70
|
+
},
|
|
71
|
+
parametersFormat: "table",
|
|
72
|
+
enumMembersFormat: "table",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
],
|
|
76
|
+
|
|
77
|
+
themeConfig: {
|
|
78
|
+
// Replace with your project's social card
|
|
79
|
+
image: 'img/docusaurus-social-card.jpg',
|
|
80
|
+
navbar: {
|
|
81
|
+
title: 'AdminForth',
|
|
82
|
+
logo: {
|
|
83
|
+
alt: 'AdminForth Logo',
|
|
84
|
+
src: 'img/logo.svg',
|
|
85
|
+
},
|
|
86
|
+
items: [
|
|
87
|
+
{
|
|
88
|
+
type: 'docSidebar',
|
|
89
|
+
sidebarId: 'tutorialSidebar',
|
|
90
|
+
position: 'left',
|
|
91
|
+
label: 'Tutorial',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'docSidebar',
|
|
95
|
+
sidebarId: 'tutorialSidebar',
|
|
96
|
+
position: 'left',
|
|
97
|
+
label: 'Tutorial',
|
|
98
|
+
},
|
|
99
|
+
{to: '/blog', label: 'Blog', position: 'left'},
|
|
100
|
+
{
|
|
101
|
+
href: 'https://github.com/devforth/adminforth',
|
|
102
|
+
label: 'GitHub',
|
|
103
|
+
position: 'right',
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
footer: {
|
|
108
|
+
style: 'dark',
|
|
109
|
+
links: [
|
|
110
|
+
{
|
|
111
|
+
title: 'Docs',
|
|
112
|
+
items: [
|
|
113
|
+
{
|
|
114
|
+
label: 'Tutorial',
|
|
115
|
+
to: '/docs/intro',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: 'Community',
|
|
121
|
+
items: [
|
|
122
|
+
{
|
|
123
|
+
label: 'Stack Overflow',
|
|
124
|
+
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: 'Discord',
|
|
128
|
+
href: 'https://discordapp.com/invite/docusaurus',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: 'Twitter',
|
|
132
|
+
href: 'https://twitter.com/docusaurus',
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
title: 'More',
|
|
138
|
+
items: [
|
|
139
|
+
{
|
|
140
|
+
label: 'Blog',
|
|
141
|
+
to: '/blog',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
label: 'GitHub',
|
|
145
|
+
href: 'https://github.com/facebook/docusaurus',
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
|
|
151
|
+
},
|
|
152
|
+
prism: {
|
|
153
|
+
theme: prismThemes.github,
|
|
154
|
+
darkTheme: prismThemes.dracula,
|
|
155
|
+
},
|
|
156
|
+
} satisfies Preset.ThemeConfig,
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export default config;
|