81720f6d457edc7a204f5ee8170977b4ce8ea79e
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

1) #!wml
2) 
Andrew Lewman work on the new website a b...

Andrew Lewman authored 14 years ago

3) <define-tag gitblob whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=</define-tag>
4) <define-tag gitblobstable whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.1;f=</define-tag>
5) <define-tag gittree whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=</define-tag>
6) <define-tag gitrepo whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

7) <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
8) <define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
Andrew Lewman clean up wiki and faq refer...

Andrew Lewman authored 14 years ago

9) <define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/</define-tag>
Karsten Loesing Update wiki links

Karsten Loesing authored 13 years ago

10) <define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/doc/TorFAQ</define-tag>
Andrew Lewman put the extra /blog back to...

Andrew Lewman authored 14 years ago

11) <define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
Andrew Lewman replicate the tbb repo link...

Andrew Lewman authored 14 years ago

12) <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
Sebastian Hahn Fix links that broke due to...

Sebastian Hahn authored 13 years ago

13) <define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git?a=blob_plain;hb=HEAD;f=</define-tag>
14) <define-tag spectree whitespace=delete>https://gitweb.torproject.org/torspec.git?a=tree;hb=HEAD;f=</define-tag>
15) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

16) 
17) #  Xinclude "locallinks.wmi"
18) #  Xinclude "langlocallinks.$(LANG).wmi"
19) 
20) <:
21) 	sub stripDotSlashs($) {
22) 		my ($s) = @_;
23) 		1 while ($s =~ s|/\./|/|);
24) 		1 while ($s =~ s|^\./||);
25) 		return $s;
26) 	};
27) :>
28) 
29) <:  sub pageToURL($$) {
30)  	    my ($page, $lang) = @_;
31) 	    my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
32) 	    $dir = '.' unless defined $dir;
Roger Dingledine get us closer to being able...

Roger Dingledine authored 13 years ago

33) 	    if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

34) 	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
35) 	    } elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
Andrew Lewman link to english files becau...

Andrew Lewman authored 14 years ago

36) 	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html.en");
Roger Dingledine get us closer to being able...

Roger Dingledine authored 13 years ago

37) 	    } elsif ($page =~ /^http/) {
38) 	    	return $page;
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

39) 	    } else {
Roger Dingledine get us closer to being able...

Roger Dingledine authored 13 years ago

40) 	    	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.";
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

41) 	    }; 
42)     }
43) :>
44) 
45) <define-tag page whitespace=delete>
46) <:{
47) 	my $page="%0";
48) 	my $lang="$(LANG)";
49) 	my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
50) 	$dir = '.' unless defined $dir;
51) 	if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
52) 		print stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
Roger Dingledine get us closer to being able...

Roger Dingledine authored 13 years ago

53) 	} elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

54) 		print stripDotSlashs("$(DOCROOT)/$dir/$base.html");
55) 	} else {
Roger Dingledine get us closer to being able...

Roger Dingledine authored 13 years ago

56) 		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.";