Angular
React
Vue
React Native
(Experimental)
Code-First Workflow
Sitecore-First Workflow
Consumption License is required for JSS
Learn more at Headless Vs. Traditional CMS
Headless allows the web apps to run independent of the backend. Headless CMS delivers content through an API independent to any device.
In Sitecore. Decoupled Headless Platform from allows you to create web apps independent of the Sitecore XP.
Sitecore Platform Architecture is based on three major parts.
1
2
3
JSS extends Sitecore's dynamic, component-based layout model to the frontend, Sitecore Javascript Services follows same, but you can better understand with these.
1
2
3
import {
CommonFieldTypes,
SitecoreIcon,
Manifest
} from "@sitecore-jss/sitecore-jss-manifest";
export default function(manifest) {
manifest.addComponent({
name: "TheStory",
icon: SitecoreIcon.DocumentTag,
fields: [
{ name: "storyHeading", type: CommonFieldTypes.SingleLineText},
{ name: "storyContent", type: CommonFieldTypes.RichText},
{ name: "storyImage", type: CommonFieldTypes.Image}
]
});
}
[my-first-jss-app]\sitecore\definitions\components
fields:
pageTitle: Sitecore JSS
placeholders:
jss-main:
- componentName: TheStory
fields:
storyHeading: Give the gift of shopping
storyContent:
Lorem ipsum dolor sit amet, consectetur
storyImage:
src: data/media/img/card-img.png
alt: story Logo
[my-first-jss-app]\data\routes\
import React from 'react';
import { Text, RichText, Image} from '@sitecore-jss/sitecore-jss-react';
const TheStory = (props) => (
<div>
<p>TheStory Component</p>
<Text field={props.fields.storyHeading} />
<RichText field={props.fields.storyContent} />
<Image field={props.fields.storyImage} />
</div>
);
export default TheStory;
[my-first-jss-app]\src\components\TheStory
npm install -g @sitecore-jss/sitecore-jss-cli
jss create my-first-jss-app react
cd my-first-jss-app
jss start
# Create the component
jss scaffold TheStory
You need any OS supported by Node (Mac, Windows, Linux) and sitecore-jss-cli installed
@isaadansari
@isaadansari
@isaadansari