From b4dc80e377f8dfc64d995a18a65f70ea8677cdba Mon Sep 17 00:00:00 2001 From: Xavier Coulon Date: Fri, 4 Mar 2022 19:01:51 +0100 Subject: [PATCH] chore(project): update installation instructions (#966) Updated README Fixes #846 Signed-off-by: Duncan Lock Co-authored-by: Xavier Coulon --- README.adoc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.adoc b/README.adoc index 2ba42394..9021ccdd 100644 --- a/README.adoc +++ b/README.adoc @@ -52,11 +52,15 @@ Using `-b` (or `--backend`) the following formats are supported: == Installation -This is a standard Go package, and it installs like you might expect. +To build libasciidoc and make it available on the command line, do this: -To install it in your `$GOPATH` (assuming `$GOPATH/bin` is on your path), just use `go install`: + $ git checkout github.com/bytesparadise/libasciidoc + $ cd libasciidoc + $ make install - $ go get -u github.com/bytesparadise/libasciidoc +If `$GOPATH/bin` is already in `$PATH`, then you should be good. Otherwise, for Linux and macOS users, you can run the following command: + + $ sudo ln -s ./bin/libasciidoc /usr/bin/libasciidoc == Usage @@ -80,9 +84,9 @@ Libasciidoc provides 2 functions to convert an Asciidoc content into HTML: 2. Converting a file (given its name) into an HTML document: - ConvertFile(output io.Writer, config *configuration.Configuration) (types.Metadata, error) + ConvertFile(output io.Writer, config *configuration.Configuration) (types.Metadata, error) -where the returned `types.Metadata` object contains the document's title which is not part of the generated HTML `` part, as well as the other attributes of the source document. +where the returned `types.Metadata` object contains the document's title which is not part of the generated HTML `` part, as well as the table of contents (even if not rendered) and other attributes of the document. All options/settings are passed via the `config` parameter.