5 ms·
Kudos to the creators for getting the CMS field definitions right by allowing arbitrary amounts and types of fields! It's so annoying to me that so many CMS's
by jordanlev 10y ago
Kudos to the creators for getting the CMS field definitions right by allowing arbitrary amounts and types of fields!
It's so annoying to me that so many CMS's and static site generators start out with the assumption of 1 big rich text / markdown "body" for content and treat everything else on the page as miscellaneous stuff (meta-fields, yaml front-matter, etc).
- devmunchies 10y agoSorry, I've never used a CMS or managed a blog... but I'm curious about the use case and benefits of having arbitrary fields. Is it for meta information about a post? Are those fields injected into a post somehow? How are those fields used? (I'm ignorant of CMSs)
- chickenfries 10y agoImagine the case of a generic news article: the body of the post can contain text, photos, pull quotes, videos, a slideshow, audio content, etc. The CMS needs to enable users to add all of that content and expose via the API to multiple clients (web, mobile, feeds, etc).
- justincormack 10y agoI always thought that fields are generally poor for that - html is pretty good and has ways to structure all those things, and they can be extracted and styled for different clients.
- CognitiveLens 10y agoHTML as a data entry format is error prone, and HTML as a cross-platform data source requires a lot of tooling and unreliability compared with a properly-structured field-driven JSON API
- rapind 10y agoIf you have the luxury of convincing your users to learn markdown instead of structured fields you'll have a far simpler and extendable solution. Obviously rarely the case, but worth having the conversation.
- justincormack 10y agoAny decent CMS would add tooling there (yes, they don't they just treat the HTML is WYSIWYG, but that is where the tooling should be)
- tyingq 10y agoYou can still do that with most field oriented CMS packages. The field interface is generally admin facing only. The user facing html templates have variables that map back to those fields. So, all the expression of HTML, but with the actual data in fields. Handy for things like addresses. You can render a map or just text, or both. The fact that it's structured data would allow for proximity searching. Where each "post" is say, a restaurant location. Similar for things like tags, so that you have built in taxonomy. Separate spaces for tags too, so that you could have a topic taxonomy as well as a completely separate taxonomy that doesn't pollute that space. Like an author taxonomy or similar.
- justincormack 10y agoIt generally limits you though, eg one video per article etc.
- tyingq 10y agoDepends on the CMS. Many have repeating fields that you reference in an array style notation from templates, or via loops. Others allow content relationships, where videos are their own object, set not to be published alone, but embeddable into, say posts.