Docusaurus Documentation
website·Indexed 30 days ago
https://docusaurus.renouc.cnDocumentation 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.
What's inside Docusaurus
- 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.
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.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.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.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.
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:
- Register a Developer Account: Create an account on the Shoplazza Developer Platform.
- 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.
- Retrieve API Keys: Once the app is created, Shoplazza provides a unique API key required for all communications with the Shoplazza API.
Install and initialize a new Docusaurus site
To create a new Docusaurus site using the classic template, run thenpm init docusaurus@latestcommand. 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 classicSet 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-appUse 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> !Create links in Docusaurus Markdown
Docusaurus supports standard Markdown links using either absolute URL paths or relative file paths to other documents.Let's see how to [Create a page](/create-a-page). Let's see how to [Create a page](./create-a-page.md).Follow the Shoplazza theme creation workflow
The general process for creating and publishing a Shoplazza theme follows these steps:
- Learn the Liquid template language basics.
- Set up the development environment (Node.js, Git, Themekit).
- Create the basic theme structure.
- Customize the visual appearance.
- Perform cross-device testing.
- Submit the completed theme to the Shoplazza marketplace.
Create a new documentation version in Docusaurus
Use the Docusaurus CLI to snapshot the current state of your
docsfolder into a versioned directory. Running this command copies thedocsfolder intoversioned_docs/version-{versionName}and creates or updates aversions.jsonfile.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