Author: danhaywood
Date: Mon Nov 26 09:32:56 2012
New Revision: 1413528

URL: http://svn.apache.org/viewvc?rev=1413528&view=rev
Log:
working on isis documentation page

Modified:
    isis/site/trunk/content/download.md
    isis/site/trunk/lib/view.pm
    isis/site/trunk/templates/basic.html

Modified: isis/site/trunk/content/download.md
URL: 
http://svn.apache.org/viewvc/isis/site/trunk/content/download.md?rev=1413528&r1=1413527&r2=1413528&view=diff
==============================================================================
--- isis/site/trunk/content/download.md (original)
+++ isis/site/trunk/content/download.md Mon Nov 26 09:32:56 2012
@@ -4,7 +4,7 @@ In the meantime, you can download the Is
 
     svn checkout https://svn.apache.org/repos/asf/isis/trunk
 
-There is also a mirrored copy up on 
[github](https://github.com/danhaywood/apache-isis); we'll be moving over to 
Apache supported git infrastructure shortly.
+There is also a mirrored copy up on 
[github](https://github.com/danhaywood/apache-isis-tlp); we'll be moving over 
to Apache supported git infrastructure shortly.
 
 Mailing lists are:
 

Modified: isis/site/trunk/lib/view.pm
URL: 
http://svn.apache.org/viewvc/isis/site/trunk/lib/view.pm?rev=1413528&r1=1413527&r2=1413528&view=diff
==============================================================================
--- isis/site/trunk/lib/view.pm (original)
+++ isis/site/trunk/lib/view.pm Mon Nov 26 09:32:56 2012
@@ -1,6 +1,61 @@
 package view;
 use base 'ASF::View'; # see 
https://svn.apache.org/repos/infra/websites/cms/build/lib/ASF/View.pm
 
+use strict;
+use warnings;
+#use Carp;
+#use Dotiac::DTL;
+use ASF::Util qw( read_text_file );
+#use OpenEJBSiteDotiacFilter;
+#use Data::Dumper;
+
+# A "basic" view, which takes 'template' and 'path' parameters.
+# borrowed from openejb
+
+sub basic {
+    my %args = @_;
+    my $filepath = "content$args{path}";
+
+    print "basic $filepath";
+
+    read_text_file($filepath, \%args);
+
+    $args{path} =~ s/\.md$/\.html/;
+    $args{base} = _base($args{path});
+    $args{breadcrumbs} = _breadcrumbs($args{path}, $args{base});
+
+    my $template_path = "templates/$args{template}";
+
+    my @includes = ($args{content} =~ m/{include:([^ ]+?)}/g);
+
+    foreach my $include (@includes) {
+        next unless ( -e "content/$include");
+
+        my %a = ();
+        read_text_file("content/$include", \%a);
+        my $text = $a{content};
+        $args{headers}{title} = $a{headers}{title} unless 
$args{headers}{title};
+
+        # If the file to be included is in a child directory, resolve all the 
links
+        # in the included content to be relative to this document
+        if ($include =~ m,/,) {
+            my $ipath = $include;
+            $ipath =~ s,/[^/]*$,,;
+            $text =~ s,(\[[^[]+])\(([^/][^)]+)\),$1($ipath/$2),g;
+        }
+
+        $args{content} =~ s/{include:$include}/$text/g;
+    }
+
+    print " - rendering";
+
+    my $rendered = Dotiac::DTL->new($template_path)->render(\%args);
+
+    print " - complete\n";
+
+    return ($rendered, 'html', \%args);
+}
+
 
 1;
 

Modified: isis/site/trunk/templates/basic.html
URL: 
http://svn.apache.org/viewvc/isis/site/trunk/templates/basic.html?rev=1413528&r1=1413527&r2=1413528&view=diff
==============================================================================
--- isis/site/trunk/templates/basic.html (original)
+++ isis/site/trunk/templates/basic.html Mon Nov 26 09:32:56 2012
@@ -115,10 +115,8 @@
           <ul class="nav">
             <li><a href="{{base}}index.html">Home</a></li>
             <li><a href="{{base}}download.html">Download</a></li>
-            <!--
             <li><a href="{{base}}documentation.html">Documentation</a></li>
             <li><a href="{{base}}support.html">Support</a></li>
-            -->
           </ul>
 
             <!-- Google CSE Search Box Begins -->


Reply via email to