39fb3c52a47d4178ecc521a7fa0ca1f83044f07e
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

1) #!wml
2) 
Matt Pagan linking to git from tags wo...

Matt Pagan authored 9 years ago

3) <define-tag gitblob whitespace=delete>https://gitweb.torproject.org/tor.git/plain/</define-tag>
4) <define-tag cgitstable whitespace=delete>?id=tor-0.2.5.10</define-tag>
Andrew Lewman work on the new website a b...

Andrew Lewman authored 14 years ago

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>
Roger Dingledine make the specblob tag be mo...

Roger Dingledine authored 9 years ago

13) <define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git/tree/</define-tag>
Sebastian Hahn Fix links that broke due to...

Sebastian Hahn authored 13 years ago

14) <define-tag spectree whitespace=delete>https://gitweb.torproject.org/torspec.git?a=tree;hb=HEAD;f=</define-tag>
Andrew Lewman define doxygen as a tag, mo...

Andrew Lewman authored 13 years ago

15) <define-tag doxygen whitespace=delete>https://doxygen.torproject.org/</define-tag>
Sebastian Hahn Fix links that broke due to...

Sebastian Hahn authored 13 years ago

16) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

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

Roger Dingledine authored 13 years ago

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

Andrew Lewman authored 14 years ago

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

Andrew Lewman authored 14 years ago

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

Roger Dingledine authored 13 years ago

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

Andrew Lewman authored 14 years ago

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

Roger Dingledine authored 13 years ago

41) 	    	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

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

Roger Dingledine authored 13 years ago

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

Andrew Lewman authored 14 years ago

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

Roger Dingledine authored 13 years ago

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