@elevio/kb-kit
v0.3.10
Published
## What is the Elevio KB-Kit?
Downloads
166
Readme
Introduction
What is the Elevio KB-Kit?
The Elevio (elev.io) KB-Kit is a toolkit for building your own knowledge base powered by Elevio.
It allows you to template your own custom Knowledge Base (KB) and gives you easy access to all of Elevio's smart features.
The kit handles all of the grunt work of making sure the correct page is rendered, the correct data is fetched and all the analytic events are sent so you can take advantage of Elevio insights.
How does it work?
KB-Kit uses React.js under the hood to render the content. However, don't worry if you only know HTML or CSS - this should be enough to get you started! This documentation will point out any differences to HTML/CSS where applicable.
Data is fetched in the background for you based on the URL you are currently visiting.
The data is then made available for you in one of two ways:
You can use "components" to grab the relevant part of the data you need. Example: print the article title to the page.
<Article.Title />
If you want access to the raw data then you can use the provided hooks. Example: use a hook to obtain article data.
const ArticlePage = () => {
const articleData = useArticle();
// Now you have access to the article data to do what you like with
}
Quick Start Guide
To begin make sure you have registered an account with Elevio.
You will need to have Node.js installed on your computer. We recommend using the latest version of Node.js.
Next, copy from the JavaScript starter repository:
https://github.com/dixahq/kb-javascript-starter
Alternatively you can copy from the TypeScript starter repository:
https://github.com/dixahq/kb-typescript-starter
To download a copy of the repository, simply click on the Code button then choose 'Download Zip'.
Once downloaded to your device, unzip the file.
Of course, you can also choose to clone the repository if you choose:
git clone [email protected]:dixahq/kb-javascript-starter.git
You may use any text editor or integrated development environment 'IDE' you wish. We recommend Visual Studio Code which is open source, has excellent intellisense prompting, and is free to use.
Within your IDE, open the settings.json file from the root and fill in your account id. You can find your account id here: https://app.elev.io/installation
There are many options you can fill into settings.json, see the Client Settings API reference documents for more information.
Next, install the required JavaScript modules by opening a terminal and running:
yarn
# or
npm i
This will install everything you need to start developing and deploying your KB.
Then to start working on your KB, in your terminal run this:
yarn start
# or
npm run start
Now open your web browser and visit http://localhost:4000. You should see a basic home page with a list of your categories, and any articles nested within those categories.
Then to see a change open the file src/pages/home.js
and change something. Then hit save. Changes you make should occur automatically in your browser.
Read more
The documentation is located at https://kb-kit.elevio.help/en
If you have issues please contact us at [email protected]