2022-09-30 08:34:29 -04:00
< div align = "center" >
2022-10-02 20:06:20 -04:00
< img src = "static-cms-logo.png" width = "500px" / >
2021-03-02 16:33:32 -06:00
2022-10-02 20:06:20 -04:00
[![GitHub license ](https://img.shields.io/badge/license-MIT-blue.svg )](https://github.com/StaticJsCMS/static-cms/blob/main/LICENSE)
[![npm latest package ](https://img.shields.io/npm/v/@staticcms/core/latest.svg )](https://www.npmjs.com/package/@staticcms/core)
[![PRs Welcome ](https://img.shields.io/badge/PRs-welcome-brightgreen.svg )](https://github.com/StaticJsCMS/static-cms/blob/main/CONTRIBUTING.md)
2022-09-30 06:13:47 -06:00
< / div >
2021-03-02 16:33:32 -06:00
2022-10-02 20:06:20 -04:00
[staticjscms.github.io/static-cms ](https://www.staticjscms.github.io/static-cms/ )
2019-10-22 21:11:49 -04:00
2019-10-22 21:08:56 -04:00
A CMS for static site generators. Give users a simple way to edit
and add content to any site built with a static site generator.
2019-10-22 21:14:43 -04:00
## Community Chat
2019-04-06 03:05:44 +05:00
## How It Works
2016-06-05 12:48:28 -07:00
2022-10-02 20:06:20 -04:00
Static CMS is a single-page app that you pull into the `/admin` part of your site.
2016-06-05 12:48:28 -07:00
It presents a clean UI for editing content stored in a Git repository.
You setup a YAML config to describe the content model of your site, and typically
tweak the main layout of the CMS a bit to fit your own site.
2019-04-06 03:05:44 +05:00
When a user navigates to `/admin/` they'll be prompted to log in, and once authenticated
2017-03-17 16:12:25 +00:00
they'll be able to create new content or edit existing content.
2016-09-20 11:29:45 -03:00
2022-10-02 20:06:20 -04:00
Read more about Static CMS [Core Concepts ](https://www.staticjscms.github.io/static-cms/docs/intro/ ).
2016-09-20 11:29:45 -03:00
2017-02-08 16:29:15 -02:00
# Installation and Configuration
2016-09-20 11:29:45 -03:00
2022-10-02 20:06:20 -04:00
The Static CMS can be used in two different ways.
2016-09-20 11:29:45 -03:00
2019-10-24 03:58:41 +10:00
* A Quick and easy install, that requires you to create a single HTML file and a configuration file. All the CMS JavaScript and CSS are loaded from a CDN.
2022-10-02 20:06:20 -04:00
To learn more about this installation method, refer to the [Quick Start Guide ](https://www.staticjscms.github.io/static-cms/docs/quick-start/ )
2018-08-14 11:33:13 -06:00
* A complete, more complex install, that gives you more flexibility but requires that you use a static site builder with a build system that supports npm packages.
2017-01-22 13:09:20 +00:00
2022-10-02 20:06:20 -04:00
# static-cms-core
2022-09-30 06:13:47 -06:00
2022-09-30 08:32:04 -04:00
## Installation
2022-10-02 20:06:20 -04:00
`npm install @staticcms/core`
2022-09-30 08:32:04 -04:00
2022-09-30 06:13:47 -06:00
## Setup
```tsx
import React from 'react';
import {
AzureBackend,
BitbucketBackend,
BooleanWidget,
CodeWidget,
ColorStringWidget,
DateTimeWidget,
FileWidget,
GitGatewayBackend,
GitHubBackend,
GitLabBackend,
imageEditorComponent,
ImageWidget,
ListWidget,
MapWidget,
MarkdownWidget,
2022-10-02 20:06:20 -04:00
StaticCmsCore as CMS,
2022-09-30 06:13:47 -06:00
NumberWidget,
ObjectWidget,
ProxyBackend,
RelationWidget,
SelectWidget,
StringWidget,
TestBackend,
TextWidget,
locales,
Icon,
images
2022-10-02 20:06:20 -04:00
} from '@static-cms/static-cms-core';
2022-09-30 06:13:47 -06:00
// Register all the things
CMS.registerBackend('git-gateway', GitGatewayBackend);
CMS.registerBackend('azure', AzureBackend);
CMS.registerBackend('github', GitHubBackend);
CMS.registerBackend('gitlab', GitLabBackend);
CMS.registerBackend('bitbucket', BitbucketBackend);
CMS.registerBackend('test-repo', TestBackend);
CMS.registerBackend('proxy', ProxyBackend);
CMS.registerWidget([
StringWidget.Widget(),
NumberWidget.Widget(),
TextWidget.Widget(),
ImageWidget.Widget(),
FileWidget.Widget(),
SelectWidget.Widget(),
MarkdownWidget.Widget(),
ListWidget.Widget(),
ObjectWidget.Widget(),
RelationWidget.Widget(),
BooleanWidget.Widget(),
MapWidget.Widget(),
DateTimeWidget.Widget(),
CodeWidget.Widget(),
ColorStringWidget.Widget(),
]);
CMS.registerEditorComponent(imageEditorComponent);
CMS.registerEditorComponent({
id: 'code-block',
label: 'Code Block',
widget: 'code',
type: 'code-block',
});
CMS.registerLocale('en', locales.en);
Object.keys(images).forEach(iconName => {
CMS.registerIcon(iconName, < Icon type = {iconName} / > );
});
```
2018-10-24 18:45:57 -05:00
# Contributing
2022-10-02 20:06:20 -04:00
New contributors are always welcome! Check out [CONTRIBUTING.md ](https://github.com/StaticJsCMS/static-cms/blob/main/CONTRIBUTING.md ) to get involved.
2018-10-24 18:45:57 -05:00
2017-02-08 16:29:15 -02:00
# Change Log
2016-09-20 11:29:45 -03:00
2017-09-14 01:08:43 +02:00
This project adheres to [Semantic Versioning ](http://semver.org/ ).
2022-10-02 20:06:20 -04:00
Every release is documented on the Github [Releases ](https://github.com/StaticJsCMS/static-cms/releases ) page.
2016-09-20 11:29:45 -03:00
2017-02-08 16:29:15 -02:00
# License
2016-09-20 11:29:45 -03:00
2022-10-02 20:06:20 -04:00
Static CMS is released under the [MIT License ](LICENSE ).
2017-02-08 16:29:15 -02:00
Please make sure you understand its [implications and guarantees ](https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html ).
2016-11-11 16:19:25 -08:00
2022-09-30 08:20:36 -04:00
# Netlify CMS
2022-10-02 20:06:20 -04:00
Static CMS is a fork of Netlify CMS focusing on the core product over adding massive new features.
2022-09-30 08:20:36 -04:00
2018-04-11 17:47:23 -04:00
# Thanks