Author: sebb
Date: Sat Apr 28 20:15:40 2018
New Revision: 1830477

URL: http://svn.apache.org/viewvc?rev=1830477&view=rev
Log:
Build relative URLs into page generation

Modified:
    attic/site-jekyll/build.sh
    attic/site-jekyll/src/_includes/menu.html
    attic/site-jekyll/src/_includes/project.list
    attic/site-jekyll/src/_layouts/project.html
    attic/site-jekyll/src/index.html
    attic/site-jekyll/src/process.html
    attic/site-jekyll/src/resolution.html

Modified: attic/site-jekyll/build.sh
URL: 
http://svn.apache.org/viewvc/attic/site-jekyll/build.sh?rev=1830477&r1=1830476&r2=1830477&view=diff
==============================================================================
--- attic/site-jekyll/build.sh (original)
+++ attic/site-jekyll/build.sh Sat Apr 28 20:15:40 2018
@@ -1,7 +1,3 @@
 #!/usr/bin/env bash
 
 bundle exec jekyll build --source "src" --destination "docs"
-
-# Make the URLs relative for browser testing
-perl -i -p -e 's!href="/!href="!g' docs/*.html
-perl -i -p -e 's!href="/!href="../!g' docs/projects/*.html
\ No newline at end of file

Modified: attic/site-jekyll/src/_includes/menu.html
URL: 
http://svn.apache.org/viewvc/attic/site-jekyll/src/_includes/menu.html?rev=1830477&r1=1830476&r2=1830477&view=diff
==============================================================================
--- attic/site-jekyll/src/_includes/menu.html (original)
+++ attic/site-jekyll/src/_includes/menu.html Sat Apr 28 20:15:40 2018
@@ -1,8 +1,8 @@
 <div>
                <div class="menuheader">The Apache Attic</div>
   <ul>
-          <li><a href="/">Home</a></li> 
-          <li><a href="/process.html">Process</a></li> 
+          <li><a href="{{ page.myrelativeurl }}index.html">Home</a></li> 
+          <li><a href="{{ page.myrelativeurl }}process.html">Process</a></li> 
           <li><a href="http://issues.apache.org/jira/browse/ATTIC";>Process 
tracking</a></li> 
           <li><a 
href="https://whimsy.apache.org/board/minutes/Attic.html";>Board 
Minutes</a></li> 
           <li><a href="http://www.apache.org/licenses/";>License</a></li> 

Modified: attic/site-jekyll/src/_includes/project.list
URL: 
http://svn.apache.org/viewvc/attic/site-jekyll/src/_includes/project.list?rev=1830477&r1=1830476&r2=1830477&view=diff
==============================================================================
--- attic/site-jekyll/src/_includes/project.list (original)
+++ attic/site-jekyll/src/_includes/project.list Sat Apr 28 20:15:40 2018
@@ -1,4 +1,4 @@
      <h6>Projects in the Attic</h6>
   <ul>{% for project in site.data.projects %}
-          <li><a href="/projects/{{ project.stem }}.html">{{ project.name 
}}</a></li> {% endfor %}
+          <li><a href="{{ page.myrelativeurl }}projects/{{ project.stem 
}}.html">{{ project.name }}</a></li> {% endfor %}
       </ul>
\ No newline at end of file

Modified: attic/site-jekyll/src/_layouts/project.html
URL: 
http://svn.apache.org/viewvc/attic/site-jekyll/src/_layouts/project.html?rev=1830477&r1=1830476&r2=1830477&view=diff
==============================================================================
--- attic/site-jekyll/src/_layouts/project.html (original)
+++ attic/site-jekyll/src/_layouts/project.html Sat Apr 28 20:15:40 2018
@@ -1,3 +1,7 @@
+---
+# define relative url to top level so menu.html and project.list can generate 
the correct relative URLs
+myrelativeurl: ../
+---
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
 <!--

Modified: attic/site-jekyll/src/index.html
URL: 
http://svn.apache.org/viewvc/attic/site-jekyll/src/index.html?rev=1830477&r1=1830476&r2=1830477&view=diff
==============================================================================
--- attic/site-jekyll/src/index.html (original)
+++ attic/site-jekyll/src/index.html Sat Apr 28 20:15:40 2018
@@ -1,5 +1,7 @@
 ---
 # TODO: convert to markdown
+# define relative url to top level so menu.html and project.list can generate 
the correct relative URLs
+myrelativeurl: ''
 ---
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

Modified: attic/site-jekyll/src/process.html
URL: 
http://svn.apache.org/viewvc/attic/site-jekyll/src/process.html?rev=1830477&r1=1830476&r2=1830477&view=diff
==============================================================================
--- attic/site-jekyll/src/process.html (original)
+++ attic/site-jekyll/src/process.html Sat Apr 28 20:15:40 2018
@@ -1,5 +1,7 @@
 ---
 # TODO: convert to markdown
+# define relative url to top level so menu.html and project.list can generate 
the correct relative URLs
+myrelativeurl: ''
 ---
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

Modified: attic/site-jekyll/src/resolution.html
URL: 
http://svn.apache.org/viewvc/attic/site-jekyll/src/resolution.html?rev=1830477&r1=1830476&r2=1830477&view=diff
==============================================================================
--- attic/site-jekyll/src/resolution.html (original)
+++ attic/site-jekyll/src/resolution.html Sat Apr 28 20:15:40 2018
@@ -1,5 +1,7 @@
 ---
 # TODO: convert to markdown
+# define relative url to top level so menu.html and project.list can generate 
the correct relative URLs
+myrelativeurl: ''
 ---
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>


Reply via email to