{"id":15651847,"url":"https://github.com/chloerei/asciidoctor-htmlbook","last_synced_at":"2025-04-30T17:09:50.467Z","repository":{"id":56842585,"uuid":"78772420","full_name":"chloerei/asciidoctor-htmlbook","owner":"chloerei","description":"Asciidoctor HTMLBook is an Asciidoctor backend for converting AsciiDoc documents to HTMLBook documents.","archived":false,"fork":false,"pushed_at":"2020-01-16T09:18:30.000Z","size":105,"stargazers_count":31,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-30T17:09:24.545Z","etag":null,"topics":["asciidoc","asciidoctor","htmlbook"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chloerei.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.adoc","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-12T18:03:35.000Z","updated_at":"2023-09-09T09:39:29.000Z","dependencies_parsed_at":"2022-09-01T09:03:26.607Z","dependency_job_id":null,"html_url":"https://github.com/chloerei/asciidoctor-htmlbook","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chloerei%2Fasciidoctor-htmlbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chloerei%2Fasciidoctor-htmlbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chloerei%2Fasciidoctor-htmlbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chloerei%2Fasciidoctor-htmlbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chloerei","download_url":"https://codeload.github.com/chloerei/asciidoctor-htmlbook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251748950,"owners_count":21637418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asciidoc","asciidoctor","htmlbook"],"created_at":"2024-10-03T12:40:22.569Z","updated_at":"2025-04-30T17:09:49.740Z","avatar_url":"https://github.com/chloerei.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Asciidoctor HTMLBook\n\nAsciidoctor HTMLBook is an link:http://asciidoctor.org/[Asciidoctor] backend for converting AsciiDoc documents to link:http://oreillymedia.github.io/HTMLBook/[HTMLBook] documents.\n\n== Installation\n\nAdd this line to your application's Gemfile:\n\n[source, ruby]\n----\ngem 'asciidoctor-htmlbook'\n----\n\nAnd then execute:\n\n[source, console]\n----\n$ bundle\n----\n\nOr install it yourself as:\n\n[source, console]\n----\n$ gem install asciidoctor-htmlbook\n----\n\n== Usage\n\n=== CLI\n\n[source, console]\n----\n$ asciidoctor-htmlbook basic-example.adoc\n----\n\nor\n\n[source, console]\n----\n$ asciidoctor -r asciidoctor-htmlbook basic-example.adoc\n----\n\nFor more options:\n\n[source, console]\n----\n$ asciidoctor-htmlbook -h\n----\n\n=== API\n\nTo use Asciidoctor in your application, you first need to require the gem:\n\n[source, ruby]\n----\nrequire 'asciidoctor/htmlbook'\n----\n\n==== Load and Convert a File Using the API\n\nLoad from file:\n\n[source, ruby]\n----\ndoc = Asciidoctor.load_file 'mysample.adoc', backend: 'htmlbook'\nputs doc.convert\n----\n\nConvert file:\n\n[source, ruby]\n----\nAsciidoctor.convert_file 'mysample.adoc', backend: 'htmlbook'\n----\n\n==== Load and Convert Strings Using the API\n\nLoad from string:\n\n[source, ruby]\n----\ndoc = Asciidoctor.load '*This* is Asciidoctor.', backend: 'htmlbook'\nputs doc.convert\n----\n\nRender string:\n\n[source, ruby]\n----\nAsciidoctor.convert '*This* is Asciidoctor.', backend: 'htmlbook'\n----\n\nWhen rendering a string, the header and footer are excluded by default to make Asciidoctor consistent with other lightweight markup engines like Markdown. If you want the header and footer, just enable it using the `:header_footer` option:\n\n[source, ruby]\n----\nAsciidoctor.convert '*This* is Asciidoctor.', backend: 'htmlbook', header_footer: true\n----\n\n== Provide Custom Templates\n\nYou can overwrite default templates by adding `:template_dir` option:\n\n[source, ruby]\n----\nAsciidoctor.convert '*This* is Asciidoctor.', backend: 'htmlbook', template_dir: 'path/to/templates'\n----\n\n[NOTE]\n--\nasciidoctor-htmlbook template do not compatible with asciidoctor built-in template backend.\n\nView link:./templates[] for more info.\n--\n\n== Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rake` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\n== Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/chloerei/asciidoctor-htmlbook. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the link:http://contributor-covenant.org[Contributor Covenant] code of conduct.\n\n== License\n\nThe gem is available as open source under the terms of the link:http://opensource.org/licenses/MIT[MIT License].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchloerei%2Fasciidoctor-htmlbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchloerei%2Fasciidoctor-htmlbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchloerei%2Fasciidoctor-htmlbook/lists"}