Giter VIP home page Giter VIP logo

content-delivery-js-sdk's Introduction

Optimizely Content Delivery JavaScript SDKs and samples

Npm publish Continuous integration

This repository contains the source code for the Content Delivery JavaScript SDKs and samples.

Content Definitions

Content Delivery

Samples

The samples are using Nuxt and Vue CLI v5.

Prerequisites for building and testing the SDKs

This project uses:

  • Node.js 18+
  • .NET SDK 6+
  • SQL Server 2016 Express LocalDB (download here)

Create a release

  1. Update the version in all modules with npm version 1.2.3.
  2. Run npm install in all samples to update their package-lock.json files.
  3. Commit, push, and create PR to master branch.
  4. Create new Github release based of master branch.
  5. Tag version with following format v1.2.3.
  6. Give the release a title and write an optional description.
  7. Publish.

Contributing

The easiest way to contribute is to join in with the discussions on Github issues or create new issues with questions, suggestions or any other feedback. If you want to contribute code or documentation, you are more than welcome to create pull-requests, but make sure that you read the contribution page first.

content-delivery-js-sdk's People

Contributors

johanpetersson avatar jotiepiserver avatar shelco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

content-delivery-js-sdk's Issues

ReactJS SDK

Is there any SDK for ReactJS
Can you share the if there is any sample or road map for it.

Enable custom headers inside ContentResolver resolveContent

Hi!

Since the content delivery api backend supports cookie authentication (https://world.optimizely.com/documentation/developer-guides/content-delivery-api/getting-started/authorization-service/) I was thinking it might be nice to include the possibility to add a cookie header via the frontend repository.

I noticed that apiClient.ts accepts optional headers in the get-method, so what if the resolveContent method inside contentResolver.ts could be changed to include optional headers that are sent in to #api? Or maybe the ContentDeliveryConfig could be modified to include getHeaders() (like getAccessToken) and used in the call to #api.get?

(I suppose this applies to contentLoader as well)

What do you think?

Include headers in resolveContent result

Hi,

We would like to access some custom headers in the reponse from the Content Delivery Api.

Would you consider adding the response.headers (Map<string,string>) to the result of the contentResolver.ts -> resolveContent method?

Thanks

On page editing in sample project question

Hi,

First I want to say impressive work and really easy to get the sample project up and running. It seems that the onpage editing is not working. Get 214 to a file locally:
http://localhost:8081/episerver/cms/latest/clientresources/epi-cms/communicationinjector.js

If I google this I get a hit to this file:
https://github.com/Romanets/RestImageResize/blob/master/AppData/Modules/CMS/1.0.431/ClientResources/EPi/cms/communicationInjector.js

Maybe it can be something just on my local installation. If I then manually add (communicationinjector.js) to the project I get: Uncaught DOMException: Blocked a frame with origin "http://localhost:8080" from accessing a cross-origin frame.

When looking closer to communicationInjector script I see what it does. It tries tom manipulate an iFrame with dojo. Probably to get access to the iframe which is used i CMS edit mode. This will not work unless both frontend has the same host and portnumber for security reasons in browsers. In the sample it set to localhost:8081 //backend localhost:8080 //fronend, ie. different portnumber. Also see this stackoverflow:
https://stackoverflow.com/a/25098153

Trying to summarize my question here are there other documented ways to connect and use on-page-edit functionality with Optimizely cms using content-delivery-js-sdk?

OPE edit in decoupled

I am having a hard time making OPE work in the decoupled sample.

I am logged in to the CMS server on port 8081, and running the SPA on 8081.

But no matter what I keep getting the Default (view) mode.

I guess It has something todo with that the fact that I don't have window.epi?

Can you help me?

Missing support for API v3.0

When are you going to support API v3.0?

For example SiteDefinition.contentRoots model is missing startPage definition.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.