kui-shell / KuiNotebookBuilder

Template focused on browser-based Kui Notebook clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kui Notebook Builder

This repository helps you to build a set of webpack bundles that can host a fixed set of Kui Notebooks. The build is dockerized, so you don't even need to clone this template repository to get started.

Quick Start (no need to clone this repo)

docker run --rm \
       -v "$BUNDLE_TARGET_DIR":/kui/dist/webpack \
       -v "$NOTEBOOKS_DIR":/config.d \
       -v "$CONFIG_DIR":/config.d \
       -e OFFLINE=$OFFLINE \
       quay.io/kuishell/notebook-builder

You will need to specify three inputs:

  1. $BUNDLE_TARGET_DIR: absolute path to the target directory for the generated web app (index.html, etc.).
  2. $NOTEBOOKS_DIR: absolute path to your Kui Notebooks.
  3. $CONFIG_DIR: absolute path to your config choices, such as the name of the application.
  4. OFFLINE=true|false. If you want a static single page application, set OFFLINE=true. (Coming soon: quick builds for a hosted client/server architecture)

A suggested usage is to instantiate this template repository once per desired web application. This lets you store the config.d elements (application name, set of notebooks) on a per-app basis. Also, if you clone the repository, this process is slightly simplified:

./build.sh /tmp/bundles $PWD/notebooks $PWD/config.d offline

Live Watching

If you wish to to live development, use the watch.sh script in place of build.sh. Once the watcher is up, you can visit http://localhost:9080. Changes to your notebooks or to your config.d entries should be reflected on that web page.

config.d: Specifying your application name, etc.

You may find an example configuration directory here. You may set the application title and favicon here. See the example config for guidance.

Authoring Notebooks

Download Kui. You may find help in the stock Kui client by consulting the Notebooks->Make Your Own Notebook menu. Once you have a candidate notebook, do a File->Save, and save it to your config.d/notebooks directory.

Advanced

If for some reason you need to generate a custom base image, consult the advanced documentation.

About

Template focused on browser-based Kui Notebook clients


Languages

Language:Shell 54.7%Language:TypeScript 29.1%Language:Dockerfile 15.6%Language:SCSS 0.6%