thombruce / helvellyn

An open source headless CMS with a customisable JSON API
MIT License
0 stars 0 forks source link

Ready to Go Nuxt Template #91

Open thombruce opened 4 years ago

thombruce commented 4 years ago

Presently for each new site I create, I'm cloning an existing project and modifying some variables...

I've reached a good point with this where most of the variables I'm changing are in the same place, and can also be set as ENV variables...

...but the Entities and custom fields do differ, which means some template modding and that's a little more work.

Desired Outcome

I should have an Open Source template here on GitHub which features:

...where in each case, the site can be built from a schema available via the API endpoint.

This schema should feature:

E.g.

{
  id: 1,
  slug: 'posts',
  fields: [
    {
      title: 'String',
      image: 'Upload',
      content: 'Rich Text',
    }
  ]
}

This is already highly achievable as it is the exact form of the data we currently store.

IF first field is 'String', treat it as a title class for display. 'Upload' should yield an img (we should add an 'Image' type as distinct, but have not yet). 'Rich Text' should yield a div with HTML content.

We also have 'Long Text' and 'Date' types to consider, and this doesn't offer us any help with consideration of created_at, updated_at and published_at... but we know they're there.

I do have plans to allow the user to mod the API JSON response... but... well, this won't be designed to work with that necessarily. It should be built to work specifically with default output...

Question: How do we know if an image is a post's featured image? Maybe title = first of 'String' type and img = first of 'Upload' type. Sounds reasonable to me. ... Anything else?

Additional Nuxt Features

The dynamically created pages and routes should also be present when nuxt generate is run. This shouldn't be too difficult to achieve.

thombruce commented 4 years ago

Template name ideas...

  1. HVN
  2. Nuxt by Helvellyn
  3. Helvellyn Nuxt

...

Helvellyn Nuxt is growing on me. Strictly it's more tangential than that name.. feels to me.. but it's not exactly a reserved idea like, say, Helvellyn iOS or Helvellyn Electron... which are less tangential and absolutely reserved.

Yeah, Helvellyn Nuxt.