You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ct...@apache.org on 2017/06/09 22:10:19 UTC

[2/2] lucene-solr:branch_6x: SOLR-10616: parameterize Guide HTML path in sitemap.xml

SOLR-10616: parameterize Guide HTML path in sitemap.xml


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/74904dbd
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/74904dbd
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/74904dbd

Branch: refs/heads/branch_6x
Commit: 74904dbd66942c49cc7e71d10b61ca09515edbfa
Parents: 7b00d82
Author: Cassandra Targett <ct...@apache.org>
Authored: Fri Jun 9 17:06:27 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Fri Jun 9 17:09:06 2017 -0500

----------------------------------------------------------------------
 solr/solr-ref-guide/build.xml                | 31 +++++++++++++++--------
 solr/solr-ref-guide/src/_config.yml.template |  3 ++-
 solr/solr-ref-guide/src/sitemap.xml          |  2 +-
 3 files changed, 24 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/74904dbd/solr/solr-ref-guide/build.xml
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/build.xml b/solr/solr-ref-guide/build.xml
index 4e00992..6a610b1 100644
--- a/solr/solr-ref-guide/build.xml
+++ b/solr/solr-ref-guide/build.xml
@@ -44,34 +44,45 @@
     </filterchain>
   </loadresource>
   <!-- NOTE: ${solr-guide-version} is the version of this ref-guide.
-       
+
        By default, we assume this is the same as ${solr-docs-version} with a "-DRAFT" suffix
        When releasing, specify an explicit value of this property on the command line.
-       
+
        NOTE: the ${solr-guide-version} used *may* be different from the version of Solr the guide
        covers if we decide to do a bug-fix release of the ref-guide
-       
+
        Examples: (assume branch_6_1 where version=6.1.SOMETHING)
-       
+
        Basic nightly/local build of the 6.1 guide...
-       
+
        => ant build-pdf
-       
+
        Official release build of the 6.1 guide...
-       
+
        => ant build-pdf -Dsolr-guide-version=6.1
-       
+
        Release of a "6.1.1" ref guide, correcting some serious error in the docs
        (even if there is no 6.1.1 version - or if we've alreayd released up to 6.1.5 - of Solr itself)
-       
+
        => ant build-pdf -Dsolr-guide-version=6.1.1
-       
+
   -->
   <property name="solr-guide-version" value="${solr-docs-version}-DRAFT" />
   <condition property="solr-guide-draft-status" value="" else="DRAFT">
     <matches pattern="^\d+\.\d+(|\.\d+)$" string="${solr-guide-version}" />
   </condition>
 
+  <loadresource property="solr-guide-version-path">
+    <!-- NOTE: This is the ${solr-guide-version} as a path suitable for use publishing the HTML -->
+    <propertyresource name="solr-guide-version"/>
+    <filterchain>
+      <tokenfilter>
+        <filetokenizer/>
+        <replaceregex pattern="^(\d+)\.(\d+)(-DRAFT)?.*" replace="\1_\2\3" flags="s"/>
+      </tokenfilter>
+    </filterchain>
+  </loadresource>
+
   <property name="solr-javadocs" value="https://lucene.apache.org/solr/${solr-docs-version-path}/" />
   <property name="lucene-javadocs" value="https://lucene.apache.org/core/${solr-docs-version-path}/" />
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/74904dbd/solr/solr-ref-guide/src/_config.yml.template
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/_config.yml.template b/solr/solr-ref-guide/src/_config.yml.template
index 0db495e..9d40209 100755
--- a/solr/solr-ref-guide/src/_config.yml.template
+++ b/solr/solr-ref-guide/src/_config.yml.template
@@ -55,7 +55,7 @@ defaults:
       search: true
 
 # needed for sitemap.xml
-url: https://home.apache.org/~ctargett/RefGuidePOC/jekyll-full
+url: https://lucene.apache.org/solr/guide/
 
 # Asciidoc settings - disabled so we can use asciidoctor instead
 asciidoc: {}
@@ -71,6 +71,7 @@ asciidoc: {}
 solr-attributes: &solr-attributes-ref
   solr-guide-draft-status: "${solr-guide-draft-status}"
   solr-guide-version: "${solr-guide-version}"
+  solr-guide-version-path: "${solr-guide-version-path}"
   solr-docs-version: "${solr-docs-version}"
   solr-javadocs: "${solr-javadocs}"
   lucene-javadocs: "${lucene-javadocs}"

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/74904dbd/solr/solr-ref-guide/src/sitemap.xml
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/sitemap.xml b/solr/solr-ref-guide/src/sitemap.xml
index d5fa97a..ba2032d 100755
--- a/solr/solr-ref-guide/src/sitemap.xml
+++ b/solr/solr-ref-guide/src/sitemap.xml
@@ -10,7 +10,7 @@ search: exclude
   {% for page in site.pages %}
   {% unless page.search == "exclude" %}
   <url>
-    <loc>{{site.url}}{{page.url}}</loc>
+    <loc>{{site.url}}{{site.solr-attributes.solr-guide-version-path}}{{page.url}}</loc>
   </url>
   {% endunless %}
   {% endfor %}