domma-cms 0.25.14 → 0.25.16
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/admin/js/app.js +2 -2
- package/admin/js/templates/api-reference.html +68 -1233
- package/admin/js/templates/docs/api-actions.html +146 -0
- package/admin/js/templates/docs/api-authentication.html +202 -0
- package/admin/js/templates/docs/api-collections.html +347 -0
- package/admin/js/templates/docs/api-layouts.html +123 -0
- package/admin/js/templates/docs/api-media.html +158 -0
- package/admin/js/templates/docs/api-navigation.html +99 -0
- package/admin/js/templates/docs/api-pages.html +214 -0
- package/admin/js/templates/docs/api-plugins.html +136 -0
- package/admin/js/templates/docs/api-settings.html +148 -0
- package/admin/js/templates/docs/api-users.html +189 -0
- package/admin/js/templates/docs/api-views.html +142 -0
- package/admin/js/templates/docs/components-howto.html +175 -0
- package/admin/js/templates/docs/components-reference.html +259 -0
- package/admin/js/templates/docs/components-rules.html +167 -0
- package/admin/js/templates/docs/components-walkthrough.html +167 -0
- package/admin/js/templates/docs/tutorial-crud.html +344 -0
- package/admin/js/templates/docs/tutorial-forms.html +93 -0
- package/admin/js/templates/docs/tutorial-plugin.html +234 -0
- package/admin/js/templates/docs/usage-actions.html +122 -0
- package/admin/js/templates/docs/usage-cta-shortcode.html +124 -0
- package/admin/js/templates/docs/usage-dconfig.html +148 -0
- package/admin/js/templates/docs/usage-media.html +25 -0
- package/admin/js/templates/docs/usage-navigation.html +31 -0
- package/admin/js/templates/docs/usage-pages.html +68 -0
- package/admin/js/templates/docs/usage-plugins.html +36 -0
- package/admin/js/templates/docs/usage-shortcodes.html +810 -0
- package/admin/js/templates/docs/usage-site-settings.html +52 -0
- package/admin/js/templates/docs/usage-users-roles.html +84 -0
- package/admin/js/templates/docs/usage-views.html +105 -0
- package/admin/js/templates/documentation.html +60 -1522
- package/admin/js/templates/tutorials.html +46 -659
- package/admin/js/views/api-reference.js +1 -1
- package/admin/js/views/doc-pages.js +1 -0
- package/admin/js/views/documentation.js +1 -1
- package/admin/js/views/index.js +1 -1
- package/admin/js/views/tutorials.js +1 -1
- package/config/menus/admin-sidebar.json +76 -6
- package/package.json +1 -1
- package/public/js/site.js +1 -1
- package/server/server.js +3 -1
- package/server/services/menus.js +18 -0
- package/server/services/renderer.js +2 -0
- package/server/services/sidebar-migration.js +145 -3
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="book"></span> Site Settings</h1>
|
|
3
|
+
<a href="#/documentation" class="btn btn-ghost btn-sm"><span data-icon="arrow-left"></span> All usage topics</a>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div class="row">
|
|
7
|
+
<div class="col-12">
|
|
8
|
+
<div class="docs-body">
|
|
9
|
+
|
|
10
|
+
<p>Site Settings are stored in <code>config/site.json</code> and editable from the Settings page in
|
|
11
|
+
the admin
|
|
12
|
+
panel.</p>
|
|
13
|
+
|
|
14
|
+
<table class="table table-sm">
|
|
15
|
+
<thead>
|
|
16
|
+
<tr>
|
|
17
|
+
<th>Field</th>
|
|
18
|
+
<th>Description</th>
|
|
19
|
+
</tr>
|
|
20
|
+
</thead>
|
|
21
|
+
<tbody>
|
|
22
|
+
<tr>
|
|
23
|
+
<td><code>siteName</code></td>
|
|
24
|
+
<td>Site title used in the public navbar and browser tab.</td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr>
|
|
27
|
+
<td><code>tagline</code></td>
|
|
28
|
+
<td>Subtitle shown in the public site footer.</td>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr>
|
|
31
|
+
<td><code>adminTheme</code></td>
|
|
32
|
+
<td>Admin panel colour theme (e.g. <code>charcoal-dark</code>, <code>ocean-light</code>).</td>
|
|
33
|
+
</tr>
|
|
34
|
+
<tr>
|
|
35
|
+
<td><code>publicTheme</code></td>
|
|
36
|
+
<td>Public site theme applied to <code><html data-theme></code>.</td>
|
|
37
|
+
</tr>
|
|
38
|
+
<tr>
|
|
39
|
+
<td><code>defaultLayout</code></td>
|
|
40
|
+
<td>Fallback layout for pages that don't specify one.</td>
|
|
41
|
+
</tr>
|
|
42
|
+
</tbody>
|
|
43
|
+
</table>
|
|
44
|
+
|
|
45
|
+
<h3>Server configuration</h3>
|
|
46
|
+
<p>Low-level settings (port, CORS, upload size) live in <code>config/server.json</code> and require a
|
|
47
|
+
server
|
|
48
|
+
restart to take effect. These are not editable from the admin panel.</p>
|
|
49
|
+
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="book"></span> Users & Roles</h1>
|
|
3
|
+
<a href="#/documentation" class="btn btn-ghost btn-sm"><span data-icon="arrow-left"></span> All usage topics</a>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div class="row">
|
|
7
|
+
<div class="col-12">
|
|
8
|
+
<div class="docs-body">
|
|
9
|
+
|
|
10
|
+
<p>Users are stored as individual JSON files in <code>content/users/</code>. Passwords are hashed with
|
|
11
|
+
bcrypt
|
|
12
|
+
and never returned by the API.</p>
|
|
13
|
+
|
|
14
|
+
<h3>Roles</h3>
|
|
15
|
+
<table class="table table-sm">
|
|
16
|
+
<thead>
|
|
17
|
+
<tr>
|
|
18
|
+
<th>Role</th>
|
|
19
|
+
<th>Access</th>
|
|
20
|
+
</tr>
|
|
21
|
+
</thead>
|
|
22
|
+
<tbody>
|
|
23
|
+
<tr>
|
|
24
|
+
<td><strong>Admin</strong></td>
|
|
25
|
+
<td>Full access — users, plugins, settings, all content.</td>
|
|
26
|
+
</tr>
|
|
27
|
+
<tr>
|
|
28
|
+
<td><strong>Manager</strong></td>
|
|
29
|
+
<td>Content + structure (navigation, layouts). No users or plugins.</td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr>
|
|
32
|
+
<td><strong>Editor</strong></td>
|
|
33
|
+
<td>Pages and media only.</td>
|
|
34
|
+
</tr>
|
|
35
|
+
<tr>
|
|
36
|
+
<td><strong>Subscriber</strong></td>
|
|
37
|
+
<td>Read-only access to the API.</td>
|
|
38
|
+
</tr>
|
|
39
|
+
</tbody>
|
|
40
|
+
</table>
|
|
41
|
+
|
|
42
|
+
<h3>Authentication</h3>
|
|
43
|
+
<p>The admin panel uses JWT Bearer tokens. Tokens are stored in the browser and automatically
|
|
44
|
+
refreshed.
|
|
45
|
+
Sessions expire according to <code>config/auth.json</code> — default is 24 hours.</p>
|
|
46
|
+
|
|
47
|
+
<h3>Views & Actions</h3>
|
|
48
|
+
<p>Views and Actions are pro-only features that require a MongoDB connection.
|
|
49
|
+
Both roles — Admin and Manager — can create, edit, and run Views and Actions.</p>
|
|
50
|
+
<table class="table table-sm">
|
|
51
|
+
<thead>
|
|
52
|
+
<tr>
|
|
53
|
+
<th>Role</th>
|
|
54
|
+
<th>Views</th>
|
|
55
|
+
<th>Actions</th>
|
|
56
|
+
</tr>
|
|
57
|
+
</thead>
|
|
58
|
+
<tbody>
|
|
59
|
+
<tr>
|
|
60
|
+
<td><strong>Admin</strong></td>
|
|
61
|
+
<td>Full access</td>
|
|
62
|
+
<td>Full access</td>
|
|
63
|
+
</tr>
|
|
64
|
+
<tr>
|
|
65
|
+
<td><strong>Manager</strong></td>
|
|
66
|
+
<td>Full access</td>
|
|
67
|
+
<td>Full access</td>
|
|
68
|
+
</tr>
|
|
69
|
+
<tr>
|
|
70
|
+
<td><strong>Editor</strong></td>
|
|
71
|
+
<td>No access</td>
|
|
72
|
+
<td>No access</td>
|
|
73
|
+
</tr>
|
|
74
|
+
<tr>
|
|
75
|
+
<td><strong>Subscriber</strong></td>
|
|
76
|
+
<td>No access</td>
|
|
77
|
+
<td>No access</td>
|
|
78
|
+
</tr>
|
|
79
|
+
</tbody>
|
|
80
|
+
</table>
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="book"></span> Views</h1>
|
|
3
|
+
<a href="#/documentation" class="btn btn-ghost btn-sm"><span data-icon="arrow-left"></span> All usage topics</a>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div class="row">
|
|
7
|
+
<div class="col-12">
|
|
8
|
+
<div class="docs-body">
|
|
9
|
+
|
|
10
|
+
<p>Views are admin-designed display configurations that query one or more Collections via a stored
|
|
11
|
+
MongoDB aggregation pipeline, then render the results in the admin panel.
|
|
12
|
+
Views require a MongoDB connection configured under <strong>Collections → Options</strong>.</p>
|
|
13
|
+
|
|
14
|
+
<h3>Creating a View</h3>
|
|
15
|
+
<ol>
|
|
16
|
+
<li>Navigate to <strong>Data → Views</strong> and click <strong>New View</strong>.</li>
|
|
17
|
+
<li><strong>Source tab</strong> — enter a title, choose the primary source collection, and select
|
|
18
|
+
the MongoDB connection.
|
|
19
|
+
</li>
|
|
20
|
+
<li><strong>Pipeline tab</strong> — add aggregation stages in order. Each stage has a type and a
|
|
21
|
+
JSON config object.
|
|
22
|
+
</li>
|
|
23
|
+
<li><strong>Display tab</strong> — choose table or list mode, set page size, and optionally define
|
|
24
|
+
column definitions.
|
|
25
|
+
</li>
|
|
26
|
+
<li><strong>Access tab</strong> — select which roles can access this view and whether it is
|
|
27
|
+
publicly accessible.
|
|
28
|
+
</li>
|
|
29
|
+
<li>Click <strong>Save View</strong>, then use <strong>Preview</strong> to execute and inspect the
|
|
30
|
+
results.
|
|
31
|
+
</li>
|
|
32
|
+
</ol>
|
|
33
|
+
|
|
34
|
+
<h3>Allowed Pipeline Stage Types</h3>
|
|
35
|
+
<table class="table table-sm">
|
|
36
|
+
<thead>
|
|
37
|
+
<tr>
|
|
38
|
+
<th>Stage</th>
|
|
39
|
+
<th>Purpose</th>
|
|
40
|
+
</tr>
|
|
41
|
+
</thead>
|
|
42
|
+
<tbody>
|
|
43
|
+
<tr>
|
|
44
|
+
<td><code>$match</code></td>
|
|
45
|
+
<td>Filter documents by condition</td>
|
|
46
|
+
</tr>
|
|
47
|
+
<tr>
|
|
48
|
+
<td><code>$lookup</code></td>
|
|
49
|
+
<td>Left join from another collection</td>
|
|
50
|
+
</tr>
|
|
51
|
+
<tr>
|
|
52
|
+
<td><code>$sort</code></td>
|
|
53
|
+
<td>Sort documents</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr>
|
|
56
|
+
<td><code>$project</code></td>
|
|
57
|
+
<td>Include or exclude fields</td>
|
|
58
|
+
</tr>
|
|
59
|
+
<tr>
|
|
60
|
+
<td><code>$unwind</code></td>
|
|
61
|
+
<td>Deconstruct an array field</td>
|
|
62
|
+
</tr>
|
|
63
|
+
<tr>
|
|
64
|
+
<td><code>$addFields</code></td>
|
|
65
|
+
<td>Compute and add new fields</td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<td><code>$group</code></td>
|
|
69
|
+
<td>Group and aggregate</td>
|
|
70
|
+
</tr>
|
|
71
|
+
<tr>
|
|
72
|
+
<td><code>$count</code></td>
|
|
73
|
+
<td>Count documents</td>
|
|
74
|
+
</tr>
|
|
75
|
+
<tr>
|
|
76
|
+
<td><code>$skip</code></td>
|
|
77
|
+
<td>Skip documents (added automatically for pagination)</td>
|
|
78
|
+
</tr>
|
|
79
|
+
<tr>
|
|
80
|
+
<td><code>$limit</code></td>
|
|
81
|
+
<td>Limit documents (added automatically for pagination)</td>
|
|
82
|
+
</tr>
|
|
83
|
+
</tbody>
|
|
84
|
+
</table>
|
|
85
|
+
<p>Forbidden stages (<code>$out</code>, <code>$merge</code>, <code>$function</code>, <code>$accumulator</code>,
|
|
86
|
+
<code>$graphLookup</code>) are rejected at save and execution time.</p>
|
|
87
|
+
|
|
88
|
+
<h3>Column Definitions</h3>
|
|
89
|
+
<p>On the Display tab, column definitions are a JSON array. Each object has a <code>key</code>
|
|
90
|
+
(dot-path into the result document) and a <code>label</code>.</p>
|
|
91
|
+
<pre class="code-block"><code>[
|
|
92
|
+
{ "key": "data.name", "label": "Name" },
|
|
93
|
+
{ "key": "data.email", "label": "Email" },
|
|
94
|
+
{ "key": "orders", "label": "Orders" }
|
|
95
|
+
]</code></pre>
|
|
96
|
+
<p>If no columns are defined, the preview auto-generates columns from the first result document.</p>
|
|
97
|
+
|
|
98
|
+
<h3>Public Access</h3>
|
|
99
|
+
<p>Tick <strong>Public</strong> on the Access tab to expose the view via
|
|
100
|
+
<code>GET /api/views/:slug/public</code> without requiring a login.
|
|
101
|
+
Leave it unticked to require JWT authentication with one of the allowed roles.</p>
|
|
102
|
+
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|