Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
marouferchichi
Product and Topic Expert
Product and Topic Expert

Overview

Custom widget consists mainly of two types of files: the custom widget JSON file (explained in more detail in previous blog) and the resource files.

The custom widget JSON file contains the metadata of a custom widget. It defines all the ingredients of a custom widget and references its resource files by their URLs.

The resource files are all the files of the custom widget that make it work properly, for example, JavaScript files, CSS files, HTML files, image files, and more.

To host a custom widget, you need two locations on which these files are distributed:

  • An SAP Analytics Cloud instance, on which you upload the custom widget JSON file of the custom widget (see help: Upload a Custom Widget to Analytics Designer).
  • An HTTP Web server with HTTPS enabled, on which you upload the resource files. The Web server acts as a simple repository of the resource files. The resource files are static, they aren’t processed or executed on the Web server. Recall that the custom widget JSON contains URL references that point to these resource files.

In this blog I will show you how you can host your Custom Widgets into the GitHub.

GitHub Account Setup

Before you start uploading your Custom Widgets into the GitHub, you must first create an account in case if you don't have one.

GitHub Pages

GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website.

We will use this feature that GitHub is offering to host our Custom Widget's resource files.

Below you will find a Demo where I highlighted the different steps that you need to know for hosting your Custom Widget into the GitHub:

  • Create GitHub Account.
  • Create new public repository.
  • Activating the feature "Pages".
  • Testing the repository by uploading an HTML file.
  • Uploading the Custom Widget's resource files into the repository.
  • Testing the Custom Widget with SAP Analytics Cloud.

Screenshot 2024-02-29 at 10.10.32.png

You can visit the GitHub Docs in order to know more about Pages, naming, the different type of repositories and Custom domains.

Please consult the GitHub Pages documentation on their Usage limits before implementation/going to production.

You can visit as well our new GitHub repository where you can find several Custom Widget Samples ready to use.

If you are interested in other hosting options, I invite you to read my blog: how to host your Custom Widgets into the SAP BTP 

See you soon for new blogs !

 

4 Comments