Val - content - super-charged - hard-coded
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Val is a CMS library where content is TypeScript / JavaScript files stored in your git repo.
As a CMS, Val is useful because:
• editors can change content without having to ask developers to do it for them (and nobody wants that)
• a well-documented way to structure content
• image, richtext, ... support is built-in
• built-in visual editing which lets editors click-then-edit content (and therefore code!) directly in your app
• an embedded studio which lets editors navigate the content structure and make updates there查看完整 README ↗Val is a CMS library where content is TypeScript / JavaScript files stored in your git repo.
As a CMS, Val is useful because:
But, with the benefits of hard-coded content:
Compared to other CMSs, Val has the following advantages:
However, checking in the 10 000th blog entry in git might feel wrong (though we would say it is ok).
Therefore, Val will add remote content support which enables you to seamlessly move content to the cloud and back again as desired.
You code will still be the one truth, but the actual content will be hosted on val.build.
.remote() support will also make it possible to have remote images to avoid having to put them in your repository.
There will also be specific support for remote i18n, which will make it possible to split which languages are defined in code, and which are fetched from remote.
More details on .remote() will follow later.
Val is designed to work well on a single web-app, and currently only supports Next 14+ (more meta-frameworks will supported) and GitHub (more Git providers will follow).
Unless your application fits these requirements, you should have a look elsewhere (at least for now).
In addition, if you have a "content model", i.e. content schemas, that rarely change and you plan on using them in a lot of different applications (web, mobile, etc), Val will most likely not be a great fit.
If that is the case, we recommend having a look at Sanity instead (we have no affiliation, but if we didn't have Val we would use Sanity).
NOTE: Our experience is that, however nice it sounds, it is hard to "nail" the content model down. Usually content (on, for example, your landing page) is derived from what you want to present, not vice-versa. In addition, you should think carefully whether you really want to present the exact same content on all these different surfaces.
Examples can found here.
Val currently only support Next.js.
To get started using Next.js, checkout the README.
Join us on discord to get help or give us feedback.