Skip to content

Studio-Lemon/wp-lemon-docs

Repository files navigation

wp-lemon Documentation

Official documentation for wp-lemon - your go-to WordPress theme framework for creating good looking and lean websites.

📚 About

This repository contains the documentation for wp-lemon, built with Docusaurus. The documentation covers everything from setup and basic usage to advanced topics like custom blocks, hooks, and extending functionality.

View the live documentation: https://studio-lemon.github.io/wp-lemon-docs/

🚀 Quick Start

Prerequisites

  • Node.js 18.0 or higher
  • npm or yarn

Installation

npm install

Development

Start the development server:

npm start

This will start a local development server at http://localhost:3000 with live reloading.

Build

Build the static site:

npm run build

The static files will be generated in the build directory.

Serve Built Site

Preview the built site locally:

npm run serve

📝 Contributing to Documentation

We welcome contributions to improve the documentation! This section explains how to write and structure documentation for wp-lemon.

Documentation Structure

Documentation files are organized in the docs/ directory:

docs/
├── index.mdx                    # Homepage
├── requirements.mdx             # System requirements
├── setup.mdx                    # Setup guide
├── getting-started.mdx          # Getting started guide
├── basics/                      # Basic concepts
├── blocks/                      # Block development
├── working-with-posts/          # Post types and taxonomies
├── extend/                      # Extending functionality
├── reference/                   # API reference (auto-generated)
└── migrations/                  # Migration guides

Writing Documentation

  1. Create a new file: Add a .mdx file in the appropriate directory
  2. Add frontmatter: Include title and optional description
---
title: "Your Page Title"
description: Optional description for SEO
---

# Your Content Here

Write your documentation using Markdown/MDX syntax.
  1. Update sidebar: Add your new page to sidebars.ts
{
  type: 'category',
  label: 'Your Category',
  items: [
    'path/to/your-file',
  ],
}

Auto-Generated Documentation

Some documentation is automatically generated from the wp-lemon codebase and synced to this repository. These files should not be edited manually as they will be overwritten.

The Sync Script

The sync-helper-functions.js script synchronizes generated markdown files from the generated/ directory into the docs/reference/ directory. This ensures that API documentation is always up-to-date.

How it works:

  1. Generated markdown files are created by tools in the main wp-lemon repository
  2. These files are placed in the generated/ directory
  3. The sync script reads these files and copies them to docs/reference/
  4. The script applies formatting fixes and adds proper frontmatter
  5. The resulting .mdx files are ready for Docusaurus

Running the sync script:

npm run sync-docs

The sync script runs automatically during the build process (via prebuild script).

Files managed by sync script:

  • API Functions: generated/helper-functions.mddocs/reference/helper-functions.mdx
  • Query Functions: generated/query-functions.mddocs/reference/query-functions.mdx
  • JavaScript Functions: generated/javascript.mddocs/reference/javascript-functions.mdx
  • Hooks: generated/hooks/*.mddocs/reference/hooks/*.mdx
  • Classes: generated/reference/*.mddocs/reference/classes/*.mdx
  • Twig: generated/twig-*.mddocs/reference/twig-*.mdx

See SYNC-DOCS.md for more details about the sync process.

Style Guidelines

  • Use clear, concise language
  • Include code examples where appropriate
  • Use proper Markdown formatting
  • Add links to related documentation
  • Use admonitions for important notes:
:::tip
Helpful tip here
:::

:::warning
Warning message here
:::

:::danger
Critical warning here
:::

🛠 Technology Stack

  • Docusaurus - Documentation framework
  • React - UI framework
  • MDX - Markdown with JSX support
  • Prism - Syntax highlighting

📄 License

MIT License - see LICENSE file for details

🤝 Support


Built with ❤️ by Studio Lemon

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5