views:

214

answers:

4

Is there a standard site structure format? The use of this would be for export and import into a CMS or framework to define the urls, content, metadata for a website. Something tool agnostic would be the goal.

JSON, YAML, XML, whatever. Maybe something like:

{
  'baseurl': 'http://example.com',
  'site': [
    {'slug': '/', 'title': 'ExampleCo. Inc.', 'content': 'Lorem ipsum\n\nEtc'},
    {'slug': '/about', 'title': 'About Our Company', 'content': 'Lorem ipsum\n\nEtc'},
    {'slug': '/services', 'title': 'Our Services', 'content': 'Lorem ipsum\n\nEtc'},
    {'slug': '/products', 'title': 'Products', 'content': 'Lorem ipsum\n\nEtc'},
    {'slug': '/products/purchase', 'title': 'Purchase Products Now', 'content': 'Lorem ipsum\n\nEtc', 'content': 'Lorem ipsum\n\nEtc'},
    {'slug': '/products/downloads', 'title': 'Downloads', 'content': 'Lorem ipsum\n\nEtc'},
    {'slug': '/contact', 'title': 'Contact Us', 'content': 'Lorem ipsum\n\nEtc'}
   ]
}

My thinking is that it would allow you to quickly populate a content management system or framework with a generic site navigational structure.

Does something like this exist?

+2  A: 

There is a proposed industry standard for a data exchange/interop format for WCMS (trying to find the link), however IMO it will not take off. Regardless, it is guaranteed that whatever data you're thinking about porting right now will be beyond stale by the time a format might arise, so you're best off just making one that solves your problem.

Rex M
Would love to see the link to whatever you have. I disagree that data would get stale. URL slug, title, content are common elements regardless of programming, etc.
artlung
@artlung *your* data will be stale, not the format of the data :)
Rex M
+1  A: 

I have come across a tool called zen which does something similar to what you're describing.

As for an already existing standard, no. CMSes are different beasts than layout/content specification languages which is what XHTML/CSS are.

As for uploading content into a CMS, most of them have an XMLRPC interface so you might just be able to use that.

Noufal Ibrahim
What's interesting is that there are formats for this, sort of, but for blog posts: http://codex.wordpress.org/Importing_Content has a lot of links -- so I'm mystified that there has not been a standard format for sites.
artlung
+3  A: 

Don't know if it really answers your question but there is a standard called CMIS that basically is a specification for syncing and exchanging content between CMSs. Alfresco, KnowledgeTree and a bunch of other commercial CMSs support it. Drupal supports it too through a contrib module. See http://en.wikipedia.org/wiki/Content_Management_Interoperability_Services

The spec has just been ratified less than a year ago i think.

redben
That is pretty interesting. It's not a static data format, but a mechanism for them to talk to each other. If you set up a reference CMS that spoke CMIS, then you theoretically sync out data to any new CMS you wanted to try. Not fully-baked, but I'm happy to see people starting to think about what a pain data-migration has become. Choose a CMS, and you're locked in. Thanks for the answer!
artlung
Thanks for the points :)
redben
A: 

Pretty much any CMS has a database interface so I would suppose an SQL dump would be pretty close to a generic format. You could then write some tools to map table/column names and datatypes between various CMS systems. If you used postgres you could even create views to mimic the structure of various CMS systems without actually changing any data. Of course the catch is that like CSV and XML, the format isn't as much of an issue as the data structure.

SpliFF
Raw data transposed sounds like an interesting start, but the mapping of tables to another format would still need to be done. Interesting thought, but not a simple operation.
artlung
Well you can use ETL tools to transform from one schema to another. But then angin, what about file (like images pdfs etc...) these don't go in the db...
redben
if a standard format ever did come about i'd bet on it not handling image or binary data directly. Very few data exchange formats do. Of course you can just Base64 the data and stick it in the dump if you don't mind 5+ gigabyte data files.
SpliFF