GT Documenter is the tool for creating and consuming live documents inside the development environment.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc initial doc Jul 25, 2018
scripts disable epicea during loading Oct 27, 2018
src
.project add inputFile annotation Sep 13, 2018
.smalltalk.ston hide passing tests Oct 28, 2018
.travis.yml test only on linux Oct 27, 2018
LICENSE
README.md Add travis status Oct 28, 2018

README.md

GToolkit Documenter Build Status

The GToolkit Documenter is the tool for creating and consuming live documents directly in the development environment. It is part of the Glamorous Toolkit project. It exploits the Bloc project for rendering, and the Pillar project for the markup language.

At its core it offers a live editor for manipulating Pillar documents. The interaction happens seamlessly directly in the text editor, and it can be combined with different types of previews to serve several classes of use cases:

  • documentation of existing code
  • tutorials
  • interactive data notebook

Documentation of existing code

Documenter complements the Glamorous Toolkit examples engine to redefine code documentation. When practicing example-driven development, examples get written as part of the typical development. Once examples exist, they can be quickly put together in a document to form documentation. For example, the picture below shows the comment of a class containing a visual explanation:

Documenter: examples preview

You can see a live example of documentation by inspecting the following snippet:

GtDocumenter editorForText: BrToggleExamples comment. 

Tutorials

Documenter offers a new experience of writing tutorials for Pharo by enabling the creation and embedding of Epicea change sessions directly in the document. For example, take a look at the following animation:

Documenter: Documenter: Epicea diff

The document shows a method on top, and a change preview at the bottom showing both the code and the associated diff to the state from the image. Applying the change updates both the change view (no more diff), and method preview. This speeds up the process of going through a tutorial faster. Furthermore, given that now the document shows the diff to the current image, the reader can safely explore alternative scenario and come back to the tutorial at any time without losing the overview.

By default, the code is shown in a scrollable preview. For convenience, the size of the preview can be adjusted at read time:

Documenter: Epicea diff expansion

Or the whole can be expanded:

Documenter: Epicea diff expansion

To explore a concrete tutorial example, inspect the following:

IceRepository repositoriesLocation / 'feenkcom'/ 'gtoolkit-examples' / 'doc' / 'tutorial' / 'examples-tutorial.pillar'. 

Note - If using Pharo 7 or a newer version of Iceberg, use the following instead:

IceLibgitRepository repositoriesLocation / 'feenkcom'/ 'gtoolkit-examples' / 'doc' / 'tutorial' / 'examples-tutorial.pillar'. 

Interactive data notebook

A Documenter document can also be used as an interactive notebook. Internally it essentially acts as a playground:

  • it supports defining variables in code snippets, and
  • the execution of code shows an embedded inspector.

For example:

Documenter: snippet preview

Furthermore, to make the manipulation of results more efficient, we can also resize the preview:

Documenter: snippet preview resize

How to load

The ideal way to load the code is by loading the entire Glamorous Toolkit project.