Skip to content

Commit

Permalink
updates CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsromero committed Sep 5, 2020
1 parent abf124c commit 7afe8b6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Improvements::
* Make `auto-refresh` (and `http` by inheritance) only convert modified and created sources (#474)
* Make `auto-refresh` only copy modified and created resources + taking into consideration <resources> options (#478)
* Make `auto-refresh` ignore docInfo files to avoid copying them into output (#480)
* Add official support for `http` mojo with life preview and refresh of html output (#483)

Bug Fixes::

Expand Down
29 changes: 16 additions & 13 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ This is specially useful in combination with a refresh browser extension, allowi
Once started, this will keep the maven process running until you enter `exit` or `quit` command in the console.
Or it is manually killed with _ctrl+c_.

[[http-goal-config-note]]
[[auto-refresh-goal-config-note]]
[NOTE]
====
It is possible to run `auto-refresh` on your current project without changes provided the configuration is at top plugin level.
Expand Down Expand Up @@ -508,21 +508,23 @@ If errors are found during initialization, plugin won't start.
[[http-goal]]
=== HTML life preview (`http`)

The `http` goal allows starting and embedded http server to serve content from the generated output directory while updating it.
The `http` goal allows starting an embedded http server to access content from the generated output directory, while the plugin updates it.

Modified sources will be updated similarly to how <<auto-refresh-goal,auto-refresh>> works.
And at the same time, HTML contents will be automatically refreshed on the web browser without need for manual steps.
Just open the file through the provided url that will appear in the console and write.
When introducing a URL, the file extension is not necessary for html files.

Note than the file extension is not necessary for html files.
Bu default, the document _manual.html_ placed in the root path will be accessible as _pass:c[http://localhost:2000/manual]_.

[NOTE]
====
While this goal can be used to serve any kind of content (e.g. PDF).
The possibilities have not been explored and are not officially supported, but feedback is welcome.
While the `http` goal can be used to serve any kind of content (e.g. PDF).
The possibilities have not been explored and are not officially supported, but feedback is welcome if you want to share your experience and ideas.
====

[source,xml]
.Refresh configuration extract
.Http configuration extract
----
<plugin>
...
Expand All @@ -534,7 +536,7 @@ The possibilities have not been explored and are not officially supported, but f
<goal>http</goal> <!--2-->
</goals>
<configuration> <!--3-->
<backend>html</backend>
<port>8080</port>
<attributes>
<toc/>
<linkcss>false</linkcss>
Expand All @@ -546,19 +548,20 @@ The possibilities have not been explored and are not officially supported, but f
</plugin>
----
<1> The asciidoctor-maven-plugin does not run in any phase by default, so one must be specified.
<2> The Asciidoctor Maven plugin refresh goal.
<2> The Asciidoctor Maven plugin http goal.
<3> Asciidoctor options.
Here we change the port to 8080.

This feature shares the following features and limitations with <<auto-refresh-goal,auto-refresh>> goal.
This feature shares the following features (and limitations) with <<auto-refresh-goal,auto-refresh>> goal.

* Once started, this will keep the maven process running until stoped (`exit`, `quit` commands or _ctrl+c_).
* Once started, this will keep the maven process running until explicitly stopped (`exit`, `quit` commands or _ctrl+c_).
* Deleted or moved files will remain the output directory until clean.
* To take full advantage of configuration options, it must be explicitly configured in _pom.xml_ (see <<http-goal-config-note,note>>).
* `failIf` configurations will make the goal fail to start but won't stop the server once started.
* To take full advantage of configuration options, it must be explicitly configured in _pom.xml_ (see <<auto-refresh-goal-config-note,note>>).
* `failIf` configurations will make the goal fail to start, but won't stop the server once started.

==== Configuration

The mojo accepts the same configurations as `process-asciidoc` and `refresh` mojos and adds:
The mojo accepts the same configurations as `process-asciidoc`, `refresh` mojos and adds:

port:: server port.
Defaults to `2000`.
Expand Down

0 comments on commit 7afe8b6

Please sign in to comment.