Skip to content

Commit

Permalink
chore(project): update installation instructions (#966)
Browse files Browse the repository at this point in the history
Updated README

Fixes #846 

Signed-off-by: Duncan Lock <[email protected]>
Co-authored-by: Xavier Coulon <[email protected]>
  • Loading branch information
xcoulon authored Mar 4, 2022
1 parent 40a829a commit b4dc80e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 `<body>` 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 `<body>` 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.

Expand Down

0 comments on commit b4dc80e

Please sign in to comment.