Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSKINS-242] Replace deprecated prettify JS library #65

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
10 changes: 6 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ under the License.
<anchorjs.version>4.3.1</anchorjs.version>
<bootstrap.version>2.3.2</bootstrap.version>
<jquery.version>1.11.2</jquery.version>
<highlightjs.version>11.10.0</highlightjs.version>
<version.maven-site-plugin>3.20.0</version.maven-site-plugin>
<project.build.outputTimestamp>2024-08-15T17:29:37Z</project.build.outputTimestamp>
<!-- the following properties are used in ITs (which do not inherit anything from a common parent) -->
Expand Down Expand Up @@ -136,11 +137,13 @@ under the License.
<!-- add skin-info -->
</resource>

<!-- include the print.css -->
<!-- include the some files -->
Copy link
Member

Choose a reason for hiding this comment

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

The comment is not helpful and contains a typo, let us remove it altogether.

<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>css/print.css</include>
<include>css/highlight-default-${highlightjs.version}.min.css</include>
<include>js/highlight-${highlightjs.version}.min.js</include>
</includes>
</resource>

Expand All @@ -162,10 +165,11 @@ under the License.
<configuration>
<excludes combine.children="append">
<exclude>src/main/resources/fonts/glyphicons-halflings-regular.svg</exclude>
<exclude>src/main/resources/js/prettify.js</exclude>
<exclude>src/main/resources/js/highlight-*.js</exclude>
<exclude>src/main/resources/js/jquery-*.js</exclude>
<exclude>src/main/resources/js/anchor-*.js</exclude>
<exclude>src/main/resources/css/gh-fork-ribbon.css</exclude>
<exclude>src/main/resources/css/highlight-default-*.css</exclude>
</excludes>
</configuration>
</plugin>
Expand Down Expand Up @@ -215,15 +219,13 @@ under the License.
<cssSourceFile>bootstrap-${bootstrap.version}-responsive.css</cssSourceFile>
<cssSourceFile>maven-base.css</cssSourceFile>
<cssSourceFile>maven-theme.css</cssSourceFile>
<cssSourceFile>prettify.css</cssSourceFile>
<cssSourceFile>gh-fork-ribbon.css</cssSourceFile>
</cssSourceFiles>
<cssFinalFile>apache-maven-fluido-${project.version}.css</cssFinalFile>
<jsSourceDir>js</jsSourceDir>
<jsSourceFiles>
<jsSourceFile>jquery-${jquery.version}.js</jsSourceFile>
<jsSourceFile>bootstrap-${bootstrap.version}.js</jsSourceFile>
<jsSourceFile>prettify.js</jsSourceFile>
<jsSourceFile>fluido.js</jsSourceFile>
<jsSourceFile>anchor-${anchorjs.version}.js</jsSourceFile>
</jsSourceFiles>
Expand Down
11 changes: 4 additions & 7 deletions src/main/resources/META-INF/maven/site.vm
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@
#end
<title>$esc.xml( $title )</title>
<link rel="stylesheet" href="$relativePath/css/apache-maven-fluido-@project.version@.min.css" />
<link rel="stylesheet" href="$relativePath/css/highlight-default-@highlightjs.version@.min.css">
<link rel="stylesheet" href="$relativePath/css/site.css" />
<link rel="stylesheet" href="$relativePath/css/print.css" media="print" />
#**##prjProfile()
<script src="$relativePath/js/apache-maven-fluido-@project.version@.min.js"></script>
<script src="$relativePath/js/highlight-@highlightjs.version@.min.js"></script>
<script>hljs.highlightAll();</script>
#**##if( $site.body.head )
#* *#$render.eval( $site.body.head )
#**##end
Expand Down Expand Up @@ -233,13 +236,7 @@
#* *##set( $bodyColumnClass = $site.getCustomValue( 'fluidoSkin.bodyColumnClass', 'span10' ) )
##
<main id="bodyColumn"#if( $sideBarEnabled ) class="$bodyColumnClass"#end>
#* *##if( $convert.toBoolean( $site.getCustomValue( 'fluidoSkin.sourceLineNumbersEnabled', 'false' ) ) )
#* *##set( $sourceStyle = "prettyprint linenums" )
#* *##else
#* *##set( $sourceStyle = "prettyprint" )
#* *##end
##
#* *##if ( $bodyContent )$bodyContent.replaceAll( '<pre>(<code[ >])', '<pre class="' + $sourceStyle + '">' + $esc.d + '1' ).replace( 'class="bodyTable"', 'class="table table-striped"' ).replace( 'class="bodyTable bodyTableBorder"', 'class="table table-bordered table-striped"' )#end
#* *##if ( $bodyContent )$bodyContent.replace( 'class="bodyTable"', 'class="table table-striped"' ).replace( 'class="bodyTable bodyTableBorder"', 'class="table table-bordered table-striped"' )#end
</main>
#* *##if( $sideBarEnabled )
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/css/highlight-default-11.10.0.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions src/main/resources/css/prettify.css

This file was deleted.

Loading