b99c0c4dff7c69394e5d1d2755d930addf0658ce
Peter Palfrader Make local links point to t...

Peter Palfrader authored 19 years ago

1) #!wml
Peter Palfrader Move website to wml

Peter Palfrader authored 19 years ago

2) 
Peter Palfrader Make cvssandbox relative

Peter Palfrader authored 18 years ago

3) #<define-tag cvssandbox whitespace=delete>http://tor.eff.org/cvs/</define-tag>
4) <define-tag cvssandbox whitespace=delete>cvs/</define-tag>
Roger Dingledine define an svnsandbox too

Roger Dingledine authored 18 years ago

5) <define-tag svnsandbox whitespace=delete>svn/trunk/</define-tag>
Peter Palfrader Make local links point to t...

Peter Palfrader authored 19 years ago

6) 
7) #  Xinclude "locallinks.wmi"
8) #  Xinclude "langlocallinks.$(LANG).wmi"
9) 
Peter Palfrader Remove ././././././ from links

Peter Palfrader authored 18 years ago

10) <:
11) 	sub stripDotSlashs($) {
12) 		my ($s) = @_;
13) 		1 while ($s =~ s|/\./|/|);
14) 		1 while ($s =~ s|^\./||);
15) 		return $s;
16) 	};
17) :>
18) 
Peter Palfrader also use "use warnings"

Peter Palfrader authored 19 years ago

19) <define-tag page whitespace=delete><:{
Peter Palfrader Make translation status mor...

Peter Palfrader authored 19 years ago

20) 	my $page="%0";
21) 	my $lang="$(LANG)";
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

22) 	my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
23) 	$dir = '.' unless defined $dir;
24) 	if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
Peter Palfrader Remove ././././././ from links

Peter Palfrader authored 18 years ago

25) 		print stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

26) 	} elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
Peter Palfrader Remove ././././././ from links

Peter Palfrader authored 18 years ago

27) 		print stripDotSlashs("$(DOCROOT)/$dir/$base.html");
Peter Palfrader Make local links point to t...

Peter Palfrader authored 19 years ago

28) 	} else {
Peter Palfrader WMLify eff/

Peter Palfrader authored 18 years ago

29) 		warn "$WML_SRC_FILENAME has a [page $page] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
Peter Palfrader Make local links point to t...

Peter Palfrader authored 19 years ago

30) 	};