Skip to content

Commit 0126038

Browse files
strapi cms
1 parent 96f51c9 commit 0126038

File tree

35 files changed

+2684
-0
lines changed

35 files changed

+2684
-0
lines changed

.tmp/data.db

1.02 MB
Binary file not shown.

cms/.gitignore

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
############################
2+
# OS X
3+
############################
4+
5+
.DS_Store
6+
.AppleDouble
7+
.LSOverride
8+
Icon
9+
.Spotlight-V100
10+
.Trashes
11+
._*
12+
13+
14+
############################
15+
# Linux
16+
############################
17+
18+
*~
19+
20+
21+
############################
22+
# Windows
23+
############################
24+
25+
Thumbs.db
26+
ehthumbs.db
27+
Desktop.ini
28+
$RECYCLE.BIN/
29+
*.cab
30+
*.msi
31+
*.msm
32+
*.msp
33+
34+
35+
############################
36+
# Packages
37+
############################
38+
39+
*.7z
40+
*.csv
41+
*.dat
42+
*.dmg
43+
*.gz
44+
*.iso
45+
*.jar
46+
*.rar
47+
*.tar
48+
*.zip
49+
*.com
50+
*.class
51+
*.dll
52+
*.exe
53+
*.o
54+
*.seed
55+
*.so
56+
*.swo
57+
*.swp
58+
*.swn
59+
*.swm
60+
*.out
61+
*.pid
62+
63+
64+
############################
65+
# Logs and databases
66+
############################
67+
68+
.tmp
69+
*.log
70+
*.sql
71+
*.sqlite
72+
*.sqlite3
73+
74+
75+
############################
76+
# Misc.
77+
############################
78+
79+
*#
80+
ssl
81+
.idea
82+
nbproject
83+
public/uploads/*
84+
!public/uploads/.gitkeep
85+
86+
############################
87+
# Node.js
88+
############################
89+
90+
lib-cov
91+
lcov.info
92+
pids
93+
logs
94+
results
95+
node_modules
96+
.node_history
97+
98+
############################
99+
# Tests
100+
############################
101+
102+
coverage
103+
104+
############################
105+
# Strapi
106+
############################
107+
108+
.env
109+
license.txt
110+
exports
111+
.strapi
112+
dist
113+
build
114+
.strapi-updater.json
115+
.strapi-cloud.json

cms/.strapirc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"autoReload": true
3+
}

cms/QUICKSTART.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Quick Start Guide
2+
3+
## First Time Setup
4+
5+
### 1. Generate Secrets
6+
7+
Before running the CMS for the first time, you need to generate secure secrets. Run this command from the `cms` directory:
8+
9+
```bash
10+
node -e "console.log('APP_KEYS=' + Array(4).fill(0).map(() => require('crypto').randomBytes(16).toString('base64')).join(','))"
11+
node -e "console.log('API_TOKEN_SALT=' + require('crypto').randomBytes(16).toString('base64'))"
12+
node -e "console.log('ADMIN_JWT_SECRET=' + require('crypto').randomBytes(16).toString('base64'))"
13+
node -e "console.log('TRANSFER_TOKEN_SALT=' + require('crypto').randomBytes(16).toString('base64'))"
14+
node -e "console.log('JWT_SECRET=' + require('crypto').randomBytes(16).toString('base64'))"
15+
```
16+
17+
Copy the output and replace the values in your `.env` file.
18+
19+
### 2. Install Dependencies
20+
21+
```bash
22+
npm install
23+
```
24+
25+
### 3. Start the CMS
26+
27+
```bash
28+
npm run develop
29+
```
30+
31+
### 4. Create Admin User
32+
33+
On first run, navigate to http://localhost:1337/admin and create your admin account.
34+
35+
## Creating Your First Press Item
36+
37+
1. Log in to the admin panel at http://localhost:1337/admin
38+
2. Click on "Press Items" in the left sidebar
39+
3. Click "Create new entry"
40+
4. Fill in the required fields:
41+
- **Title**: The headline
42+
- **Description**: A short excerpt (1-2 sentences)
43+
- **Publish Date**: When the item was published
44+
- **Slug**: Auto-generated from title, but can be customized
45+
5. Optional fields:
46+
- **Publication**: Name of the publication (e.g., "TechCrunch")
47+
- **Publication Logo**: URL to publication's logo
48+
- **External URL**: Link to the external article
49+
- **Content**: Full article content (rich text)
50+
- **Featured**: Check to highlight this item
51+
- **Category**: Choose press-release, media-mention, or announcement
52+
6. Click "Save" to create a draft
53+
7. Click "Publish" to make it live
54+
55+
Once published, an MDX file will be automatically created in `../src/content/press/` and will appear on the `/developers/press` page.
56+
57+
## Viewing Your Content
58+
59+
1. Make sure the Astro dev server is running:
60+
```bash
61+
cd .. # Go back to root
62+
bun run start
63+
```
64+
65+
2. Visit http://localhost:1103/developers/press to see your press items
66+
67+
## Editing Content
68+
69+
1. Find the press item in the Strapi admin
70+
2. Make your changes
71+
3. Click "Save" and "Publish"
72+
4. The MDX file will be automatically updated
73+
74+
## Unpublishing Content
75+
76+
1. Find the press item in the Strapi admin
77+
2. Click the "Unpublish" button
78+
3. The MDX file will be automatically deleted
79+
80+
## Tips
81+
82+
- **Drafts**: Save items as drafts to work on them before publishing
83+
- **Featured Items**: Use sparingly - featured items appear in a prominent card grid
84+
- **External Links**: If you provide an External URL, the press item will link to that instead of showing local content
85+
- **Publication Logos**: For best display, use square logos with transparent backgrounds
86+
- **Rich Text**: The content field supports formatting, links, headings, etc.
87+
88+
## Troubleshooting
89+
90+
### Port Already in Use
91+
92+
If port 1337 is already in use, you can change it in `.env`:
93+
94+
```
95+
PORT=1338
96+
```
97+
98+
### MDX Files Not Generating
99+
100+
1. Ensure the item is **published** (not just saved)
101+
2. Check the Strapi console for errors
102+
3. Verify the `MDX_OUTPUT_PATH` in `.env` is correct
103+
4. Check file permissions on `src/content/press/`
104+
105+
### Can't Access Admin Panel
106+
107+
1. Make sure the CMS is running (`npm run develop`)
108+
2. Check that nothing else is using port 1337
109+
3. Try accessing http://127.0.0.1:1337/admin instead
110+
111+
## Next Steps
112+
113+
- Customize the press item schema in `src/api/press-item/content-types/press-item/schema.json`
114+
- Modify the MDX generation logic in `src/api/press-item/content-types/press-item/lifecycles.ts`
115+
- Update the press page styling in `../src/pages/press.astro`
116+
- Configure additional content types for other sections

0 commit comments

Comments
 (0)