3

I plan to use Directus as a database wrapper to add some CMS functionalities in my site. I can also use Directus to manage images of my site. However to edit some of the static HTML content, can I also use either Directus or some extensions of it? I did not find relevant information so I planned to build something from scratch with "trix" editor.

Any advice will help! Many thanks in advance (dramatically late in my project).

RANGER
  • 1,643
  • 2
  • 17
  • 31

1 Answers1

4

Directus is meant to manage content/data, but not the website design and full HTML pages. That said, there are several interfaces (like the wysiwyg editor) that allow you to update some HTML content... such as formatted rich text (eg: a blog article).

To be clear, you can also use Directus to update all of your site's HTML, but this is done through templating logic, not by storing/editing HTML directly in the CMS. The basic idea here is that you would loop over items in the CMS to add the markup in the template, and then let the site's CSS style that appropriately.

Here are a few of the many reasons this is a good thing:

  • It ensures the project's design system is not changed/broken by content authors
  • It allows content to be re-used on other properties, even if they aren't HTML
  • It makes it easier to change the design/presentation in the future, since you don't have to touch the underlying content foundation.
  • It lets you use the same platform as more than just a CMS. It can also be your CRM, project management tool, inventory system, or anything else that is data-driven.
  • It reduces complexity and the need for training. Since you don't design and build your entire site in the CMS, things are a lot cleaner and more intuitive.

You can check out the code on this example blog repo to see one way of doing things (handlebars)... but the real advantage of Headless CMS is that you can build things however you want. :)

https://github.com/directus/blog-template/blob/master/src/index.hbs

RANGER
  • 1,643
  • 2
  • 17
  • 31