amelki / cms-json Goto Github PK
View Code? Open in Web Editor NEWA lightweight CMS that loads and stores its data from/to a JSON file
License: MIT License
A lightweight CMS that loads and stores its data from/to a JSON file
License: MIT License
Be able to create different types of objects in a list or in an object map.
Eg:
{ assets: { key1: { type: "image", src: "foo.png", width: "100px", height: "100px" }, key2: { type: "link", url: "http://helloworld.com", target: "_blank" } } }
It should be easier to start the server without any schema/data file - building them from scratch.
One should be able to export a data file from the UI
Deep linking does not persist on reload (e.g. navigating directly to /node/pages results in blank page.)
I'm trying to create a model that allows a user to enter in a comma-separated list of items which will then populate data.json
with an array. Looking at the available types, I don't really see a clear cut way to do this.
First off, I think this is a great project you're working on! Perfect for small-infrequently changing websites like I need. I'm having some issues getting up and running though.
save
triggers a 404 and no data is saved. URL changes to http://localhost:3001/node//new_tree#
and UI goes blank/node/pages
results in blank page.)Thank you so much!
When setting the type to a number, nothing happens and it remains a string. The number type also does not appear in the drop down list.
@amelki would be a great help if you could deploy a quick update to fix this :)
List items often need to be ordered (think header nav links for instance). The UI should allow ordering via drag and drop.
Use case:
I'd like to be able to create different pages with components
Issue:
At the child level the array only supports strings, so there is no way to create a different page layout as far as I can tell
Desired outcome
Being able to generate something like the following would be great:
"pages": [
{
"key": "Home",
"heading": "Home Page",
"items": [
{
"id": "1"
"type": "carousel",
"images": [
{ src: "", alt: ""},
]
},
{
"key": "2",
"type": "table",
"title": "my table"
"items": [
{
"type": "tableRow"
"title": "My title",
"description": "My description"
}
]
}
]
},
{
"key": "About Us Page",
"heading": "About Us",
"items": [
{
"key": "2",
"type": "image",
"src": "",
"alt": "",
"caption": "My image caption"
},
{
"id": "1"
"type": "markdown",
"markdown": "My markdown text"
}
]
}
]
Currently, a field can only have a primitive type (string, string[], boolean).
It should be possible to define some sub-objects and arrays of sub-objects and use them as field types
eg:
{ pages: [ home: { title: "Home Page", seo: { keywords: ["foo", "bar", "hux"], canonicalUrl: "http://acme.com/home" } } ] }
Hey there. I tried to run it but getting error
module.js:549
throw err;
^
There should only be one 'Add node' button, instead of the current 'Add Node', 'Add List', 'Add String Map', 'Add Object Map'.
The selection of the type of node to add should be done in a dialog, that would better explain what each type of node is about.
Hello, is there please a way to access the data via rest API: cms-json --schema data/schema.json --data data/data.json --port 3000
?
Or do I have to use a json-server for that json-server data/data.json --port 3001
?
curl "http://localhost:3000/node/meetings"
curl "http://localhost:3000/meetings"
Thanks.
@amelki, the domain (i.e. tenorcms.com) for your playground link seems to have expired this week.
If one define:
{ pages: [ home: { title: "Home page", content: "the content" } ] }
It would be very convenient to be able to create another node under 'pages' (eg 'about') that obey to the same structure (same fields, same subtree).
This would mean supporting JSON schema definitions/$ref, and be able to define and use these via the UI.
Hey, stumbled upon this and it seems like something I would have a need for. I do have a few questions if you would be kind enough to answer :)
My use-case would be a single-deploy react + node app, where the backend would consist of pretty much only the json-cms. I would imagine using it something like this:
As for the questions:
Thanks in advance :)
hitting save triggers a 404 and no data is saved
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.