Skip to content

acoustic-content-samples/sample-html-snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-html-snippet

Sample content type that can take html, css, and js input to render a component in Acoustic Content (formerly Watson Content Hub or WCH). Update: As of April 26th, 2018, the HTML Snippet was renamed to Embed code and the content type is now part of the out of the box Single Page Application Oslo. Therefore this repository was updated to only showcase a sample implementation of a stock ticker using the content type that exists out of the box.

HTML snippet rendered from HTML, CSS, and JS code

Table of Contents

Prerequisite

Install and deploy the sample

Configure your Wchtools

  • Get your WCH tenant API URL. Open the Hub information dialog from the "About" flyout menu in the left navigation pane of the Watson Content Hub user interface. Copy the API URL.
  • Run wchtools init in your command line. Enter your username and API URL to configure the wchtools

Install the sample content-artifacts

  • Using the Git URL to the sample-html-snippet repository and change the command line directory to content-artifacts, run this command to push HTML snippet sample page contents.
wchtools push -A -v -f

Example create your own HTML snippet

Weather forecast San Jose week forecast

  1. go to https://weatherwidget.io/
  2. Customize widget
    • Choose a city, label, language, units
    • Options, Themes, and Customize tabs allow for further modification
  3. Click 'GET CODE' button
  4. Copy code from modal popup.
  5. Create a new content item in your tenant.
  6. Paste copied code in the HTML text field.
  7. Publish the content item.
  8. Add the new content item to a page.

License

See the included license file License .

back to top

About

A sample content type that can take html, css, and js input to render a component in an Acoustic Content SPA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •