trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1164324 - in /trafficserver/site/branches/ats-cms: build.sh content/docs/trunk/admin/getting-started/index.en.mdtext lib/view.pm templates/docs_page.html
Date Fri, 02 Sep 2011 01:36:34 GMT
Author: amc
Date: Fri Sep  2 01:36:34 2011
New Revision: 1164324

URL: http://svn.apache.org/viewvc?rev=1164324&view=rev
Log:
Fixed auto nav link control. Fixed build script to be more robust and changeable.

Modified:
    trafficserver/site/branches/ats-cms/build.sh
    trafficserver/site/branches/ats-cms/content/docs/trunk/admin/getting-started/index.en.mdtext
    trafficserver/site/branches/ats-cms/lib/view.pm
    trafficserver/site/branches/ats-cms/templates/docs_page.html

Modified: trafficserver/site/branches/ats-cms/build.sh
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/build.sh?rev=1164324&r1=1164323&r2=1164324&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/build.sh (original)
+++ trafficserver/site/branches/ats-cms/build.sh Fri Sep  2 01:36:34 2011
@@ -16,6 +16,10 @@
 #           specific language governing permissions and limitations
 #           under the License.
 
+# Where the Apache CMS stuff lives. We might need to drill down to the build
+# directory if the luser has done a full checkout. Allow override from env.
+APACHE_CMS=${APACHE_CMS:-cms}
+
 mkdir -p ../cms/log
 export MARKDOWN_SOCKET=$( readlink -f ../cms/log/md.sock )
 [ ! -d $( dirname "${MARKDOWN_SOCKET}" ) ]  && {
@@ -24,10 +28,19 @@ export MARKDOWN_SOCKET=$( readlink -f ..
 	exit 1
 }
 
+# Where the ATS content lives.
+# Default to ats-cms but allow enviromental override.
+# Relative to the directory above the directory containing this script.
+ATS_CONTENT=${ATS_CONTENT:-ats-cms}
+
+if [ -d "../$APACHE_CMS/build" ] ; then
+	APACHE_CMS="$APACHE_CMS/build"
+fi
+
 pgrep -f markdownd.py  >/dev/null || {
-	cd ../cms
+	cd ../$APACHE_CMS
 	python markdownd.py
 }
 
 cd ..
-$PWD/cms/build_site.pl --source-base ats-cms --target-base   ats-cms-docroot
+$PWD/$APACHE_CMS/build_site.pl --source-base ${ATS_CONTENT}  --target-base ats-cms-docroot

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/admin/getting-started/index.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/admin/getting-started/index.en.mdtext?rev=1164324&r1=1164323&r2=1164324&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/admin/getting-started/index.en.mdtext
(original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/admin/getting-started/index.en.mdtext
Fri Sep  2 01:36:34 2011
@@ -15,7 +15,7 @@ Notice:    Licensed to the Apache Softwa
            KIND, either express or implied.  See the License for the
            specific language governing permissions and limitations
            under the License.
-
+Navigation: [*](*)
 
 # Getting Started # {#GettingStarted}
 

Modified: trafficserver/site/branches/ats-cms/lib/view.pm
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/lib/view.pm?rev=1164324&r1=1164323&r2=1164324&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/lib/view.pm (original)
+++ trafficserver/site/branches/ats-cms/lib/view.pm Fri Sep  2 01:36:34 2011
@@ -53,17 +53,17 @@ sub single_narrative {
     my $chain = ascend($file);
 
     # Debugging support
-    # This lets me set the style sheet correctly when writing
-    # to the local disk.
-    $args{style} = $ENV{TS_STYLE} if $ENV{TS_STYLE};
-
+    # Set the base URL for the page.
+    $args{page_base} = $ENV{ATS_PAGE_BASE} if $ENV{ATS_PAGE_BASE};
+    # This controls the base directory for ancillary files (like style sheets).
+    # By default those are at root, setting this prepends a path.
+    $args{anc_base} = $ENV{ATS_PAGE_ANC_BASE} if $ENV{ATS_PAGE_ANC_BASE};
+    
     load_vars($chain, \%args);
-read_text_file $file, \%args;
-    if ($args{headers}->{navigation}) {
-        nav_links($chain, \%args);
-}
+    read_text_file $file, \%args;
+    nav_links($chain, \%args) if $args{headers}{navigation};
 
-return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
+    return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
 }
 
 # Has the same behavior as the above for foo.page/bar.txt

Modified: trafficserver/site/branches/ats-cms/templates/docs_page.html
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/templates/docs_page.html?rev=1164324&r1=1164323&r2=1164324&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/templates/docs_page.html (original)
+++ trafficserver/site/branches/ats-cms/templates/docs_page.html Fri Sep  2 01:36:34 2011
@@ -3,22 +3,22 @@
 <html xmlns="http://www.w3.org/1999/xhtml"
   xml:lang="{{ headers.lang|default:"en" }}" lang="{{ headers.lang|default:"en" }}">
   <head>
+    {% if page_base %}<base href="{{ page_base }}" />{% endif %}
+    <title>{{ headers.title }}</title>
+    {% if headers.notice %}<!-- {{ headers.notice }} -->{% endif %}
     {% if headers.atom %}
     <link rel="alternate" href="{{ headers.atom.url }}"
     type="application/atom+xml" title="{{ headers.atom.title }}" />
     {% endif %}
     <!-- The 1140px Grid - http://cssgrid.net/ -->
-    <link rel="stylesheet" type="text/css" href="/styles/1140.css" media="screen" />
-    <link rel="stylesheet" type="text/css" href="/styles/pygments_style.css" />
-    <link rel="stylesheet" type="text/css" href="/styles/ts.css" />
+    <link rel="stylesheet" type="text/css" href="{% if anc_base %}{{ anc_base }}{% endif
%}/styles/1140.css" media="screen" />
+    <link rel="stylesheet" type="text/css" href="{% if anc_base %}{{ anc_base }}{% endif
%}/styles/pygments_style.css" />
+    <link rel="stylesheet" type="text/css" href="{% if anc_base %}{{ anc_base }}{% endif
%}/styles/ts.css" />
     {% if style %}
     <link rel="stylesheet" type="text/css" href="{{ style }}" />
     {% endif %}
     <!--css3-mediaqueries-js - http://code.google.com/p/css3-mediaqueries-js/ - Enables
media queries in some unsupported browsers-->
     <script type="text/javascript" src="/js/css3-mediaqueries.js"></script>
-    {% if headers.base %}<base href="{{ headers.base }}" />{% endif %}
-    <title>{{ headers.title }}</title>
-    {% if headers.notice %}<!-- {{ headers.notice }} -->{% endif %}
   </head>
 
   <body>
@@ -43,9 +43,9 @@
       {% else %}
       <div class="twelvecol">
       {% endif %}
-          {% for item in nav %}
-          {% if item.url  %}<a href="{{item.url}}">{{ item.text }}</a>{% endif
%}
-          {% endfor %}
+      {% for item in nav %}
+      {% if item.url  %}<a href="{{item.url}}">{{ item.text }}</a>{% endif %}
+      {% endfor %}
       </div>
       {% if lang %}
       <div class="fourcol last right">



Mime
View raw message