HBASE-11533 AsciiDoctor POC Addendum 2 to fix redirects during site generation

This commit is contained in:
Misty Stanley-Jones 2015-01-19 18:21:09 +10:00
parent f80691e583
commit 4d31779dd7
4 changed files with 29 additions and 9 deletions

View File

@ -1,8 +0,0 @@
# Redirect HTML-multi version of the book to HTML-single
# Rule added 2015-1-12 -- can be removed in 6 months
Redirect /book/ /book.html
# Redirect replication URL to the right section of the book
# Rule added 2015-1-12 -- can be removed in 6 months
Redirect /replication.html /book.html#cluster_replication

21
pom.xml
View File

@ -877,7 +877,7 @@
<outputDirectory>${basedir}/target/site</outputDirectory>
<resources>
<resource>
<directory>${basedir}/hbase-common/src/main/resources/</directory>
<directory>${basedir}/src/main/site/resources/</directory>
<includes>
<include>.htaccess</include>
</includes>
@ -885,6 +885,25 @@
</resources>
</configuration>
</execution>
<!-- needed to make the redirect above work -->
<execution>
<id>copy-empty-book-dir</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>post-site</phase>
<configuration>
<outputDirectory>${basedir}/target/site</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src/main/site/resources/</directory>
<includes>
<include>book/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
<configuration>
<escapeString>\</escapeString>

View File

@ -0,0 +1,8 @@
# Redirect replication URL to the right section of the book
# Rule added 2015-1-12 -- can be removed in 6 months
Redirect permanent /replication.html /book.html#_cluster_replication
# Redirect old page-per-chapter book sections to new single file.
RedirectMatch permanent ^/book/(.*)\.html$ /book.html#$1
RedirectMatch permanent ^/book/$ /book.html

View File

@ -0,0 +1 @@
# This directory is here so that we can have rewrite rules in our .htaccess to maintain old links. Otherwise we fall under some top-level niceness redirects because we have a file named book.html.