Skip to content

@indiekit/store-gitlab

GitLab content store adaptor for Indiekit.

Installation

npm install @indiekit/store-gitlab

Requirements

A GitLab personal access token with read and write permissions to a repository.

IMPORTANT

Store your personal access token in an environment variable called GITLAB_TOKEN so that only you and the application can see it.

Usage

Add @indiekit/store-gitlab to your list of plug-ins, specifying options as required:

json
{
  "plugins": ["@indiekit/store-gitlab"],
  "@indiekit/store-gitlab": {
    "user": "username",
    "repo": "reponame"
  }
}

Options

OptionTypeDescription
instancestringGitLab instance URL. Optional, defaults to https://gitlab.com.
projectIdstringGitLab project ID. Required (if user and repo not provided).
userstringYour GitLab username. Required (if projectId not provided).
repostringThe name of your GitLab repository. Required (if projectId not provided).
branchstringThe branch files will be saved to. Optional, defaults to main.
tokenstringA GitLab access token. Required, defaults to process.env.GITLAB_TOKEN.