litecms 0.2.1 → 0.2.3
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 +26 -1
- package/dist/admin/CmsBlogAdmin.d.ts.map +1 -1
- package/dist/admin/exports.js +470 -469
- package/dist/components/index.js +55 -55
- package/dist/index-xscpb89q.js +4422 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -202,6 +202,16 @@ export default function AdminLayout({
|
|
|
202
202
|
}
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
+
### Styling (Required)
|
|
206
|
+
|
|
207
|
+
Import the LiteCMS Tailwind layer once in your global stylesheet so the admin UI renders correctly:
|
|
208
|
+
|
|
209
|
+
```css
|
|
210
|
+
/* app/globals.css */
|
|
211
|
+
@import "tailwindcss";
|
|
212
|
+
@import "litecms/tailwind.css";
|
|
213
|
+
```
|
|
214
|
+
|
|
205
215
|
### 5. Create Admin Index Page (Landing)
|
|
206
216
|
|
|
207
217
|
```typescript
|
|
@@ -244,6 +254,21 @@ export function generateStaticParams() {
|
|
|
244
254
|
}
|
|
245
255
|
```
|
|
246
256
|
|
|
257
|
+
### Optional: Isolate Admin Layout with Route Groups
|
|
258
|
+
|
|
259
|
+
If you want `/admin` to avoid your public site layout, move your public pages into a `(site)` route group and keep the root layout minimal:
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
app/
|
|
263
|
+
├── (site)/
|
|
264
|
+
│ ├── layout.tsx # public layout
|
|
265
|
+
│ ├── page.tsx
|
|
266
|
+
│ └── ...
|
|
267
|
+
├── admin/
|
|
268
|
+
│ └── ...
|
|
269
|
+
└── layout.tsx # minimal root layout
|
|
270
|
+
```
|
|
271
|
+
|
|
247
272
|
### 7. Set Up Storage API Routes (Optional)
|
|
248
273
|
|
|
249
274
|
For image uploads, create API routes:
|
|
@@ -1209,7 +1234,7 @@ import { db } from '@/app/db';
|
|
|
1209
1234
|
import { blogPosts } from '@/app/db/schema';
|
|
1210
1235
|
import { eq, and } from 'drizzle-orm';
|
|
1211
1236
|
import { notFound } from 'next/navigation';
|
|
1212
|
-
import ReactMarkdown from 'react-markdown'
|
|
1237
|
+
import ReactMarkdown from 'react-markdown'
|
|
1213
1238
|
import remarkGfm from 'remark-gfm';
|
|
1214
1239
|
import { Navigation } from '@/app/components/Navigation';
|
|
1215
1240
|
import { getNavigation, getSiteSettings } from '@/app/admin/actions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsBlogAdmin.d.ts","sourceRoot":"","sources":["../../src/admin/CmsBlogAdmin.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,GAAG,WAAW,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,OAAO,CAAC,EAAE;QACN,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACL,CAAC;AAkiCF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EACzB,aAAuC,EACvC,iBAA2B,EAC3B,OAAO,GACV,EAAE,iBAAiB,
|
|
1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