You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2010/10/23 04:33:41 UTC
svn commit: r1026546 - in /trafficserver/site/branches/ats-cms: content/
content/docs/ content/docs/admin/ content/docs/sdk/ lib/ templates/
templates/blocks/
Author: igalic
Date: Sat Oct 23 02:33:41 2010
New Revision: 1026546
URL: http://svn.apache.org/viewvc?rev=1026546&view=rev
Log:
Copied lib/ and templates from https://svn.apache.org/repos/infra/infrastructure/trunk/projects/cms/prototype/www/trunk/
Added footer to template, outlined with index page.
Added:
trafficserver/site/branches/ats-cms/content/
trafficserver/site/branches/ats-cms/content/docs/
trafficserver/site/branches/ats-cms/content/docs/admin/
trafficserver/site/branches/ats-cms/content/docs/sdk/
trafficserver/site/branches/ats-cms/content/index.mdtext
trafficserver/site/branches/ats-cms/lib/
trafficserver/site/branches/ats-cms/lib/path.pm
trafficserver/site/branches/ats-cms/lib/view.pm
trafficserver/site/branches/ats-cms/templates/
trafficserver/site/branches/ats-cms/templates/blocks/
trafficserver/site/branches/ats-cms/templates/blocks/README
trafficserver/site/branches/ats-cms/templates/single_narrative.html
Added: trafficserver/site/branches/ats-cms/content/index.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/index.mdtext?rev=1026546&view=auto
==============================================================================
--- trafficserver/site/branches/ats-cms/content/index.mdtext (added)
+++ trafficserver/site/branches/ats-cms/content/index.mdtext Sat Oct 23 02:33:41 2010
@@ -0,0 +1,136 @@
+Title: Apache Traffic Server
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+Apache Traffic Server⢠is fast, scalable and extensible HTTP/1.1 compliant
+caching proxy server. Formerly a commercial product, Yahoo! donated it to
+the Apache Foundation, and is now an Apache TLP. Here's a
+[Traffic Server overview](http://ostatic.com/blog/guest-post-yahoos-cloud-team-open-sources-traffic-server).
+
+# Overview # {#overview}
+
+## Caching ##
+Improve your response time, while reducing server load and bandwidth
+needs by caching and reusing frequently-requested web pages, images,
+and web service calls.
+
+## Proxying ##
+Easily add keep-alive, filter or anonymize content requests, or add
+load balancing by adding a proxy layer.
+
+## Fast ##
+Scales well on modern SMP hardware, handling 10s of thousands of
+requests per second.
+
+## Extensible ##
+APIs to write your own plug-ins to do anything from modifying HTTP
+headers to handling ESI requests to writing your own cache algorithm.
+
+## Proven ##
+Handing over 400TB a day at [Yahoo!](http://www.yahoo.com/) both as
+forward and reverse proxies, Traffic Server is battle hardened.
+
+# Learn More # {#learn-more}
+## Web Resources ## {#web-resources}
+
+### [Administrator's Guide](/docs/admin/) ###
+Installing, configuring and administrating Traffic Server
+
+### [SDK Programmer's Guide](/docs/sdk/) ###
+Developing Traffic Server plug-ins and how the code works
+
+### [Frequently Asked Questions](http://cwiki.apache.org/TS/faq.html) ###
+A running list of your most common questions
+
+### [Wiki](http://cwiki.apache.org/TS/traffic-server.html) ###
+
+## Mailing Lists ## {#mailing-lists}
+*Users* - General discussion list for users.
+
+[Subscribe](mailto:users-subscribe@trafficserver.apache.org) | [Unsubscribe](mailto:users-unsubscribe@trafficserver.apache.org) | [Archives](http://www.mail-archive.com/users@trafficserver.apache.org/)
+
+
+*Developers* - Development related discussion.
+
+[Subscribe](mailto:dev-subscribe@trafficserver.apache.org) | [Unsubscribe](mailto:dev-unsubscribe@trafficserver.apache.org) | [Archives](http://www.mail-archive.com/dev@trafficserver.apache.org/)
+
+*Commits* - Commit notification source repository.
+
+[Subscribe](mailto:commits-subscribe@trafficserver.apache.org) | [Unsubscribe](mailto:commits-unsubscribe@trafficserver.apache.org) | [Archives](http://www.mail-archive.com/commits@trafficserver.apache.org/)
+
+*Issues* - Jira issue notifications.
+
+[Subscribe](mailto:issues-subscribe@trafficserver.apache.org) | [Unsubscribe](mailto:issues-unsubscribe@trafficserver.apache.org) | [Archives](http://www.mail-archive.com/issues@trafficserver.apache.org/)
+
+## Chat ## {#chat}
+Many of the Traffic Server developers and community members hang out in
+the *#traffic-server* channel on [irc.freenode.net](http://freenode.net/).
+
+# News # {#news}
+- *September 27, 2010:* Traffic Server 2.1.3-unstable is now available
+ on the [Apache mirrors](http://www.apache.org/dyn/closer.cgi/trafficserver/)
+ and fixes a cache corruption issue in 2.1.2.
+
+- *September 1, 2010:* We are pleased to announce that Traffic Server
+ 2.1.2-unstable and the stable 2.0.1 are now available on the
+ [Apache mirrors](http://www.apache.org/dyn/closer.cgi/trafficserver/).
+ Both releases improve resilience against DNS poisoning and forging of
+ response packets. The 2.1.2 release fixes a few bugs with 2.1.1 and
+ cleans up several other code areas.
+
+- *June 7, 2010:* We are pleased to announce that Traffic Server
+ 2.1.1-unstable is now available on the
+ [Apache mirrors] (http://www.apache.org/dyn/closer.cgi/trafficserver/).
+ This is an unstable release from the development line so all issues
+ reported will be fixed in the trunk. That said, 2.1.1-unstable brings
+ a completely new, flexible configuration layout, simplifying the build
+ and packaging task for binary distributions; performance improvements
+ on cache for larger(ish) objects; and the HTTP state machine is now
+ 64-bit "clean", allowing for caching and proxying documents larger than 2GB.
+
+- May 18, 2010: We are pleased to announce that Traffic Server 2.1.0-unstable
+ is now available on the
+ [Apache mirrors](http://www.apache.org/dyn/closer.cgi/trafficserver/).
+ This is an unstable release from the development line so all issues reported
+ will be fixed in the trunk. That said, 2.1.0-unstable brings a number of
+ features and performance improvements including support for FreeBSD, MacOSX
+ and Solaris, improved cache seek/write efficiency, 64-bit support, and
+ dramatically reduced miss latency.
+
+- *May 10, 2010:* Please congratulate Jason Giedymin for becoming a committer
+ and PMC member. Welcome!
+
+- *May 4, 2010:* Apache Traffic Server 2.0.0 was released.
+
+- *April 21, 2010:* the Apache Software Foundation Board promoted Traffic
+ Server to a top-level project (TLP).
+
+# Miscellaneous # {#misc}
+[View SVN code repository](http://svn.apache.org/viewvc/trafficserver/)
+
+[TrafficServer AMI for EC2](http://cwiki.apache.org/confluence/display/TS/Apache+Traffic+Server+AMIs+for+EC2)
+
+[Supported Operating Systems](http://cwiki.apache.org/confluence/display/TS/Supported+Operating+Systems)
+
+[License](http://www.apache.org/licenses/)
+
+[Build Instructions](http://svn.apache.org/repos/asf/trafficserver/traffic/trunk/README)
+
+[Roadmap](http://cwiki.apache.org/confluence/display/TS/RoadMap)
+
+[Committers](http://cwiki.apache.org/confluence/display/TS/Committers)
+
Added: trafficserver/site/branches/ats-cms/lib/path.pm
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/lib/path.pm?rev=1026546&view=auto
==============================================================================
--- trafficserver/site/branches/ats-cms/lib/path.pm (added)
+++ trafficserver/site/branches/ats-cms/lib/path.pm Sat Oct 23 02:33:41 2010
@@ -0,0 +1,55 @@
+package path;
+use ASF::Value;
+
+# taken from django's url.py
+
+our @patterns = (
+
+ [qr!^/index\.html$!, news_page =>
+ {
+ jira => ASF::Value::Jira->new(limit => 5,
+ url => "http://s.apache.org/q4"),
+ announce => ASF::Value::Mail->new(list => 'announce@apache.org',
+ limit => 5),
+ blog => ASF::Value::Blogs->new(blog => "foundation", limit=> 5),
+ twitter => ASF::Value::Twitter->new(name => 'TheASF', limit => 5),
+ },
+ ],
+
+ [qr!^/dev/index\.html$!, news_page =>
+ {
+ svn => ASF::Value::SVN->new(limit => 10),
+ infrabot => ASF::Value::Twitter->new(name=>"infrabot", limit => 5),
+ },
+ ],
+
+ [qr!^/dev/sitemap\.html$!, sitemap => { headers => { title => "Developer Sitemap" }} ],
+
+ [qr!\.mdtext$!, single_narrative => { template => "single_narrative.html" }],
+);
+
+
+# for specifying interdependencies between files
+
+our %dependencies = (
+ "/dev/sitemap.html" => [ grep s!^content!!, glob "content/dev/*.mdtext" ],
+);
+
+=head1 LICENSE
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
Added: trafficserver/site/branches/ats-cms/lib/view.pm
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/lib/view.pm?rev=1026546&view=auto
==============================================================================
--- trafficserver/site/branches/ats-cms/lib/view.pm (added)
+++ trafficserver/site/branches/ats-cms/lib/view.pm Sat Oct 23 02:33:41 2010
@@ -0,0 +1,126 @@
+package view;
+
+#
+# BUILD CONSTRAINT: all views must return $content, $extension.
+# additional return values (as seen below) are optional. However,
+# careful use of symlinks and dependency management in path.pm can
+# resolve most issues with this constraint.
+#
+
+use strict;
+use warnings;
+use Dotiac::DTL qw/Template/;
+use Dotiac::DTL::Addon::markup;
+use ASF::Util qw/read_text_file/;
+
+push @Dotiac::DTL::TEMPLATE_DIRS, "templates";
+
+# This is most widely used view. It takes a
+# 'template' argument and a 'path' argument.
+# Assuming the path ends in foo.mdtext, any files
+# like foo.page/bar.mdtext will be parsed and
+# passed to the template in the "bar" (hash)
+# variable.
+
+sub single_narrative {
+ my %args = @_;
+ my $file = "content$args{path}";
+ my $template = $args{template};
+ $args{path} =~ s/\.mdtext$/\.html/;
+
+ read_text_file $file, \%args;
+
+ my $page_path = $file;
+ $page_path =~ s/\.[^.]+$/.page/;
+ if (-d $page_path) {
+ for my $f (grep -f, glob "$page_path/*.mdtext") {
+ $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
+ $args{$1} = {};
+ read_text_file $f, $args{$1};
+ }
+ }
+
+ return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
+}
+
+# Has the same behavior as the above for foo.page/bar.txt
+# files, parsing them into a bar variable for the template.
+# Otherwise presumes the template is the path.
+
+sub news_page {
+ my %args = @_;
+ my $template = "content$args{path}";
+
+ my $page_path = $template;
+ $page_path =~ s/\.[^.]+$/.page/;
+ if (-d $page_path) {
+ for my $f (grep -f, glob "$page_path/*.mdtext") {
+ $f =~ m!/([^/]+)\.mdtext$! or die "Bad filename: $f\n";
+ $args{$1} = {};
+ read_text_file $f, $args{$1};
+ }
+ }
+
+ return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
+}
+
+sub sitemap {
+ my %args = @_;
+ my $template = "content$args{path}";
+ my $dir = $template;
+ $dir =~ s!/[^/]+$!!;
+ opendir my $dh, $dir or die "Can't opendir $dir: $!\n";
+ my %data;
+ for (map "$dir/$_", grep $_ ne "." && $_ ne ".." && $_ ne ".svn", readdir $dh) {
+ if (-f and /\.mdtext$/) {
+ my $file = $_;
+ $file =~ s/^content//;
+ no warnings 'once';
+ for my $p (@path::patterns) {
+ my ($re, $method, $args) = @$p;
+ next unless $file =~ $re;
+ my $s = view->can($method) or die "Can't locate method: $method\n";
+ my ($content, $ext, $vars) = $s->(path => $file, %$args);
+ $file =~ s/\.mdtext$/.$ext/;
+ $data{$file} = $vars;
+ last;
+ }
+ }
+ }
+
+ my $content = "";
+
+ for (sort keys %data) {
+ $content .= "- [$data{$_}->{headers}->{title}]($_)\n";
+ for my $hdr (grep /^#/, split "\n", $data{$_}->{content}) {
+ $hdr =~ /^(#+)\s+([^#]+)?\s+\1\s+\{#([^}]+)\}$/ or next;
+ my $level = length $1;
+ $level *= 4;
+ $content .= " " x $level;
+ $content .= "- [$2]($_#$3)\n";
+ }
+ }
+ $args{content} = $content;
+ return Dotiac::DTL::Template($template)->render(\%args), html => \%args;
+}
+
+1;
+
+=head1 LICENSE
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
Added: trafficserver/site/branches/ats-cms/templates/blocks/README
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/templates/blocks/README?rev=1026546&view=auto
==============================================================================
--- trafficserver/site/branches/ats-cms/templates/blocks/README (added)
+++ trafficserver/site/branches/ats-cms/templates/blocks/README Sat Oct 23 02:33:41 2010
@@ -0,0 +1,2 @@
+this dir is for blocks of html (like the list of project links)
+that are to be included in the templates
Added: trafficserver/site/branches/ats-cms/templates/single_narrative.html
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/templates/single_narrative.html?rev=1026546&view=auto
==============================================================================
--- trafficserver/site/branches/ats-cms/templates/single_narrative.html (added)
+++ trafficserver/site/branches/ats-cms/templates/single_narrative.html Sat Oct 23 02:33:41 2010
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+{% load markup %}
+
+<html>
+ <!-- This template is for the bulk of the site! -->
+ <head>
+ {% if headers.atom %}
+ <link rel="alternate" href="{{ headers.atom.url }}"
+ type="application/atom+xml" title="{{ headers.atom.title }}" />
+ {% endif %}
+ {% if headers.base %}<base href="{{ headers.base }}" />{% endif %}
+ <title>{{ headers.title }}</title>
+ {% if headers.notice %}<!-- {{ headers.notice }} -->{% endif %}
+ </head>
+
+ <body>
+ <h1>{{ headers.title }}</h1>
+
+ <div id="content">
+ {{ content|markdown }}
+ </div>
+
+ <div id="footer">
+ Copyright © 2010
+ <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+ Licensed under
+ the <a href="http://www.apache.org/licenses/">Apache License</a>,
+ Version 2.0. Apache Traffic Server, Apache,
+ the Apache Traffic Server logo, and the Apache feather logo are
+ trademarks of The Apache Software Foundation.
+ </div>
+
+ </body>
+</html>