![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
cloudcms-nuxt
Advanced tools
This module makes it easy to use Cloud CMS from within your Nuxt JS pages and components.
It provides the following:
You can find an example of a static site generated using Nuxt JS and Cloud CMS here: https://github.com/gitana/sdk/tree/master/nuxtjs/sample
This site uses the Cloud CMS Nuxt Module to deliver a working example of the aforementioned capabilities.
npm install -S cloudcms-nuxt
Add the module to your Nuxt configuration. You must include the contents of your gitana.json
file, like this:
var config = require("./gitana.json");
module.exports = {
...,
"modules": [
["cloudcms-nuxt", config]
]
}
You can also add the following optional configuration settings:
{
...,
"preview": false,
"renditions": false,
"basePageUrl": "http://localhost:3000"
}
In more detail, these are:
true
to enable instant preview and branch switching capabilitiestrue
to track generated page renditions (per content item) and make that information available to editors for preview selectionThe $cloudcms
context variable is available on the context
, providing access to all functions in the Cloudcms driver. The $branch
provides functions to your current project branch, which is by default master
. Here is how you can read a node.
async asyncData(context) {
let node = await context.$branch.readNode("myNodeId");
// more awesome content functions
}
If you've enabled preview mode (i.e. preview
set to true
via config), then your web pages support the following
additional request parameters:
?preview&branch={branchId}
Which allows you to request server-side rendering of the given page on top of the given Cloud CMS branch. This provides your editors (working in different branches) with the ability to preview their content without any server redeployments or restarts.
If you've enabled rendition tracking (i.e. trackRenditions
set to true
via config), then the nuxt generate
build
for the static site will automatically discover any content node IDs for every page generated. That information will
be shipped back to the Cloud CMS API so that your editorial users can take advantage of it while editing and previewing
their changes.
To tag pages as having generated using a specific node, just append the data-cms-id
attribute into your DOM. For example,
<div class="item item-author-block author" :data-cms-id="author._doc">
<a :href="authorLink">
<div class="author-dp">
<img v-bind:src="author.defaultAttachmentUrl" v-bind:alt="author.title">
</div>
</a>
</div>
FAQs
CloudCMS Nuxt.js Module
We found that cloudcms-nuxt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.