-
Notifications
You must be signed in to change notification settings - Fork 0
Generating HTML Documentation
These instructions describe how to construct documentation for browsing the glTF Schema.
This section provides information on how to generate HTML documentation for the glTF 1.0 and glTF 2.0 specifications using the Open Source tool, Json Schema for Humans.
- Ubuntu 22.04 64-bit Linux
- Python3
- pip
- json-schema-for-humans
Instructions for installing python3 can be found at Python Development Environment.
git clone https://github.com/KhronosGroup/glTF.git`
Copy the 1.0 schema files ('*.schema.json' files located under 'specifications/1.0/schema' directory) to a working directory in the QtglTFTest project. For example:
cd QtglTFTest
mkdir -p doc/json-schema-for-humans/glTF-1.0-schema
cp <glTF project dir>/specifications/1.0/schema/*.schema.json doc/json-schema-for-humans/glTF-1.0-schema
Use the Python "pip" command to install Json Schema for Humans:
pip install json-schema-for-humans
The json-scema-for-humans programs will be installed to '$HOME/.local/bin'. Add this directory to your PATH:
export PATH=$HOME/.local/bin:$PATH
Instructions for running Json Schema for humans can be found at this pypi.org web site
Basically, do the following in the QtglTFTest project:
mkdir -p doc/json-schema-for-humans/html
cd doc/json-schema-for-humans/html
generate-schema-doc ../glTF-1.0-schema
Note
This use to work, but it now appears to be broken due to a Pug error.
This section provides information on how to generate HTML documentation for the glTF 1.0 specification using the Open Source tool, matic.
- Node.js, version 0.10.25
- Matic (https://github.com/mattyod/matic)
- Pug https://www.npmjs.com/package/pug) - formally known as Jade
To install Node.js, type the following command in your terminal:
$ sudo apt-get install nodejs
Then install the Node package manager, npm:
$ sudo apt-get install npm
Create a symbolic link for node, as many Node.js tools use this name to execute.
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
Now you should have both the Node and npm commands working:
$ node -v
v12.22.9
$ npm -v
8.5.1
$ git clone https://github.com/KhronosGroup/glTF.git
Copy the 1.0 schema files ('*.schema.json' files located under '1.0/schema' directory) to a working directory.
Matic is a build tool for generating HTML documentation from JSON schemas
Install the Node.js matic package:
$ sudo npm install -g matic
$ sudo npm install -g pug
In the working directory, do
matic