TinaCMS Documentation and Website

repository·main·Indexed 43 days ago

https://github.com/tinacms/tina.io

The official website and documentation hub for TinaCMS. This repository serves as a showcase for TinaCMS capabilities and includes tools for documentation validation, such as reference checkers, a content auditor using LLMs, and implementation guides for A/B testing and content-creator plugins.

Tokens
307.9K
Snippets
843
Records
1.3K
Agent score
50%

What's inside TinaCMS

  1. Overview of Self-Hosting TinaCMS

    main

    Self-hosting TinaCMS allows you to run your own CMS backend instead of using TinaCloud. This gives you full control over your database, authentication, and Git integration.

    When self-hosting, you configure an API function to serve as your backend service. This function exposes a GraphQL endpoint for your content and handles all aspects of authentication and authorization. The backend is designed to be compatible with any Node.js serverless environment, such as Vercel or Netlify.

  2. Overview of TinaCMS CLI commands

    main

    The TinaCMS CLI provides several commands to manage your development environment, build your site, and maintain your schema.

    Core Commands:

    • dev: Compiles the schema and starts a local GraphQL server for development.
    • build: Compiles/validates the schema and generates client/types for production.
    • init: Initializes TinaCMS in an existing project (installs dependencies and creates a basic schema).
    • audit: Checks files for schema errors and incorrect extensions.
    • search-index: Builds and uploads the search index to TinaCloud.
    • doctor: Checks if your installed TinaCMS packages are up to date.
    • help: Displays help information.
    $ tinacms <command>
  3. What is TinaCMS?

    main

    TinaCMS is an open-source, Git-backed headless content management system (CMS). Unlike proprietary databases (e.g., WordPress, Contentful, Sanity), TinaCMS stores content as Markdown, MDX, and JSON files directly within your Git repository. This allows you to manage content with the same version control and developer workflows used for your code.

    Key Features:

    • Headless Architecture: Decoupled from your website; it provides a queryable content API that your website consumes.
    • Git-Backed: All changes made in the CMS are committed back to your Git repository.
    • Visual Editing: For React-based sites, TinaCMS supports real-time visual editing, allowing editors to see changes as they happen.
    • Flexible Hosting: You can use TinaCloud (a hosted backend) or host the backend entirely on your own stack.
    • Content Modeling: Define content types using a tina/config.ts file via "collections".
    • Data Fetching: Access content via a powerful GraphQL API and a generated, type-safe client.
  4. Understand the Starter Project Structure

    main

    The starter project follows a standard Next.js structure with additional directories for data and components:

    • components/: Stores React components used throughout the blog.
    • data/: Contains blog configuration and other data (e.g., config.json).
    • pages/: Contains the file-based routes for the application.
    • public/: Holds static assets like images that are accessible from the base URL /.
    • styles/: Contains CSS files, including component-level CSS modules.
    my-nextjs-blog
    ├── components/
    ├── data/
    ├── pages/
    ├── public/
    └── styles/
  5. Assess TinaCMS service availability in China

    main

    If you are developing or deploying TinaCMS projects from mainland China without a VPN, the following service availability applies:

    ServiceStatusNotes
    TinaCMS CLI✅ AccessibleFull functionality
    TinaCloud✅ AccessibleFull functionality
    Tina.io✅ AccessibleFull functionality
    GitHub⚠️ SlowAccessible but slow
    Static Site Hosting❌ Not usableDeployed instances (Vercel, Netlify, GitHub Pages) are unreachable due to DNS issues

    While the core TinaCMS tools (CLI, Cloud, and Documentation) work as expected, the primary challenge is that standard static hosting platforms like Vercel or Netlify cannot be reached by users in China.

  6. Self-hosting TinaCMS overview

    main
    Self-hosting TinaCMS allows you to run your own CMS backend independently of TinaCloud. This gives you full control over your database, authentication, and Git integration. The backend is designed to be compatible with any Node.js serverless environment (e.g., Vercel, Netlify) by configuring a single API function that exposes a GraphQL endpoint and handles authentication/authorization.
  7. TinaCloud pricing and support

    main

    Pricing

    TinaCloud is currently free until the public release. A 'forever free' plan for personal use is planned. Users with large-team use cases may be contacted regarding paid plans.

    Support and Feedback

    • Documentation: Check the official docs for answers.
    • Community: Join the Discord server.
    • Email: Contact support@tina.io for help or to schedule a chat.
    • Dashboard: Use the chat widget located at the bottom left of the TinaCloud dashboard.
  8. Compare TinaCMS features with Forestry

    main

    This document provides a comparison of features available in Forestry that are currently missing or implemented differently in TinaCMS.

    Note: This information is considered out of date and is not actively maintained. For the most current status of features, refer to the TinaCMS GitHub discussions or the official roadmap.

    Feature Implementation Status

    Some features listed as 'missing' are actually supported via alternative methods in TinaCMS:

    • Drafts (Hugo): Supported through the use of a "draft field". See the drafts documentation for details.
    • Readonly Documents (Sections/Collections): Supported by using a custom readonly field.
    • Include template field (Content Modeling): Supported natively due to TinaCMS's JS-based templates.

    If a feature you need is marked as Not Considering Support, you may be able to implement it yourself because the TinaCMS frontend is open source and supports community plugins.

  9. Key features of TinaDocs

    main

    TinaDocs provides a structured documentation environment with the following built-in capabilities:

    • Git-backed Content: All content lives in your GitHub repository as Markdown, ensuring version control and no vendor lock-in.
    • Fast Search: Uses PageFind for lightning-fast, client-side search that works offline without a backend.
    • OpenAPI Integration: Automatically generates interactive API documentation (including request/response schemas and examples) from your OpenAPI specifications.
    • Customizable Theming: Includes six pre-crafted themes and a system to customize colors and typography.
    • Standardized Components: Includes syntax-highlighted code blocks, callouts, accordions, and card grids.
    • SEO Optimization: Automatic handling of meta tags, structured data, and sitemap generation.
    • Complex Layouts: Supports multi-tabbed interfaces for organizing code examples or different implementation approaches.
  10. Understand the project structure

    main

    The starter project follows a standard Next.js structure with additional directories for data and components:

    • components/: Stores all React components used by the blog.
    • data/: Contains blog configuration and other data files (e.g., config.json).
    • pages/: Contains the file-based routes for the application.
    • public/: Holds static assets like images that are accessible via the root URL (e.g., /image.jpg).
    • styles/: Contains CSS modules and global styles.
  11. Supported frameworks for TinaCMS

    main

    TinaCMS's default 'Basic Editor' is compatible with a wide range of frameworks because it reads and writes file-based content such as Markdown, MDX, and JSON.

    Key Framework Details:

    • Astro is the recommended default framework for new projects. You can start there if you have no specific framework preference.
    • Visual Editing (real-time preview of changes) is supported in React-based frameworks (Next.js, React, etc.) and is also available in Astro via specific configurations even without a React page tree.
  12. What is a Draft Field in TinaCMS

    main
    A "Draft Field" is a manual approach to managing drafts in TinaCMS. It is not a special internal type; rather, it is a standard boolean field added to a collection schema that serves as a flag to indicate whether a document should be considered published or a draft. Because it is a standard field, you must manually handle the logic of filtering these documents out of your production queries or site builds.