init: pusat bantuan tumbuhin
This commit is contained in:
82
README.md
Normal file
82
README.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# Pusat Bantuan Tumbuhin POS
|
||||
|
||||
Situs dokumentasi/bantuan Tumbuhin POS, dibangun dengan **Next.js + Fumadocs**, dengan dashboard writer **Decap CMS** yang menyimpan artikel ke **Gitea**.
|
||||
|
||||
## Struktur
|
||||
|
||||
```
|
||||
app/
|
||||
docs/[[...slug]]/page.tsx halaman artikel (+ metadata SEO & JSON-LD)
|
||||
docs/layout.tsx sidebar + daftar isi (Fumadocs)
|
||||
api/search/route.ts pencarian bawaan
|
||||
sitemap.ts, robots.ts SEO otomatis
|
||||
content/docs/ 📝 SEMUA ARTIKEL (.mdx)
|
||||
memulai/
|
||||
meta.json urutan menu sidebar
|
||||
cara-login.mdx
|
||||
public/
|
||||
images/docs/ 🖼️ gambar artikel
|
||||
admin/ dashboard Decap CMS (/admin)
|
||||
Dockerfile untuk deploy di Dokploy
|
||||
```
|
||||
|
||||
## Menjalankan di laptop
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Buka http://localhost:3000/docs
|
||||
|
||||
## Menambah artikel (manual)
|
||||
|
||||
1. Buat file `.mdx` di folder kategori, misalnya `content/docs/memulai/lupa-password.mdx`.
|
||||
2. Isi front matter:
|
||||
|
||||
```mdx
|
||||
---
|
||||
title: Cara Reset Password Tumbuhin POS
|
||||
description: Panduan mengganti password akun Tumbuhin POS yang lupa.
|
||||
---
|
||||
|
||||
Isi artikel... (subjudul mulai dari ##)
|
||||
```
|
||||
|
||||
3. Gambar disimpan di `public/images/docs/` dan dipanggil dengan `/images/docs/nama-file.png`.
|
||||
4. Commit & push → Dokploy otomatis build → artikel tayang dan masuk sitemap.
|
||||
|
||||
Kategori baru = folder baru di `content/docs/` + file `meta.json`.
|
||||
|
||||
> Catatan MDX: komentar ditulis `{/* ... */}`, bukan `<!-- ... -->`.
|
||||
|
||||
## Dashboard writer (Decap CMS + Gitea)
|
||||
|
||||
1. Di Gitea: **Settings → Applications → OAuth2 Applications → buat baru**
|
||||
- Redirect URI: `http://localhost:3000/admin/` (test) atau `https://bantuan.tumbuhindigital.com/admin/` (produksi)
|
||||
- **Hilangkan centang "Confidential Client"**
|
||||
2. Salin **Client ID** ke `public/admin/config.yml` → `app_id`.
|
||||
3. Sesuaikan `repo`, `base_url`, dan `api_root` di file yang sama.
|
||||
4. Buka `/admin` dan login dengan akun Gitea (akun harus punya akses Write ke repo).
|
||||
|
||||
> Login Decap butuh *secure context*: jalankan di `http://localhost` atau domain **HTTPS**. Domain `http://...traefik.me` tidak akan bisa login.
|
||||
|
||||
## Deploy di Dokploy
|
||||
|
||||
1. Push repo ini ke Gitea.
|
||||
2. Dokploy → **Settings → Git Providers → Add Gitea**.
|
||||
3. **Create Application** → pilih repo → Build Type: **Dockerfile**.
|
||||
4. Environment: `SITE_URL=https://bantuan.tumbuhindigital.com` (juga sebagai Build Arg).
|
||||
5. Domain: `bantuan.tumbuhindigital.com`, port `3000`, HTTPS aktif.
|
||||
6. Aktifkan **Auto Deploy**.
|
||||
7. Daftarkan domain di Google Search Console dan submit `/sitemap.xml`.
|
||||
|
||||
## SEO yang sudah otomatis
|
||||
|
||||
- Title & description per artikel dari front matter
|
||||
- Canonical URL & Open Graph
|
||||
- Structured data JSON-LD (`TechArticle`)
|
||||
- `sitemap.xml` (semua artikel otomatis masuk)
|
||||
- `robots.txt` (memblokir `/admin` dan `/api`)
|
||||
- Semua halaman statis (SSG)
|
||||
- Redirect slug lama → baru: tambahkan di `next.config.mjs` bagian `redirects()`
|
||||
Reference in New Issue
Block a user