This is a Next.js application generated with Create Fumadocs.
It is a Next.js app with Static Export configured.
Run development server:
npm run dev
# or
pnpm dev
# or
yarn devOpen http://localhost:3000 with your browser to see the result.
To enable the contact form functionality, you need to configure SMTP settings. Create a .env.local file in the root directory:
cp .env.example .env.localThen configure the following environment variables:
# SMTP Configuration for Contact Form
SMTP_HOST=smtp.example.com # SMTP server hostname (e.g., smtp.gmail.com, smtp.sendgrid.net)
SMTP_PORT=587 # SMTP server port (587 for TLS, 465 for SSL)
SMTP_SECURE=false # Use secure connection (true for SSL on port 465, false for TLS on port 587)
SMTP_USER=your-email@example.com # SMTP authentication username
SMTP_PASS=your-password # SMTP authentication password or app-specific password
SMTP_FROM=noreply@magistrala.absmach.eu # Email address to send from (defaults to SMTP_USER if not set)
CONTACT_EMAIL=contact@magistrala.absmach.eu # Email address to receive contact form submissions# Base URL of your website (used in email templates)
NEXT_PUBLIC_BASE_URL=https://magistrala.absmach.euGmail:
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-specific-passwordNote: For Gmail, you need to create an App Password instead of using your regular password.
SendGrid:
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=apikey
SMTP_PASS=your-sendgrid-api-keyAWS SES:
SMTP_HOST=email-smtp.us-east-1.amazonaws.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=your-ses-smtp-username
SMTP_PASS=your-ses-smtp-passwordIn the project, you can see:
lib/source.ts: Code for content source adapter,loader()provides the interface to access your content.lib/layout.shared.tsx: Shared options for layouts, optional but preferred to keep.
| Route | Description |
|---|---|
app/(home) |
The route group for your landing page and other pages. |
app/(home)/contact |
Contact form page with email functionality. |
app/docs |
The documentation layout and pages. |
app/api/search/route.ts |
The Route Handler for search. |
app/api/contact/route.ts |
The Route Handler for contact form submissions. |
A source.config.ts config file has been included, you can customise different options like frontmatter schema.
Read the Introduction for further details.
To learn more about Next.js and Fumadocs, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- Fumadocs - learn about Fumadocs