Docusaurus Documentation

website·Indexed 30 days ago

https://docusaurus.renouc.cn

Documentation for Docusaurus, a static-site generator for building documentation websites. Includes tutorials on creating React and Markdown pages, blog posts, and managing i18n and versioning. Also features API schema references for Book, BookBase, and CategorizedBook, and guides for app and theme development, including Liquid basics.

Tokens
11.5K
Snippets
89
Records
113
Agent score
48%

What's inside Docusaurus

  1. Understand Shoplazza Theme basics and characteristics

    A Shoplazza theme allows for the customization of an online store's appearance and style. To ensure a high-quality user experience and merchant utility, themes should implement the following characteristics: responsive design for all devices, easy customization for merchants, high performance (fast loading/rendering), web accessibility compliance, and SEO optimization.
  2. Understand Shoplazza App capabilities

    A Shoplazza app is a custom tool used to extend the platform's functionality. Apps can be integrated into multiple areas of the ecosystem, including the admin panel, the online store, and the checkout page.
  3. Understand Shoplazza App capabilities

    A Shoplazza app is a custom tool designed to extend the platform's functionality. Apps can be integrated into multiple areas of the ecosystem, including the admin panel, the online store, and the checkout page.
  4. Understand Shoplazza Theme development basics

    A Shoplazza theme is used to customize the appearance and style of an online store. To build a high-quality theme, developers should focus on five key characteristics: responsive design across all devices, ease of customization for merchants, high performance (fast loading/rendering), web accessibility compliance, and SEO optimization.
  5. Set up the Shoplazza theme development environment

    To develop Shoplazza themes, the following tools and languages are recommended:

    • Liquid: The standard template language used for Shoplazza themes.
    • Themekit: The primary theme development tool for Shopify/Shoplazza.
    • Node.js: Used for managing dependencies and build tools.
    • Git: Used for version control.
  6. Create a Shoplazza App and obtain API keys

    To begin developing for Shoplazza, follow these steps to set up your environment and get the necessary credentials:

    1. Register a Developer Account: Create an account on the Shoplazza Developer Platform.
    2. Create an App: Log in to the platform, select "Create New App", and provide the required basic information: App name, App description, and App icon.
    3. Retrieve API Keys: Once the app is created, Shoplazza provides a unique API key required for all communications with the Shoplazza API.
  7. Install and initialize a new Docusaurus site

    To create a new Docusaurus site using the classic template, run the npm init docusaurus@latest command. This command generates the project structure and installs all necessary dependencies. You must have Node.js version 18.0 or above installed on your system.
    npm init docusaurus@latest my-website classic
  8. Set up the Shoplazza app development environment

    To begin developing a Shoplazza app, ensure Node.js and npm are installed on your system and create a dedicated project directory.
    # Verify Node.js and npm installation
    node --version
    npm --version
    
    # Create and enter project directory
    mkdir my-app
    cd my-app
  9. Use React components in Markdown via MDX

    Docusaurus supports MDX, allowing you to export and use React components directly within your Markdown files to create interactive documentation.
    export const Highlight = ({children, color}) => (
      <span
        style={{
          backgroundColor: color,
          borderRadius: '20px',
          color: '#fff',
          padding: '10px',
          cursor: 'pointer',
        }}
        onClick={() => {
          alert(`You clicked the color ${color} with label ${children}`)
        }}>
        {children}
      </span>
    );
    
    This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !
  10. Follow the Shoplazza theme creation workflow

    The general process for creating and publishing a Shoplazza theme follows these steps:

    1. Learn the Liquid template language basics.
    2. Set up the development environment (Node.js, Git, Themekit).
    3. Create the basic theme structure.
    4. Customize the visual appearance.
    5. Perform cross-device testing.
    6. Submit the completed theme to the Shoplazza marketplace.
  11. Create a new documentation version in Docusaurus

    Use the Docusaurus CLI to snapshot the current state of your docs folder into a versioned directory. Running this command copies the docs folder into versioned_docs/version-{versionName} and creates or updates a versions.json file.

    After creating a version (e.g., '1.0'), the versioned docs are available at /docs/, while the current unreleased docs are moved to /docs/next/.

    npm run docusaurus docs:version 1.0