Docs

v.Latest
Introduction
Core Concepts
Querying Content
Editing
Customizing Tina
Going To Production
Media
Drafts
Guides
Further Reference

CMS Hosting

One of the main differences between Forestry.io and TinaCMS is how you access the CMS. In Forestry, you access the CMS via our hosted environment (app.forestry.io).

In TinaCMS, the CMS frontend is hosted alongside your site. This pattern is comparable to Forestry's "remote-admin" feature, which allows you to access the CMS from your site's URL.

To set this up, your site's build script will change to something like:

- build: hugo
+ build: tinacms build && hugo

The tinacms build step outputs the TinaCMS dashboard SPA in your site's build directory.

Once TinaCMS is setup, your editors will access the CMS via (<your-site-url>/admin)

Extra flexibility

By having the CMS-frontend hosted within your site, you have more flexibility/control over your CMS behaviour. Write custom field components, create custom field validations, reuse your schema models, etc.

For example, here's how you might go about creating a custom "read-only field"

//config.js
// ...
const ReadonlyTextField = wrapFieldsWithMeta(({ input }) => {
return <input type="text" disabled className={textFieldClasses} {...input} />
})
export default defineSchema({
collections: [
{
label: 'Post',
name: 'post',
path: 'posts',
fields: [
{
label: 'Title',
name: 'title',
type: 'string',
},
{
label: 'identifier',
name: 'identifier',
type: 'string',
ui: {
component: ReadonlyTextField,
},
},
],
},
],
})
Last Edited: January 1, 1970
Table of Contents