Project Starters and Templates

    DatoCMS allows to turn an existing project into a ready-to-clone public template project allowing anyone to bootstrap a new project based off of yours.

    In this in-depth guide we will learn how to make a project public and how to create and configure a clone and deploy link or button to share your project.

    Turn a project into a public template

    Since projects might contain sensitive information they are all private by default. To make a project public, head to the project main page in the DatoCMS dashboard and switch on the Public template project option in the Danger Zone section.

    Important: From now on anyone will be able to clone the project, so make sure it doesn't contain any sensitive information!

    Generate a "Clone project" button

    The "Clone project" button helps users perform a complete clone of an existing DatoCMS project. Once clicked, they will see the following dialog, and at the end of the process a copy of the original project will be available on their dashboard:

    The "Clone project" dialog

    Use the form below to generate a ready-to-use clone button (the project ID can be retrieved inside the details page of the project):

    Use the following code to share the button on your README file or documentation:

    [![Clone DatoCMS project](https://dashboard.datocms.com/clone/button.svg)](https://dashboard.datocms.com/clone?projectId=YOUR-PROJECT-ID&name=YOUR-PROJECT-NAME)
    <a href="https://dashboard.datocms.com/clone?projectId=YOUR-PROJECT-ID&name=YOUR-PROJECT-NAME" target="_blank" rel="noopener">
      <img
        src="https://dashboard.datocms.com/clone/button.svg"
        alt="Clone DatoCMS project"
      />
    </a>
    https://dashboard.datocms.com/clone?projectId=YOUR-PROJECT-ID&name=YOUR-PROJECT-NAME
    clone project button

    Generate a "Project Starter" button

    Most of the time, a DatoCMS project is associated with a frontend project (website, application, etc.) that knows how to query for its content, and renders the result in a pleasant way to users. The "Project starter" button helps users deploy new sites from templates with one single click, performing the following actions for them:

    1. Clone a DatoCMS template project and put the copy inside the user account;

    2. Fork a Git repository containing the frontend project inside the Github account of the user;

    3. Build and publish the frontend online using a free hosting solution (Netlify, Vercel, Heroku, etc.)

    Check out our Marketplace to see some examples and a find a fine selection of polished Project Starters.

    The dialog that your users will see once they click on a Project Starter button

    Project Starters are composed of a DatoCMS template project, plus a Git repository containing a datocms.json configuration file that specifies both presentational metadata (name, preview image, URL of an example of a successful deployment) and the information necessary for creating a new project.

    You can use the form below to generate a datocms.json configuration file and a button to share the starter with the world:

    Result

    Copy the following code and add it to your Git repository in a file called datocms.json:

    {}

    Use the following code to share the button on your README file or documentation:

    [![Clone DatoCMS project](https://dashboard.datocms.com/clone/button.svg)](https://dashboard.datocms.com/deploy?repo=datocms/structured-text-demo:main)
    <a href="https://dashboard.datocms.com/deploy?repo=datocms/structured-text-demo:main" target="_blank" rel="noopener">
      <img
        src="https://dashboard.datocms.com/deploy/button.svg"
        alt="deploy project button"
      />
    </a>
    https://dashboard.datocms.com/deploy?repo=datocms/structured-text-demo:main
    deploy project button
    Supported deployment methods

    The deploymentType setting allows you to configure what deployment target can be used during the cloning process. By setting this value to copyRepo, DatoCMS will clone the template on a repository in the user org or account.

    Additionally, DatoCMS supports the following deployment types:

    • vercel

    • netlify

    • static (user can choose between Vercel and Netlify)

    • heroku

    When one of these is chosen, users will be asked to authenticate on the service and therefore they need an active and valid account. Once authorized, the DatoCMS integration will deploy the template repository to the service.

    Build command

    When the deployment type is either static, vercel, netlify or heroku, you must specify the build command that will be run during the deployment of the frontend repository. DatoCMS will forward the buildCommand to the deployment service which will use it to build the application.

    Project ID

    The project ID can be retrieved inside the details page of the project in your Dashboard:

    You can find your project ID in your dashboard