Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation instructions #966

Merged
merged 4 commits into from
Mar 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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