Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions dev-support/jenkins-scripts/generate-hbase-website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ else
exit $status
fi

# Workaround to replace MathJax CDN URI with local one in book.html
# There is no way to influence from where the book.html Asciidoc includes the MathJax.js library.
# https://docs.asciidoctor.org/asciidoctor/latest/stem/mathjax/
# https://docs.asciidoctor.org/asciidoc/latest/attributes/document-attributes-ref/
# https://github.com/asciidoctor/asciidoctor/issues/761
echo "Replace MathJax URI"
sed -i 's,https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/,js/,g' "${component_dir}"/target/site/book.html

# Stage the site
echo "Staging HBase site"
mvn \
Expand Down
128 changes: 128 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@
<!-- Required for testing LDAP integration -->
<apacheds.version>2.0.0.AM26</apacheds.version>
<ldap-api.version>2.0.0</ldap-api.version>
<webjars-dir>${project.build.directory}/META-INF/resources/webjars</webjars-dir>
</properties>
<!-- Sorted by groups of dependencies then groupId and artifactId -->
<dependencyManagement>
Expand Down Expand Up @@ -2749,6 +2750,82 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>pre-site</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.webjars</groupId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, Today I Learn

<artifactId>bootstrap</artifactId>
<version>2.3.2</version>
<type>jar</type>
<overWrite>true</overWrite>
<includes>**/css/bootstrap-responsive.min.css</includes>
</artifactItem>
<artifactItem>
<groupId>org.webjars</groupId>
<artifactId>highlightjs</artifactId>
<version>8.7</version>
<type>jar</type>
<overWrite>true</overWrite>
<includes>**/styles/github.min.css,
**/highlight.min.js,</includes>
</artifactItem>
<artifactItem>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>4.7.0</version>
<type>jar</type>
<overWrite>true</overWrite>
<includes>**/css/font-awesome.css,
**/fonts/fontawesome-webfont.eot,
**/fonts/fontawesome-webfont.svg,
**/fonts/fontawesome-webfont.ttf,
**/fonts/fontawesome-webfont.woff,
**/fonts/fontawesome-webfont.woff2,</includes>
</artifactItem>
<artifactItem>
<groupId>org.webjars</groupId>
<artifactId>MathJax</artifactId>
<version>2.7.0</version>
<type>jar</type>
<overWrite>true</overWrite>
<includes>**/MathJax.js,
**/config/TeX-MML-AM_HTMLorMML.js,
**/jax/output/HTML-CSS/jax.js,
**/jax/output/HTML-CSS/imageFonts.js,
**/jax/output/HTML-CSS/fonts/TeX/fontdata.js,
**/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Main.js,
**/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/BasicLatin.js,
**/extensions/MathMenu.js,
**/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff,
**/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff,
**/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff,
**/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff,
**/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff,
**/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff,
**/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf,
**/fonts/HTML-CSS/TeX/otf/MathJax_Main-Italic.otf,
**/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf,
**/fonts/HTML-CSS/TeX/otf/MathJax_Size1-Regular.otf,
**/fonts/HTML-CSS/TeX/otf/MathJax_Size3-Regular.otf,
**/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Italic.otf,</includes>
</artifactItem>
</artifactItems>
<!-- TODO paksyd: Check if this is bundled in our assembly tarballs! -->
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Special configuration for spotbugs just in the parent so
the filter file location can be more general (see definition in pluginManagement) -->
<plugin>
Expand Down Expand Up @@ -2802,6 +2879,8 @@
<docVersion>${project.version}</docVersion>
<imagesdir>images</imagesdir>
<source-highlighter>coderay</source-highlighter>
<iconfont-remote>false</iconfont-remote>
<stylesdir>css</stylesdir>
</attributes>
</configuration>
<dependencies>
Expand Down Expand Up @@ -2910,6 +2989,55 @@
</target>
</configuration>
</execution>
<!-- Copy static CSS and JS files for the website. -->
<execution>
<id>copy-css-js-to-site</id>
<goals>
<goal>run</goal>
</goals>
<phase>pre-site</phase>
<configuration>
<target>
<copy flatten="true" todir="${project.build.directory}/site/css">
<fileset dir="${webjars-dir}/bootstrap/2.3.2/css">
<include name="bootstrap-responsive.min.css"/>
</fileset>
<fileset dir="${webjars-dir}/highlightjs/8.7/styles">
<include name="github.min.css"/>
</fileset>
<fileset dir="${webjars-dir}/font-awesome/4.7.0/css">
<include name="font-awesome.css"/>
</fileset>
</copy>
<copy flatten="true" todir="${project.build.directory}/site/js">
<fileset dir="${webjars-dir}/highlightjs/8.7/">
<include name="highlight.min.js"/>
</fileset>
<fileset dir="${webjars-dir}/MathJax/2.7.0">
<include name="MathJax.js"/>
</fileset>
</copy>
<copy flatten="false" todir="${project.build.directory}/site/js">
<fileset dir="${webjars-dir}/MathJax/2.7.0">
<include name="config/TeX-MML-AM_HTMLorMML.js"/>
<include name="jax/output/HTML-CSS/jax.js"/>
<include name="jax/output/HTML-CSS/imageFonts.js"/>
<include name="jax/output/HTML-CSS/fonts/TeX/fontdata.js"/>
<include name="jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Main.js"/>
<include name="jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/BasicLatin.js"/>
<include name="extensions/MathMenu.js"/>
<include name="fonts/HTML-CSS/TeX/woff/MathJax_*.woff"/>
<include name="fonts/HTML-CSS/TeX/otf/MathJax_*.otf"/>
</fileset>
</copy>
<copy flatten="true" todir="${project.build.directory}/site/fonts">
<fileset dir="${webjars-dir}/font-awesome/4.7.0/fonts">
<include name="fontawesome-webfont.*"/>
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@
<body>
<head>
<![CDATA[<meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap-responsive.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css"/>
<link rel="stylesheet" href="css/bootstrap-responsive.min.css"/>
<link rel="stylesheet" href="css/github.min.css"/>
<link rel="stylesheet" href="css/site.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js"></script>]]>
<script src="js/highlight.min.js"></script>]]>
</head>
<menu name="Apache HBase Project">
<item name="Overview" href="index.html"/>
Expand Down