init: pusat bantuan tumbuhin
This commit is contained in:
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
.next
|
||||
.source
|
||||
.git
|
||||
*.log
|
||||
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
.next
|
||||
.source
|
||||
out
|
||||
next-env.d.ts
|
||||
*.log
|
||||
.env*.local
|
||||
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
# ---------- Install & build ----------
|
||||
FROM node:22-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
# postinstall menjalankan `fumadocs-mdx` (butuh source.config.ts & content/)
|
||||
RUN npm ci || npm install
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ARG SITE_URL
|
||||
ENV SITE_URL=${SITE_URL}
|
||||
RUN npm run build
|
||||
|
||||
# ---------- Runtime (image kecil) ----------
|
||||
FROM node:22-alpine AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV PORT=3000
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "server.js"]
|
||||
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()`
|
||||
5
app/api/search/route.ts
Normal file
5
app/api/search/route.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { createFromSource } from 'fumadocs-core/search/server';
|
||||
import { source } from '@/lib/source';
|
||||
|
||||
// Pencarian bawaan (gratis, tanpa Algolia)
|
||||
export const { GET } = createFromSource(source);
|
||||
69
app/docs/[[...slug]]/page.tsx
Normal file
69
app/docs/[[...slug]]/page.tsx
Normal file
@@ -0,0 +1,69 @@
|
||||
import type { Metadata } from 'next';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page';
|
||||
import { source } from '@/lib/source';
|
||||
import { getMDXComponents } from '@/mdx-components';
|
||||
import { SITE_NAME, SITE_URL } from '@/lib/site';
|
||||
|
||||
type Props = {
|
||||
params: Promise<{ slug?: string[] }>;
|
||||
};
|
||||
|
||||
export default async function Page(props: Props) {
|
||||
const params = await props.params;
|
||||
const page = source.getPage(params.slug);
|
||||
if (!page) notFound(); // status 404 yang benar
|
||||
|
||||
const MDXContent = page.data.body;
|
||||
|
||||
// Structured data (JSON-LD) untuk Google
|
||||
const jsonLd = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'TechArticle',
|
||||
headline: page.data.title,
|
||||
description: page.data.description,
|
||||
inLanguage: 'id-ID',
|
||||
mainEntityOfPage: `${SITE_URL}${page.url}`,
|
||||
publisher: { '@type': 'Organization', name: 'Tumbuhin' },
|
||||
};
|
||||
|
||||
return (
|
||||
<DocsPage toc={page.data.toc} full={page.data.full}>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
/>
|
||||
<DocsTitle>{page.data.title}</DocsTitle>
|
||||
<DocsDescription>{page.data.description}</DocsDescription>
|
||||
<DocsBody>
|
||||
<MDXContent components={getMDXComponents()} />
|
||||
</DocsBody>
|
||||
</DocsPage>
|
||||
);
|
||||
}
|
||||
|
||||
// Semua halaman di-generate statis saat build (terbaik untuk SEO)
|
||||
export async function generateStaticParams() {
|
||||
return source.generateParams();
|
||||
}
|
||||
|
||||
// Title, description, canonical, dan Open Graph per artikel dari front matter
|
||||
export async function generateMetadata(props: Props): Promise<Metadata> {
|
||||
const params = await props.params;
|
||||
const page = source.getPage(params.slug);
|
||||
if (!page) notFound();
|
||||
|
||||
return {
|
||||
title: page.data.title,
|
||||
description: page.data.description,
|
||||
alternates: { canonical: page.url },
|
||||
openGraph: {
|
||||
type: 'article',
|
||||
url: page.url,
|
||||
title: page.data.title,
|
||||
description: page.data.description,
|
||||
siteName: SITE_NAME,
|
||||
locale: 'id_ID',
|
||||
},
|
||||
};
|
||||
}
|
||||
12
app/docs/layout.tsx
Normal file
12
app/docs/layout.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
|
||||
import type { ReactNode } from 'react';
|
||||
import { baseOptions } from '@/app/layout.config';
|
||||
import { source } from '@/lib/source';
|
||||
|
||||
export default function Layout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<DocsLayout tree={source.pageTree} {...baseOptions}>
|
||||
{children}
|
||||
</DocsLayout>
|
||||
);
|
||||
}
|
||||
10
app/global.css
Normal file
10
app/global.css
Normal file
@@ -0,0 +1,10 @@
|
||||
@import 'tailwindcss';
|
||||
@import 'fumadocs-ui/css/neutral.css';
|
||||
@import 'fumadocs-ui/css/preset.css';
|
||||
|
||||
@source '../node_modules/fumadocs-ui/dist/**/*.js';
|
||||
|
||||
/* Warna brand Tumbuhin (biru) */
|
||||
:root {
|
||||
--color-fd-primary: hsl(199, 98%, 48%);
|
||||
}
|
||||
14
app/layout.config.tsx
Normal file
14
app/layout.config.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
|
||||
|
||||
export const baseOptions: BaseLayoutProps = {
|
||||
nav: {
|
||||
title: 'Tumbuhin Bantuan',
|
||||
},
|
||||
links: [
|
||||
{
|
||||
text: 'Login POS',
|
||||
url: 'https://pos.tumbuhindigital.com/login',
|
||||
external: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
41
app/layout.tsx
Normal file
41
app/layout.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import './global.css';
|
||||
import { RootProvider } from 'fumadocs-ui/provider';
|
||||
import { Inter } from 'next/font/google';
|
||||
import type { Metadata } from 'next';
|
||||
import type { ReactNode } from 'react';
|
||||
import { SITE_NAME, SITE_URL } from '@/lib/site';
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] });
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(SITE_URL),
|
||||
title: {
|
||||
default: SITE_NAME,
|
||||
template: `%s | ${SITE_NAME}`,
|
||||
},
|
||||
description:
|
||||
'Panduan lengkap menggunakan Tumbuhin POS: login, transaksi, produk, stok, dan Pop-Up Event.',
|
||||
openGraph: {
|
||||
siteName: SITE_NAME,
|
||||
locale: 'id_ID',
|
||||
type: 'website',
|
||||
},
|
||||
// Isi kode verifikasi Google Search Console di sini saat produksi
|
||||
// verification: { google: 'KODE_VERIFIKASI' },
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="id" className={inter.className} suppressHydrationWarning>
|
||||
<body className="flex flex-col min-h-screen">
|
||||
<RootProvider
|
||||
search={{
|
||||
options: { api: '/api/search' },
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</RootProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
22
app/page.tsx
Normal file
22
app/page.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import Link from 'next/link';
|
||||
import { HomeLayout } from 'fumadocs-ui/layouts/home';
|
||||
import { baseOptions } from './layout.config';
|
||||
|
||||
export default function HomePage() {
|
||||
return (
|
||||
<HomeLayout {...baseOptions}>
|
||||
<main className="flex flex-1 flex-col items-center justify-center px-4 py-24 text-center">
|
||||
<h1 className="mb-4 text-3xl font-bold">Pusat Bantuan Tumbuhin POS</h1>
|
||||
<p className="mb-8 max-w-xl text-fd-muted-foreground">
|
||||
Panduan langkah demi langkah untuk mengelola usaha Anda dengan Tumbuhin POS.
|
||||
</p>
|
||||
<Link
|
||||
href="/docs"
|
||||
className="rounded-lg bg-fd-primary px-6 py-3 font-medium text-fd-primary-foreground"
|
||||
>
|
||||
Lihat Panduan
|
||||
</Link>
|
||||
</main>
|
||||
</HomeLayout>
|
||||
);
|
||||
}
|
||||
14
app/robots.ts
Normal file
14
app/robots.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { MetadataRoute } from 'next';
|
||||
import { SITE_URL } from '@/lib/site';
|
||||
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
return {
|
||||
rules: {
|
||||
userAgent: '*',
|
||||
allow: '/',
|
||||
// Dashboard writer & API tidak perlu masuk Google
|
||||
disallow: ['/admin', '/api'],
|
||||
},
|
||||
sitemap: `${SITE_URL}/sitemap.xml`,
|
||||
};
|
||||
}
|
||||
17
app/sitemap.ts
Normal file
17
app/sitemap.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { MetadataRoute } from 'next';
|
||||
import { source } from '@/lib/source';
|
||||
import { SITE_URL } from '@/lib/site';
|
||||
|
||||
// Otomatis: setiap file .mdx baru langsung masuk sitemap
|
||||
export default function sitemap(): MetadataRoute.Sitemap {
|
||||
const pages = source.getPages().map((page) => ({
|
||||
url: `${SITE_URL}${page.url}`,
|
||||
changeFrequency: 'weekly' as const,
|
||||
priority: 0.8,
|
||||
}));
|
||||
|
||||
return [
|
||||
{ url: SITE_URL, changeFrequency: 'monthly', priority: 1 },
|
||||
...pages,
|
||||
];
|
||||
}
|
||||
14
content/docs/index.mdx
Normal file
14
content/docs/index.mdx
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Selamat Datang di Pusat Bantuan Tumbuhin
|
||||
description: Panduan lengkap menggunakan Tumbuhin POS untuk mengelola usaha Anda dengan lebih mudah dan teratur.
|
||||
---
|
||||
|
||||
Tumbuhin POS membantu Anda mencatat transaksi, mengelola produk, dan berjualan di acara Pop-Up Event. Pilih panduan di bawah ini untuk memulai.
|
||||
|
||||
<Cards>
|
||||
<Card title="Cara Login Tumbuhin POS" href="/docs/memulai/cara-login" description="Masuk ke akun Tumbuhin POS lewat browser dalam beberapa langkah." />
|
||||
</Cards>
|
||||
|
||||
## Butuh bantuan lain?
|
||||
|
||||
Gunakan fitur **pencarian** di bagian atas halaman untuk menemukan panduan yang Anda butuhkan.
|
||||
83
content/docs/memulai/cara-login.mdx
Normal file
83
content/docs/memulai/cara-login.mdx
Normal file
@@ -0,0 +1,83 @@
|
||||
---
|
||||
title: Cara Login Tumbuhin POS
|
||||
description: Panduan cara login Tumbuhin POS lewat browser, termasuk fitur Remember Me, lupa password, dan login untuk Pop-Up Event.
|
||||
---
|
||||
|
||||
Ingin mulai mencatat transaksi usaha Anda? Langkah pertama adalah **login ke Tumbuhin POS**. Di panduan ini, Anda akan belajar cara login Tumbuhin POS lewat browser hanya dalam beberapa langkah, termasuk apa yang harus dilakukan jika lupa password.
|
||||
|
||||
## Yang Perlu Disiapkan
|
||||
|
||||
Sebelum login, pastikan Anda sudah punya:
|
||||
|
||||
- **Akun Tumbuhin POS** (email dan password yang sudah terdaftar)
|
||||
- **Koneksi internet** yang stabil
|
||||
- **Browser** seperti Google Chrome, Microsoft Edge, Firefox, atau Safari
|
||||
|
||||
Belum punya akun? Daftar dulu di [halaman registrasi Tumbuhin POS](https://pos.tumbuhindigital.com/register). Prosesnya kurang dari satu menit.
|
||||
|
||||
## Langkah Login
|
||||
|
||||
### 1. Buka Halaman Login
|
||||
|
||||
Buka browser, lalu kunjungi [pos.tumbuhindigital.com/login](https://pos.tumbuhindigital.com/login). Anda akan melihat halaman bertuliskan **Welcome Back!**.
|
||||
|
||||

|
||||
|
||||
### 2. Masukkan Email dan Password
|
||||
|
||||
- Isi kolom **Email** dengan email yang Anda gunakan saat mendaftar.
|
||||
- Isi kolom **Password** dengan kata sandi akun Anda.
|
||||
|
||||
<Callout title="Tips">
|
||||
Pastikan tidak ada spasi di awal atau akhir email, dan perhatikan huruf besar-kecil pada password.
|
||||
</Callout>
|
||||
|
||||
### 3. Centang Remember Me (Opsional)
|
||||
|
||||
Centang kotak **Remember me** jika Anda menggunakan perangkat pribadi, supaya tidak perlu login ulang setiap kali membuka Tumbuhin POS.
|
||||
|
||||
<Callout type="warn" title="Penting">
|
||||
Jangan centang Remember me jika Anda memakai komputer bersama atau perangkat umum.
|
||||
</Callout>
|
||||
|
||||
### 4. Klik Login POS
|
||||
|
||||
Klik tombol biru **Login POS**. Jika email dan password benar, Anda akan langsung masuk ke dashboard Tumbuhin POS dan siap mencatat transaksi.
|
||||
|
||||
## Login untuk Pop-Up Event
|
||||
|
||||
Jika Anda berjualan di bazar, pameran, atau acara sementara, gunakan opsi **Login Pop-Up Event** yang ada di bawah tombol Login POS. Opsi ini akan membawa Anda ke halaman aktivasi khusus untuk event.
|
||||
|
||||
{/* CATATAN WRITER: lengkapi langkah aktivasi Pop-Up Event. */}
|
||||
|
||||
## Lupa Password
|
||||
|
||||
1. Di halaman login, klik **Forgot Password?** di sebelah kanan bawah kolom password.
|
||||
2. Masukkan email akun Tumbuhin POS Anda.
|
||||
3. Buka email Anda dan ikuti tautan untuk membuat password baru.
|
||||
4. Kembali ke halaman login dan masuk dengan password baru.
|
||||
|
||||
{/* CATATAN WRITER: cek ulang alur reset password di aplikasi. */}
|
||||
|
||||
## Masalah yang Sering Terjadi
|
||||
|
||||
| Masalah | Solusi |
|
||||
|---|---|
|
||||
| Email atau password salah | Periksa kembali penulisan, atau reset lewat **Forgot Password?** |
|
||||
| Halaman tidak bisa dibuka | Cek koneksi internet, lalu muat ulang halaman |
|
||||
| Sudah login tapi keluar sendiri | Centang **Remember me** saat login di perangkat pribadi |
|
||||
| Belum punya akun | Daftar di [halaman registrasi](https://pos.tumbuhindigital.com/register) |
|
||||
|
||||
## Pertanyaan Umum
|
||||
|
||||
### Apakah login Tumbuhin POS bisa dari HP?
|
||||
|
||||
Bisa. Buka alamat login yang sama melalui browser di HP Anda.
|
||||
|
||||
### Apa bedanya Login POS dan Login Pop-Up Event?
|
||||
|
||||
Login POS digunakan untuk operasional toko sehari-hari, sedangkan Login Pop-Up Event digunakan saat Anda berjualan di acara sementara seperti bazar atau pameran.
|
||||
|
||||
## Kesimpulan
|
||||
|
||||
Cara login Tumbuhin POS sangat mudah: buka halaman login, masukkan email dan password, lalu klik **Login POS**. Jika lupa password, gunakan fitur **Forgot Password?**, dan untuk berjualan di acara, pilih **Login Pop-Up Event**.
|
||||
4
content/docs/memulai/meta.json
Normal file
4
content/docs/memulai/meta.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Memulai",
|
||||
"pages": ["cara-login", "..."]
|
||||
}
|
||||
4
content/docs/meta.json
Normal file
4
content/docs/meta.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Pusat Bantuan",
|
||||
"pages": ["index", "memulai", "..."]
|
||||
}
|
||||
5
lib/site.ts
Normal file
5
lib/site.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// Ganti lewat environment variable SITE_URL di Dokploy saat produksi,
|
||||
// misalnya https://bantuan.tumbuhindigital.com
|
||||
export const SITE_URL = process.env.SITE_URL ?? 'http://localhost:3000';
|
||||
|
||||
export const SITE_NAME = 'Pusat Bantuan Tumbuhin';
|
||||
7
lib/source.ts
Normal file
7
lib/source.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { docs } from '@/.source';
|
||||
import { loader } from 'fumadocs-core/source';
|
||||
|
||||
export const source = loader({
|
||||
baseUrl: '/docs',
|
||||
source: docs.toFumadocsSource(),
|
||||
});
|
||||
9
mdx-components.tsx
Normal file
9
mdx-components.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import defaultMdxComponents from 'fumadocs-ui/mdx';
|
||||
import type { MDXComponents } from 'mdx/types';
|
||||
|
||||
export function getMDXComponents(components?: MDXComponents): MDXComponents {
|
||||
return {
|
||||
...defaultMdxComponents,
|
||||
...components,
|
||||
};
|
||||
}
|
||||
30
next.config.mjs
Normal file
30
next.config.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
import { createMDX } from 'fumadocs-mdx/next';
|
||||
|
||||
const withMDX = createMDX();
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const config = {
|
||||
reactStrictMode: true,
|
||||
// Untuk Docker / Dokploy: image kecil, jalankan dengan `node server.js`
|
||||
output: 'standalone',
|
||||
|
||||
async rewrites() {
|
||||
return [
|
||||
// Dashboard Decap CMS (file statis di public/admin/index.html)
|
||||
{ source: '/admin', destination: '/admin/index.html' },
|
||||
];
|
||||
},
|
||||
|
||||
async redirects() {
|
||||
return [
|
||||
// Contoh redirect jika slug artikel diganti setelah terbit:
|
||||
// {
|
||||
// source: '/docs/memulai/slug-lama',
|
||||
// destination: '/docs/memulai/slug-baru',
|
||||
// permanent: true,
|
||||
// },
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default withMDX(config);
|
||||
5820
package-lock.json
generated
Normal file
5820
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
29
package.json
Normal file
29
package.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "tumbuhin-docs",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"postinstall": "fumadocs-mdx"
|
||||
},
|
||||
"dependencies": {
|
||||
"fumadocs-core": "~15.5.0",
|
||||
"fumadocs-mdx": "~11.6.0",
|
||||
"fumadocs-ui": "~15.5.0",
|
||||
"next": "^15.3.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4.1.0",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/node": "^22.0.0",
|
||||
"@types/react": "^19.1.0",
|
||||
"@types/react-dom": "^19.1.0",
|
||||
"postcss": "^8.5.0",
|
||||
"tailwindcss": "^4.1.0",
|
||||
"typescript": "^5.8.0"
|
||||
}
|
||||
}
|
||||
5
postcss.config.mjs
Normal file
5
postcss.config.mjs
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
plugins: {
|
||||
'@tailwindcss/postcss': {},
|
||||
},
|
||||
};
|
||||
46
public/admin/config.yml
Normal file
46
public/admin/config.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
# Konfigurasi Decap CMS untuk Gitea
|
||||
# Dokumentasi: https://decapcms.org/docs/gitea-backend
|
||||
|
||||
backend:
|
||||
name: gitea
|
||||
repo: tumbuhin-admin/pos-tumbuhin # owner/nama-repo di Gitea
|
||||
base_url: http://docs-giteasqlite-d8cedb-72-61-140-207.traefik.me # URL Gitea (TEST)
|
||||
api_root: http://docs-giteasqlite-d8cedb-72-61-140-207.traefik.me/api/v1
|
||||
app_id: GANTI_DENGAN_CLIENT_ID_OAUTH_GITEA
|
||||
branch: main
|
||||
|
||||
locale: id
|
||||
|
||||
# Gambar yang di-upload writer
|
||||
media_folder: public/images/docs
|
||||
public_folder: /images/docs
|
||||
|
||||
collections:
|
||||
- name: memulai
|
||||
label: Memulai
|
||||
label_singular: Artikel
|
||||
folder: content/docs/memulai
|
||||
create: true
|
||||
extension: mdx
|
||||
format: frontmatter
|
||||
slug: '{{slug}}'
|
||||
summary: '{{title}}'
|
||||
fields:
|
||||
- label: Judul
|
||||
name: title
|
||||
widget: string
|
||||
hint: 'Maksimal ±60 karakter, keyword utama di depan.'
|
||||
- label: Deskripsi (meta description)
|
||||
name: description
|
||||
widget: text
|
||||
hint: '±150–160 karakter. Muncul di hasil pencarian Google.'
|
||||
- label: Isi Artikel
|
||||
name: body
|
||||
widget: markdown
|
||||
hint: 'Mulai subjudul dari ## (judul artikel otomatis jadi H1).'
|
||||
|
||||
# Tambahkan kategori lain dengan pola yang sama, contoh:
|
||||
# - name: transaksi
|
||||
# label: Transaksi
|
||||
# folder: content/docs/transaksi
|
||||
# ...
|
||||
13
public/admin/index.html
Normal file
13
public/admin/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="id">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<title>Dashboard Writer | Tumbuhin Bantuan</title>
|
||||
<link href="/admin/config.yml" type="text/yaml" rel="cms-config-url" />
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
public/images/docs/login-tumbuhin-pos.png
Normal file
BIN
public/images/docs/login-tumbuhin-pos.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 87 KiB |
8
source.config.ts
Normal file
8
source.config.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { defineConfig, defineDocs } from 'fumadocs-mdx/config';
|
||||
|
||||
// Semua artikel ada di folder content/docs
|
||||
export const docs = defineDocs({
|
||||
dir: 'content/docs',
|
||||
});
|
||||
|
||||
export default defineConfig();
|
||||
25
tsconfig.json
Normal file
25
tsconfig.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"paths": {
|
||||
"@/.source": ["./.source/index.ts"],
|
||||
"@/*": ["./*"]
|
||||
},
|
||||
"plugins": [{ "name": "next" }]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user