Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@tinacms/api-git
Advanced tools
yarn add @tinacms/api-git
const express = require('express')
const cors = require('cors')
const gitApi = require('@tinacms/api-git')
const server = express()
server.use(cors())
server.use('/___tina', gitApi.router())
server.listen(port, err => {
if (err) throw err
console.log(`> Ready on http://localhost:${port}`)
})
const path = require('path')
const REPO_ABSOLUTE_PATH = path.join(process.cwd(), '../..')
const options = {
pathToRepo: REPO_ABSOLUTE_PATH,
pathToContent: 'docs',
defaultCommitMessage: 'Edited with TinaCMS',
defaultCommitName: 'TinaCMS',
defaultCommitEmail: 'git@tinacms.org',
pushOnCommit: false,
}
server.use('/___tina', gitApi.router(options))
pathToRepo
: The base-path to the repository where the content is stored in. Default: The repository root.pathToContent
: The directory to the root of your app within the repository. Default: The repository root. This can be useful for monorepos, when you have multiple sites within one repository.defaultCommitMessage
: The default commit message. Default: ‘Edited with TinaCMS’defaultCommitName
: The default git user name.defaultCommitEmail
: The default git user email.pushOnCommit
: Indicates if every commit should also be pushed automatically. Default: true.The following environment variables can be configured:
GIT_REMOTE
SSH_KEY
GIT_REMOTE
: Git remote where to push/pull from.SSH_KEY
: Base64-encoded SSH key (with write access).FAQs
## Installation
The npm package @tinacms/api-git receives a total of 228 weekly downloads. As such, @tinacms/api-git popularity was classified as not popular.
We found that @tinacms/api-git demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.