Static Content

Managing blogs and static pages in NestSaaS

Static Content

NestSaaS provides powerful tools for managing static content such as blogs, landing pages, and documentation. This section covers how to create, organize, and customize your static content.

Overview

Static content in NestSaaS is managed through:

  1. MDX files in the content directory
  2. Static pages in the app directory
  3. The admin interface for content management

Blog Management

NestSaaS includes a full-featured blog system with support for:

  • Markdown and MDX content
  • Categories and tags
  • Featured images
  • Author profiles
  • SEO optimization
  • Comments (optional)

Blog Structure

Blog posts are stored in the content/posts directory as MDX files with frontmatter:

---
title: My First Blog Post
description: A brief description of the post
date: "2025-05-01"
image: /images/blog/featured-image.jpg
authors:
  - authorUsername
categories:
  - category-slug
tags:
  - tag1
  - tag2
---
 
Your blog content goes here...

Creating Blog Posts

You can create blog posts in two ways:

  1. Using the Admin Interface: Navigate to Content > Blog > New Post
  2. Creating MDX Files: Add new files to the content/posts directory

Learn more about blog management

Static Pages

Static pages are used for content that doesn't change frequently, such as:

  • Landing pages
  • About pages
  • Contact pages
  • Terms and conditions
  • Privacy policy

Creating Static Pages

You can create static pages in two ways:

  1. Next.js Pages: Create pages in the app directory
  2. MDX Pages: Create MDX files in the content/pages directory

Example Static Page (Next.js)

// app/about/page.tsx
import { Metadata } from 'next'
 
export const metadata: Metadata = {
  title: 'About Us',
  description: 'Learn more about our company',
}
 
export default function AboutPage() {
  return (
    <div className="container mx-auto py-12">
      <h1 className="text-4xl font-bold mb-6">About Us</h1>
      <p className="text-lg">Your content here...</p>
    </div>
  )
}

Example Static Page (MDX)

---
title: About Us
description: Learn more about our company
---
 
# About Us
 
Your content here...

Learn more about static pages

Documentation

NestSaaS includes a documentation system based on MDX files, perfect for:

  • Product documentation
  • Knowledge bases
  • Tutorials
  • API documentation

Documentation Structure

Documentation is stored in the content/docs directory, organized into folders:

content/docs/
├── index.mdx                # Main documentation page
├── getting-started/         # Section folder
│   ├── index.mdx            # Section index
│   ├── installation.mdx     # Article
│   └── configuration.mdx    # Article
└── features/                # Another section
    ├── index.mdx
    └── feature-1.mdx

Learn more about documentation

Content Organization

Categories and Tags

Categories and tags help organize your content:

  • Categories: Broad groupings for content (e.g., "Technology", "Marketing")
  • Tags: More specific labels (e.g., "React", "SEO", "Tutorial")

Configure navigation menus in the config/navigation.ts file:

export const mainNavigation = [
  {
    title: "Home",
    href: "/",
  },
  {
    title: "Blog",
    href: "/blog",
  },
  {
    title: "About",
    href: "/about",
  },
]

SEO Optimization

NestSaaS includes built-in SEO features:

  • Metadata management
  • Open Graph tags
  • JSON-LD structured data
  • Sitemaps
  • RSS feeds

Configure default SEO settings in config/site.ts:

export const siteConfig = {
  name: "Your Site Name",
  description: "Your site description",
  url: "https://yourdomain.com",
  ogImage: "https://yourdomain.com/og-image.jpg",
}

Next Steps

On this page