@tanglemedia/directus-core-settings 0.0.1
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 +46 -0
- package/dist/index.js +34 -0
- package/migrations/20260101A-tngl_directus_core-~-create-website-role.mjs +22 -0
- package/migrations/20260101B-tngl_directus_core-~-create-staff-role.mjs +22 -0
- package/migrations/20260101C-tngl_directus_core-~-create-website-policy.mjs +25 -0
- package/migrations/20260101D-tngl_directus_core-~-create-staff-policy.mjs +25 -0
- package/migrations/20260101E-tngl_directus_core-~-add-site-user.mjs +30 -0
- package/migrations/20260101F-tngl_directus_core-~-add-staff-user.mjs +30 -0
- package/migrations/20260101G-tngl_directus_core-~-add-site-access.mjs +26 -0
- package/migrations/20260101H-tngl_directus_core-~-add-staff-access.mjs +26 -0
- package/migrations/helpers/generator.mjs +19 -0
- package/migrations/helpers/permission.mjs +45 -0
- package/migrations/helpers/policy.mjs +12 -0
- package/migrations/helpers/role.mjs +12 -0
- package/package.json +47 -0
- package/src/index.js +8 -0
- package/src/shared/utility/migrations.js +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @tanglemedia/directus-core-settings
|
|
2
|
+
|
|
3
|
+
Installs the Article Collection to your Directus project.
|
|
4
|
+
|
|
5
|
+
The package will install the following collections:
|
|
6
|
+
|
|
7
|
+
- Article Collection `tngl_article`
|
|
8
|
+
|
|
9
|
+
It automatically sets the following:
|
|
10
|
+
|
|
11
|
+
- Creates a new role called Website. If the Website role already exist, it will not create a new one.
|
|
12
|
+
- Website role will have READ permission to tngl_article collection
|
|
13
|
+
- Sets default presets when viewing a list of pages
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- Directus >= 10.10.1
|
|
18
|
+
- Node >= 18.x.x
|
|
19
|
+
|
|
20
|
+
To enable auto-generation of the slug / url based on the title of the collection, please install the following Directus Extensions:
|
|
21
|
+
|
|
22
|
+
- directus-extension-wpslug-interface
|
|
23
|
+
- directus-extension-display-link
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
1. Add the following variables to your Directus env file:
|
|
28
|
+
- `SITE_BASE_URL` (Base url of the site. Needed to properly format the full url of the page in the collection)
|
|
29
|
+
|
|
30
|
+
2. `npm i @tanglemedia/directus-collection-article`
|
|
31
|
+
|
|
32
|
+
3. `npx directus bootstrap` to update your database and restart directus
|
|
33
|
+
|
|
34
|
+
## What's inside the package
|
|
35
|
+
|
|
36
|
+
### Article Collection
|
|
37
|
+
|
|
38
|
+
- Status (defaults to "Draft")
|
|
39
|
+
- Title (required)
|
|
40
|
+
- Slug / URL (required, unique)
|
|
41
|
+
- Author
|
|
42
|
+
- Date Published
|
|
43
|
+
- Image
|
|
44
|
+
- SEO
|
|
45
|
+
- Keywords
|
|
46
|
+
- Description
|