asciidoctor-html 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -3
- data/CHANGELOG.md +4 -0
- data/README.md +28 -11
- data/Rakefile +15 -6
- data/assets/css/fonts/bootstrap-icons.woff +0 -0
- data/assets/css/fonts/bootstrap-icons.woff2 +0 -0
- data/assets/css/styles.css +5 -0
- data/assets/css/styles.css.map +1 -0
- data/exe/adoctohtml +6 -0
- data/lib/asciidoctor/html/bi_inline_macro.rb +25 -0
- data/lib/asciidoctor/html/book.rb +222 -0
- data/lib/asciidoctor/html/cli.rb +112 -0
- data/lib/asciidoctor/html/converter.rb +165 -24
- data/lib/asciidoctor/html/cref_inline_macro.rb +37 -0
- data/lib/asciidoctor/html/figure.rb +10 -10
- data/lib/asciidoctor/html/highlightjs.rb +99 -0
- data/lib/asciidoctor/html/list.rb +38 -0
- data/lib/asciidoctor/html/popovers.rb +49 -0
- data/lib/asciidoctor/html/ref_tree_processor.rb +142 -64
- data/lib/asciidoctor/html/template.rb +127 -0
- data/lib/asciidoctor/html/tree_walker.rb +3 -1
- data/lib/asciidoctor/html/utils.rb +6 -0
- data/lib/asciidoctor/html/webmanifest.rb +23 -0
- data/lib/asciidoctor/html.rb +13 -1
- data/lib/minitest/html_plugin.rb +18 -22
- metadata +52 -27
- data/docs/_config.yml +0 -5
- data/docs/_layouts/default.html +0 -25
- data/docs/_sass/_custom.scss +0 -35
- data/docs/_sass/_example.scss +0 -30
- data/docs/_sass/_figure.scss +0 -17
- data/docs/_sass/_olist.scss +0 -101
- data/docs/_sass/main.scss +0 -40
- data/docs/assets/css/fonts +0 -1
- data/docs/assets/css/styles.scss +0 -3
- data/docs/assets/img/cat1.jpg +0 -0
- data/docs/assets/img/cat2.jpg +0 -0
- data/docs/assets/img/cat3.jpg +0 -0
- data/docs/package-lock.json +0 -59
- data/docs/package.json +0 -6
- data/docs/site.webmanifest +0 -1
- data/lib/asciidoctor/html/olist.rb +0 -18
- data/lib/asciidoctor/html/version.rb +0 -7
- /data/{docs → assets/favicon}/android-chrome-192x192.png +0 -0
- /data/{docs → assets/favicon}/android-chrome-512x512.png +0 -0
- /data/{docs → assets/favicon}/apple-touch-icon.png +0 -0
- /data/{docs → assets/favicon}/favicon-16x16.png +0 -0
- /data/{docs → assets/favicon}/favicon-32x32.png +0 -0
- /data/{docs → assets/favicon}/favicon.ico +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee8dae10172068a6042f6898e5f6b9d801a78a223437b0f82df70faffeb1f632
|
4
|
+
data.tar.gz: 3818250d4e4abc5a9a914c6fc2472b8ebc50aed01569134591b1f456fad5fa06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b582323d188aefb260a9fa2479c61bcb4ee207b333117a79c020c500547b5646f49d79bbaf97088d2c73e2906120245596bec4d21b7d0790fdbffe2005a41bc1
|
7
|
+
data.tar.gz: 70c63a302dce0d3ec6c0595af58e91952f0a48e6ff1b44d70979e3a9314dc18b6a57f55f4cd98ecee5d9a94e2cf5ed5209e8629c67ecaf522c475f5bc5251b51
|
data/.rubocop.yml
CHANGED
@@ -3,10 +3,10 @@ AllCops:
|
|
3
3
|
NewCops: enable
|
4
4
|
|
5
5
|
Metrics/AbcSize:
|
6
|
-
Max:
|
6
|
+
Max: 45
|
7
7
|
|
8
8
|
Metrics/CyclomaticComplexity:
|
9
|
-
Max:
|
9
|
+
Max: 20
|
10
10
|
|
11
11
|
Metrics/PerceivedComplexity:
|
12
12
|
Max: 20
|
@@ -15,7 +15,7 @@ Metrics/BlockNesting:
|
|
15
15
|
Max: 5
|
16
16
|
|
17
17
|
Metrics/MethodLength:
|
18
|
-
Max:
|
18
|
+
Max: 35
|
19
19
|
|
20
20
|
Metrics/ClassLength:
|
21
21
|
Max: 200
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
[](https://github.com/ravirajani/asciidoctor-html/actions/workflows/main.yml)
|
2
2
|
|
3
|
-
#
|
3
|
+
# asciidoctor-html
|
4
4
|
|
5
|
-
**The code in this repo is being actively developed
|
6
|
-
|
7
|
-
When complete, this gem will provide an alternative HTML converter for [Asciidoctor](https://github.com/asciidoctor/asciidoctor) as well as Jekyll-based book generator.
|
5
|
+
**The code in this repo is being actively developed. Use at your own risk.**
|
8
6
|
|
9
7
|
## Installation
|
10
8
|
|
@@ -19,21 +17,40 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
19
17
|
```bash
|
20
18
|
gem install asciidoctor-html
|
21
19
|
```
|
20
|
+
## Configuration
|
21
|
+
|
22
|
+
See the documentation's [config.yml](docs/asciidoc/config.yml) for an example of a configuration file.
|
23
|
+
In a typical scenario, you would put your configuration file in the same directory as your AsciiDoc
|
24
|
+
sources.
|
22
25
|
|
23
|
-
## Usage
|
26
|
+
## Basic Usage
|
24
27
|
|
25
|
-
|
26
|
-
require "asciidoctor"
|
27
|
-
require "asciidoctor/html"
|
28
|
+
Assuming your config file is in the same directory as your AsciiDoc sources, execute:
|
28
29
|
|
29
|
-
|
30
|
+
```shell
|
31
|
+
cd <ASCIIDOC_SOURCES_DIR>
|
32
|
+
adoctohtml [--watch]
|
30
33
|
```
|
31
34
|
|
32
35
|
## Development
|
33
36
|
|
34
|
-
After checking out the repo, run `bin/setup` to install dependencies.
|
37
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
38
|
+
Then, run `bundle exec rake` to run the tests. You can also run `bin/cli` to test the CLI after making changes.
|
39
|
+
|
40
|
+
Run `jekyll serve --livereload` inside the `docs/html` directory to preview your changes after running `bundle exec rake`.
|
41
|
+
|
42
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
43
|
+
To release a new version, update the version number in `asciidoctor-html.gemspec`,
|
44
|
+
and then run
|
45
|
+
|
46
|
+
```shell
|
47
|
+
bundle exec rake stylesheet
|
48
|
+
bundle exec rake release
|
49
|
+
```
|
35
50
|
|
36
|
-
|
51
|
+
The first line runs the tests and builds the stylesheet `assets/css/styles.css`.
|
52
|
+
The second line creates a git tag for the version, pushes git commits and the created tag,
|
53
|
+
and pushes the `.gem` file to [rubygems.org](https://rubygems.org).
|
37
54
|
|
38
55
|
|
39
56
|
## License
|
data/Rakefile
CHANGED
@@ -1,22 +1,31 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
|
-
require "jekyll"
|
5
4
|
require "minitest/test_task"
|
5
|
+
require "rubocop/rake_task"
|
6
|
+
require "jekyll"
|
7
|
+
require "fileutils"
|
8
|
+
require_relative "lib/asciidoctor/html"
|
6
9
|
|
7
|
-
|
10
|
+
JEKYLL_SITEDIR = "#{__dir__}/_site".freeze
|
11
|
+
JEKYLL_CSSDIR = "#{JEKYLL_SITEDIR}/assets/css".freeze
|
8
12
|
|
9
|
-
|
13
|
+
Minitest::TestTask.create
|
10
14
|
|
11
15
|
RuboCop::RakeTask.new
|
12
16
|
|
13
|
-
task
|
17
|
+
task jekyll: %i[test rubocop] do
|
14
18
|
config = Jekyll.configuration({
|
15
|
-
source: "
|
16
|
-
destination:
|
19
|
+
source: "#{__dir__}/docs/html",
|
20
|
+
destination: JEKYLL_SITEDIR
|
17
21
|
})
|
18
22
|
site = Jekyll::Site.new(config)
|
19
23
|
Jekyll::Commands::Build.build site, config
|
20
24
|
end
|
21
25
|
|
26
|
+
task stylesheet: %i[jekyll] do
|
27
|
+
FileUtils.mkdir_p Asciidoctor::Html::CSS_PATH, verbose: true
|
28
|
+
FileUtils.cp_r JEKYLL_CSSDIR, Asciidoctor::Html::ASSETS_PATH, verbose: true
|
29
|
+
end
|
30
|
+
|
22
31
|
task default: %i[test rubocop]
|
Binary file
|
Binary file
|