diff options
author | Frank Lichtenheld <frank@lichtenheld.de> | 2009-03-15 19:44:43 +0100 |
---|---|---|
committer | Frank Lichtenheld <frank@lichtenheld.de> | 2009-03-15 19:44:43 +0100 |
commit | d4847b84cec9655e66d5faf9e9078c86bec11ecd (patch) | |
tree | 4385c1e95086d2128ffd391cebfbbb6830ad6900 /templates | |
parent | 48ae84fffa8366d17383bb1615b989510d988563 (diff) |
templates: define packages_homepage and packages_homepage_abs
We don't want to hardcode the full URL everywhere so that you
can use the mirrors directly (e.g. packages-piatti.debian.org),
but we need the full URL at other places (e.g. in the RSS feeds).
Diffstat (limited to 'templates')
-rw-r--r-- | templates/config.tmpl | 3 | ||||
-rw-r--r-- | templates/rfc822/search.tmpl | 4 | ||||
-rw-r--r-- | templates/rss/newpkg.tmpl | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/templates/config.tmpl b/templates/config.tmpl index 132db62..77e6db1 100644 --- a/templates/config.tmpl +++ b/templates/config.tmpl @@ -5,7 +5,8 @@ organisation = 'Debian' project_homepage = 'http://www.debian.org/' - packages_homepage = 'http://packages.debian.net/' + packages_homepage = '/' + packages_homepage_abs = 'http://packages.debian.net/' searchformurl = packages_homepage search_url = '/search' tags_url = 'http://debtags.alioth.debian.org/' diff --git a/templates/rfc822/search.tmpl b/templates/rfc822/search.tmpl index 955bf45..a0b4bad 100644 --- a/templates/rfc822/search.tmpl +++ b/templates/rfc822/search.tmpl @@ -3,7 +3,7 @@ [%- FOREACH s IN suites -%] [%- FOREACH s.versions %] Package: [% pkg %] -Url: [% packages_homepage _ make_url(pkg,'','suite',s.suite,'arch','','section','','format','') %] +Url: [% packages_homepage_abs _ make_url(pkg,'','suite',s.suite,'arch','','section','','format','') %] Archive: [% archive %] Suite: [% s.suite %] Section: [% s.section %] @@ -22,7 +22,7 @@ Provided-by: [% s.providers.join(', ') %] [%- FOREACH origins -%] [%- origin = (archive == main_archive) ? suite : "$suite/$archive" %] Package: [% pkg %] -Url: [% packages_homepage _ make_url(pkg,'','source','source','suite',origin,'section','','arch','','format','') %] +Url: [% packages_homepage_abs _ make_url(pkg,'','source','source','suite',origin,'section','','arch','','format','') %] [%- "\nArchive: $real_archive" IF real_archive %] [%- "\nSection: $section" IF section %] Subsection: [% subsection %] diff --git a/templates/rss/newpkg.tmpl b/templates/rss/newpkg.tmpl index 378cca3..90533ba 100644 --- a/templates/rss/newpkg.tmpl +++ b/templates/rss/newpkg.tmpl @@ -9,7 +9,7 @@ xmlns:admin="http://webns.net/mvcb/" > -[%- root_url = "$packages_homepage$suite/"; +[%- root_url = "$packages_homepage_abs$suite/"; SET root_url = "$root_url$section/" IF section -%] <channel rdf:about="[% root_url %]newpkg"> |