You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2018/09/18 23:13:10 UTC

[isis] 01/01: ISIS-1899: updates asciidoc versions

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 63f7419f2a1bddb20937b94ed7ac7d16d6be3684
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Sep 19 00:12:53 2018 +0100

    ISIS-1899: updates asciidoc versions
    
    and makes a start on a custom theme for PDF
---
 adocs/documentation/pom-pdf.xml                    |  67 ++---
 adocs/documentation/pom.xml                        |  19 +-
 adocs/documentation/preview-html.sh                |   2 +-
 adocs/documentation/preview-pdf.sh                 |   2 +-
 .../src/main/asciidoc/guides/ad/ad.adoc            |   6 +-
 .../cgcom/_cgcom_post-release-successful.adoc      |   2 +-
 .../guides/dg/images/contributing/git-workflow.png | Bin 55066 -> 38464 bytes
 .../documentation/src/main/theme/custom-theme.yml  | 278 +++++++++++++++++++++
 adocs/documentation/src/main/theme/isis-logo.png   | Bin 0 -> 14160 bytes
 9 files changed, 315 insertions(+), 61 deletions(-)

diff --git a/adocs/documentation/pom-pdf.xml b/adocs/documentation/pom-pdf.xml
index 81ab8c2..5b85d95 100644
--- a/adocs/documentation/pom-pdf.xml
+++ b/adocs/documentation/pom-pdf.xml
@@ -41,15 +41,12 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <asciidoctor.maven.plugin.version>1.5.3</asciidoctor.maven.plugin.version>
-        <asciidoctorj.pdf.version>1.5.0-alpha.11</asciidoctorj.pdf.version>
-        <asciidoctorj.version>1.5.4.1</asciidoctorj.version>
-        <asciidoctorj.diagram.version>1.5.0</asciidoctorj.diagram.version>
+        <asciidoctor.maven.plugin.version>1.5.6</asciidoctor.maven.plugin.version>
+        <asciidoctorj.pdf.version>1.5.0-alpha.16</asciidoctorj.pdf.version>
+        <asciidoctorj.version>1.5.6</asciidoctorj.version>
+        <asciidoctorj.diagram.version>1.5.4.1</asciidoctorj.diagram.version>
         <incode-asciidoctor-extension-monotree.version>0.0.2</incode-asciidoctor-extension-monotree.version>
-        <jruby.version>9.1.8.0</jruby.version>
-        <!--
-        <jruby.version>1.7.21</jruby.version>
-        -->
+        <jruby.version>1.7.26</jruby.version>
 
         <build.dir>${project.basedir}/target/site</build.dir>
 
@@ -57,9 +54,9 @@
     </properties>
 
     <scm>
-        <connection>scm:git:https://git-wip-us.apache.org/repos/asf/isis.git</connection>
-        <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/isis.git</developerConnection>
-        <url>https://git-wip-us.apache.org/repos/asf/isis.git</url>
+        <connection>scm:git:https://github.com/apache/isis.git</connection>
+        <developerConnection>scm:git:https://github.com/apache/isis.git</developerConnection>
+        <url>https://github.com/apache/isis.git</url>
         <tag>HEAD</tag>
     </scm>
 
@@ -80,25 +77,6 @@
     <build>
         <pluginManagement>
             <plugins>
-                <!--
-                <plugin>
-                    <groupId>de.saumya.mojo</groupId>
-                    <artifactId>gem-maven-plugin</artifactId>
-                    <version>1.0.5</version>
-                    <configuration>
-                        <jrubyVersion>${jruby.version}</jrubyVersion>
-                        <gemHome>${project.build.directory}/gems</gemHome>
-                        <gemPath>${project.build.directory}/gems</gemPath>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <goals>
-                                <goal>initialize</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-                -->
                 <plugin>
                     <groupId>org.asciidoctor</groupId>
                     <artifactId>asciidoctor-maven-plugin</artifactId>
@@ -152,26 +130,7 @@
         </pluginManagement>
     </build>
 
-<!--
-    <dependencies>
-        <dependency>
-            <groupId>rubygems</groupId>
-            <artifactId>asciidoctor-diagram</artifactId>
-            <version>1.2.1</version>
-            <type>gem</type>
-            <scope>provided</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>rubygems</groupId>
-                    <artifactId>asciidoctor</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
--->
-
     <profiles>
-
         <profile>
             <id>pdf</id>
             <activation>
@@ -197,6 +156,13 @@
                                     <sourceDirectory>src/main/asciidoc/guides</sourceDirectory>
                                     <outputDirectory>${project.reporting.outputDirectory}/guides</outputDirectory>
 
+                                    <!-- Since 1.5.0-alpha.9 PDF back-end can use 'rouge' as well as 'coderay'
+                                                                for source highlighting -->
+                                    <!-- Due to a known issue on windows, it is recommended to use 'coderay' until an new version of 'rouge' is released.
+                                            see discussions: https://github.com/asciidoctor/asciidoctor-maven-examples/pull/58
+                                                             https://github.com/asciidoctor/asciidoctorj-pdf/issues/3
+                                                             https://github.com/jneen/rouge/issues/661
+                                    -->
                                     <sourceHighlighter>coderay</sourceHighlighter>
                                     <preserveDirectories>true</preserveDirectories>
                                     <relativeBaseDir>true</relativeBaseDir>
@@ -206,6 +172,9 @@
                                         <sourcedir>${project.build.sourceDirectory}</sourcedir>
                                         <imagesdir/>
 
+                                        <pdf-stylesdir>${project.basedir}/src/main/theme</pdf-stylesdir>
+                                        <pdf-style>custom</pdf-style>
+
                                         <icons>font</icons>
                                         <pagenums/>
                                         <toc/>
diff --git a/adocs/documentation/pom.xml b/adocs/documentation/pom.xml
index 3f76176..1beb1e4 100644
--- a/adocs/documentation/pom.xml
+++ b/adocs/documentation/pom.xml
@@ -41,14 +41,13 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <asciidoctor.maven.plugin.version>1.5.3</asciidoctor.maven.plugin.version>
-        <asciidoctorj.pdf.version>1.5.0-alpha.11</asciidoctorj.pdf.version>
-        <asciidoctorj.version>1.5.4.1</asciidoctorj.version>
-        <asciidoctorj.diagram.version>1.5.0</asciidoctorj.diagram.version>
+        <asciidoctor.maven.plugin.version>1.5.6</asciidoctor.maven.plugin.version>
+        <asciidoctorj.version>1.5.6</asciidoctorj.version>
+        <asciidoctorj.diagram.version>1.5.4.1</asciidoctorj.diagram.version>
         <incode-asciidoctor-extension-monotree.version>0.0.2</incode-asciidoctor-extension-monotree.version>
         <incode-asciidoctor-extension-improvethisdoc.version>0.0.4</incode-asciidoctor-extension-improvethisdoc.version>
 
-        <jruby.version>9.1.8.0</jruby.version>
+        <jruby.version>1.7.26</jruby.version>
 
         <build.dir>${project.basedir}/target/site</build.dir>
 
@@ -131,6 +130,16 @@
                         <requires>
                             <require>asciidoctor-diagram</require>
                         </requires>
+                        <attributes>
+                            <!-- Example below shows how to specify in this pom instead of System's PATH,
+                                 the location of dot command of Graphviz, required by PlantUML libraries -->
+                            <!-- Windows:
+                                <graphvizdot>C:\Program Files (x86)\Graphviz2.38\bin\dot.exe</graphvizdot>
+                            -->
+                            <!-- *nix :
+                                <graphvizdot>/usr/local/bin/dot</graphvizdot>
+                            -->
+                        </attributes>
                     </configuration>
                 </plugin>
             </plugins>
diff --git a/adocs/documentation/preview-html.sh b/adocs/documentation/preview-html.sh
index 092c692..3926261 100644
--- a/adocs/documentation/preview-html.sh
+++ b/adocs/documentation/preview-html.sh
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-mvn compile -o $* && python -m webbrowser -t http://localhost:4000 && pushd target/site && python -m http.server 4000 && popd
+mvn compile  $* && python -m webbrowser -t http://localhost:4000 && pushd target/site && python -m http.server 4000 && popd
 #mvn compile -Dreindex -o && python -m webbrowser -t http://localhost:4000 && pushd target/site && python -m http.server 4000 && popd
 
 #mvn compile -o && python -m webbrowser -t http://localhost:4000/guides/ugvw/ugvw.html && pushd target/site && python -m http.server 4000 && popd
diff --git a/adocs/documentation/preview-pdf.sh b/adocs/documentation/preview-pdf.sh
index 73ff28c..69edafa 100644
--- a/adocs/documentation/preview-pdf.sh
+++ b/adocs/documentation/preview-pdf.sh
@@ -1,2 +1,2 @@
 #!/usr/bin/env bash
-mvn compile -o -f pom-pdf.xml && mvn compile -o && python -m webbrowser -t http://localhost:4000 && pushd target/site && python -m http.server 4000 && popd
+mvn compile -f pom-pdf.xml && mvn compile -o && python -m webbrowser -t http://localhost:4000 && pushd target/site && python -m http.server 4000 && popd
diff --git a/adocs/documentation/src/main/asciidoc/guides/ad/ad.adoc b/adocs/documentation/src/main/asciidoc/guides/ad/ad.adoc
index 16e305a..21e6c65 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ad/ad.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ad/ad.adoc
@@ -128,10 +128,8 @@ Also defines registries of pages and components, as well as a number of domain s
 | `isis-core-viewer-wicket-ui`
 | UI components that render the moduls.
 
-//| `isis-webdocker`
-//| Creates a Docker image for Tomcat that also contains the Apache Isis libraries, thereby enabling "skinny war" support.
-
-// commented out because only added in 1.16.3-SNAPSHOT
+| `isis-webdocker`
+| Creates a Docker image for Tomcat that also contains the Apache Isis libraries, thereby enabling "skinny war" support.
 
 | `isis-core-webserver`
 | For development within an IDE, provides a utility class to bootstrap the application (using Jetty).
diff --git a/adocs/documentation/src/main/asciidoc/guides/cgcom/_cgcom_post-release-successful.adoc b/adocs/documentation/src/main/asciidoc/guides/cgcom/_cgcom_post-release-successful.adoc
index 42a089a..b7cee05 100644
--- a/adocs/documentation/src/main/asciidoc/guides/cgcom/_cgcom_post-release-successful.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/cgcom/_cgcom_post-release-successful.adoc
@@ -260,7 +260,7 @@ In the main `isis` repo (ie containing the asciidoc source):
 * Paste in the JIRA-generated release notes generated above, adding to top of `adocs/documentation/src/main/asciidoc/release-notes.adoc`.
 Also add a summary line for the release.
 
-* Update the link:../../__versions.adoc[__versions.adoc] file that declares the current and next releases.
+* Update the xref:../../__versions.adoc#[`__versions.adoc`] file that declares the current and next releases.
 
 * Update the xref:../../downloads.adoc#[downloads page] with a link to the source release zip file (under https://dist.apache.org/repos/dist/release/isis[https://dist.apache.org/repos/dist/release/isis])
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/dg/images/contributing/git-workflow.png b/adocs/documentation/src/main/asciidoc/guides/dg/images/contributing/git-workflow.png
index 606d35b..686ea47 100644
Binary files a/adocs/documentation/src/main/asciidoc/guides/dg/images/contributing/git-workflow.png and b/adocs/documentation/src/main/asciidoc/guides/dg/images/contributing/git-workflow.png differ
diff --git a/adocs/documentation/src/main/theme/custom-theme.yml b/adocs/documentation/src/main/theme/custom-theme.yml
new file mode 100644
index 0000000..b393860
--- /dev/null
+++ b/adocs/documentation/src/main/theme/custom-theme.yml
@@ -0,0 +1,278 @@
+# this is a copy of:
+# https://github.com/asciidoctor/asciidoctor-pdf/blob/master/data/themes/default-theme.yml
+#
+# see https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc
+# to customise further
+#
+font:
+  catalog:
+    # Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols
+    Noto Serif:
+      normal: notoserif-regular-subset.ttf
+      bold: notoserif-bold-subset.ttf
+      italic: notoserif-italic-subset.ttf
+      bold_italic: notoserif-bold_italic-subset.ttf
+    # M+ 1mn supports ASCII and the circled numbers used for conums
+    M+ 1mn:
+      normal: mplus1mn-regular-ascii-conums.ttf
+      bold: mplus1mn-bold-ascii.ttf
+      italic: mplus1mn-italic-ascii.ttf
+      bold_italic: mplus1mn-bold_italic-ascii.ttf
+    # M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols
+    # It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font
+    M+ 1p Fallback:
+      normal: mplus1p-regular-fallback.ttf
+      bold: mplus1p-regular-fallback.ttf
+      italic: mplus1p-regular-fallback.ttf
+      bold_italic: mplus1p-regular-fallback.ttf
+  fallbacks:
+    - M+ 1p Fallback
+page:
+  background_color: ffffff
+  layout: portrait
+  margin: [0.5in, 0.67in, 0.67in, 0.67in]
+  # margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress
+  margin_inner: 0.75in
+  margin_outer: 0.59in
+  size: A4
+base:
+  align: justify
+  # color as hex string (leading # is optional)
+  font_color: 333333
+  # color as RGB array
+  #font_color: [51, 51, 51]
+  # color as CMYK array (approximated)
+  #font_color: [0, 0, 0, 0.92]
+  #font_color: [0, 0, 0, 92%]
+  font_family: Noto Serif
+  # choose one of these font_size/line_height_length combinations
+  #font_size: 14
+  #line_height_length: 20
+  #font_size: 11.25
+  #line_height_length: 18
+  #font_size: 11.2
+  #line_height_length: 16
+  font_size: 10.5
+  #line_height_length: 15
+  # correct line height for Noto Serif metrics
+  line_height_length: 12
+  #font_size: 11.25
+  #line_height_length: 18
+  line_height: $base_line_height_length / $base_font_size
+  font_size_large: round($base_font_size * 1.25)
+  font_size_small: round($base_font_size * 0.85)
+  font_size_min: $base_font_size * 0.75
+  font_style: normal
+  border_color: eeeeee
+  border_radius: 4
+  border_width: 0.5
+# FIXME vertical_rhythm is weird; we should think in terms of ems
+#vertical_rhythm: $base_line_height_length * 2 / 3
+# correct line height for Noto Serif metrics (comes with built-in line height)
+vertical_rhythm: $base_line_height_length
+horizontal_rhythm: $base_line_height_length
+# QUESTION should vertical_spacing be block_spacing instead?
+vertical_spacing: $vertical_rhythm
+link:
+  font_color: 428bca
+# literal is currently used for inline monospaced in prose and table cells
+literal:
+  font_color: b12146
+  font_family: M+ 1mn
+menu_caret_content: " <font size=\"1.15em\"><color rgb=\"b12146\">\u203a</color></font> "
+heading:
+  align: left
+  #font_color: 181818
+  font_color: $base_font_color
+  font_family: $base_font_family
+  font_style: bold
+  # h1 is used for part titles (book doctype only)
+  h1_font_size: floor($base_font_size * 2.6)
+  # h2 is used for chapter titles (book doctype only)
+  h2_font_size: floor($base_font_size * 2.15)
+  h3_font_size: round($base_font_size * 1.7)
+  h4_font_size: $base_font_size_large
+  h5_font_size: $base_font_size
+  h6_font_size: $base_font_size_small
+  #line_height: 1.4
+  # correct line height for Noto Serif metrics (comes with built-in line height)
+  line_height: 1
+  margin_top: $vertical_rhythm * 0.4
+  margin_bottom: $vertical_rhythm * 0.9
+title_page:
+  align: right
+  #background_image: isis-logo.png
+  logo:
+    top: 10%
+  title:
+    top: 55%
+    font_size: $heading_h1_font_size
+    font_color: 999999
+    line_height: 0.9
+  subtitle:
+    font_size: $heading_h3_font_size
+    font_style: bold_italic
+    line_height: 1
+  authors:
+    margin_top: $base_font_size * 1.25
+    font_size: $base_font_size_large
+    font_color: 181818
+  revision:
+    margin_top: $base_font_size * 1.25
+block:
+  margin_top: 0
+  margin_bottom: $vertical_rhythm
+caption:
+  align: left
+  font_size: $base_font_size * 0.95
+  font_style: italic
+  # FIXME perhaps set line_height instead of / in addition to margins?
+  margin_inside: $vertical_rhythm / 3
+  #margin_inside: $vertical_rhythm / 4
+  margin_outside: 0
+lead:
+  font_size: $base_font_size_large
+  line_height: 1.4
+abstract:
+  font_color: 5c6266
+  font_size: $lead_font_size
+  line_height: $lead_line_height
+  font_style: italic
+  first_line_font_style: bold
+  title:
+    align: center
+    font_color: $heading_font_color
+    font_family: $heading_font_family
+    font_size: $heading_h4_font_size
+    font_style: $heading_font_style
+admonition:
+  column_rule_color: $base_border_color
+  column_rule_width: $base_border_width
+  padding: [0, $horizontal_rhythm, 0, $horizontal_rhythm]
+  #icon:
+  #  tip:
+  #    name: fa-lightbulb-o
+  #    stroke_color: 111111
+  #    size: 24
+  label:
+    text_transform: uppercase
+    font_style: bold
+blockquote:
+  font_color: $base_font_color
+  font_size: $base_font_size_large
+  border_color: $base_border_color
+  border_width: 5
+  # FIXME disable negative padding bottom once margin collapsing is implemented
+  padding: [0, $horizontal_rhythm, $block_margin_bottom * -0.75, $horizontal_rhythm + $blockquote_border_width / 2]
+  cite_font_size: $base_font_size_small
+  cite_font_color: 999999
+# code is used for source blocks (perhaps change to source or listing?)
+code:
+  font_color: $base_font_color
+  font_family: $literal_font_family
+  font_size: ceil($base_font_size)
+  padding: $code_font_size
+  line_height: 1.25
+  # line_gap is an experimental property to control how a background color is applied to an inline block element
+  line_gap: 3.8
+  background_color: f5f5f5
+  border_color: cccccc
+  border_radius: $base_border_radius
+  border_width: 0.75
+conum:
+  font_family: M+ 1mn
+  font_color: $literal_font_color
+  font_size: $base_font_size
+  line_height: 4 / 3
+example:
+  border_color: $base_border_color
+  border_radius: $base_border_radius
+  border_width: 0.75
+  background_color: ffffff
+  # FIXME reenable padding bottom once margin collapsing is implemented
+  padding: [$vertical_rhythm, $horizontal_rhythm, 0, $horizontal_rhythm]
+image:
+  align: left
+prose:
+  margin_top: $block_margin_top
+  margin_bottom: $block_margin_bottom
+sidebar:
+  background_color: eeeeee
+  border_color: e1e1e1
+  border_radius: $base_border_radius
+  border_width: $base_border_width
+  # FIXME reenable padding bottom once margin collapsing is implemented
+  padding: [$vertical_rhythm, $vertical_rhythm * 1.25, 0, $vertical_rhythm * 1.25]
+  title:
+    align: center
+    font_color: $heading_font_color
+    font_family: $heading_font_family
+    font_size: $heading_h4_font_size
+    font_style: $heading_font_style
+thematic_break:
+  border_color: $base_border_color
+  border_style: solid
+  border_width: $base_border_width
+  margin_top: $vertical_rhythm * 0.5
+  margin_bottom: $vertical_rhythm * 1.5
+description_list:
+  term_font_style: bold
+  term_spacing: $vertical_rhythm / 4
+  description_indent: $horizontal_rhythm * 1.25
+outline_list:
+  indent: $horizontal_rhythm * 1.5
+  #marker_font_color: 404040
+  # NOTE outline_list_item_spacing applies to list items that do not have complex content
+  item_spacing: $vertical_rhythm / 2
+table:
+  background_color: $page_background_color
+  #head_background_color: <hex value>
+  #head_font_color: $base_font_color
+  head_font_style: bold
+  #body_background_color: <hex value>
+  body_stripe_background_color: f9f9f9
+  foot_background_color: f0f0f0
+  border_color: dddddd
+  border_width: $base_border_width
+  cell_padding: 3
+toc:
+  indent: $horizontal_rhythm
+  line_height: 1.4
+  dot_leader:
+    #content: ". "
+    font_color: a9a9a9
+    #levels: 2 3
+# NOTE in addition to footer, header is also supported
+footer:
+  font_size: $base_font_size_small
+  # NOTE if background_color is set, background and border will span width of page
+  border_color: dddddd
+  border_width: 0.25
+  height: $base_line_height_length * 2.5
+  line_height: 1
+  padding: [$base_line_height_length / 2, 1, 0, 1]
+  vertical_align: top
+  #image_vertical_align: <alignment> or <number>
+  # additional attributes for content:
+  # * {page-count}
+  # * {page-number}
+  # * {document-title}
+  # * {document-subtitle}
+  # * {chapter-title}
+  # * {section-title}
+  # * {section-or-chapter-title}
+  recto:
+    #columns: "<50% =0% >50%"
+    right:
+      content: '{page-number}'
+      #content: '{section-or-chapter-title} | {page-number}'
+      #content: '{document-title} | {page-number}'
+    #center:
+    #  content: '{page-number}'
+  verso:
+    #columns: $footer_recto_columns
+    left:
+      content: $footer_recto_right_content
+      #content: '{page-number} | {chapter-title}'
+    #center:
+    #  content: '{page-number}'
\ No newline at end of file
diff --git a/adocs/documentation/src/main/theme/isis-logo.png b/adocs/documentation/src/main/theme/isis-logo.png
new file mode 100644
index 0000000..5284fe7
Binary files /dev/null and b/adocs/documentation/src/main/theme/isis-logo.png differ