From ae9ee14ff153698dd90c6560437e42ff124a6d0b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 19 Apr 2013 21:46:51 -0400 Subject: Abstract ArchWiki URLs and references. Notable things: * Standardize on "ArchWiki", instead of also having "Arch Wiki", via BRANDING_WIKINAME * Link to the article "Install_Guide" instead of "Official_Arch_Linux_Install_Guide", it's a redirect anyway. * On the download page, it assumes the that the version is just appended to the URL for the wiki link. * For the wiki RSS link, It now uses "/${title}?feed=rss" instead of "?title=${title}&feed=rss". --- README.BRANDING | 8 -------- main/context_processors.py | 1 + main/templatetags/wiki.py | 9 +++++++++ settings.py | 2 ++ templates/base.html | 8 ++++---- templates/mirrors/mirrorlist_generate.html | 5 +++-- templates/public/art.html | 2 +- templates/public/download.html | 7 ++++--- templates/public/feeds.html | 10 +++++----- templates/public/index.html | 19 ++++++++++--------- templates/public/svn.html | 4 ++-- templates/releng/results.html | 3 ++- 12 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 main/templatetags/wiki.py diff --git a/README.BRANDING b/README.BRANDING index d5c43aa8..1f9a1db0 100644 --- a/README.BRANDING +++ b/README.BRANDING @@ -4,7 +4,6 @@ templates/base.html * links to `bugs.archlinux.org` * links to the AUR * logged in navbar - * links to `wiki.achlinux.org/index.php/DeveloperWiki` * links to `mailman.archlinux.org` * links to `stats.archlinux.org/munin` * copyright statement is Arch-specific. @@ -12,11 +11,8 @@ templates/base.html templates/public/index.html * The text in the intro box describes Arch Linux. * sidebar - * Documentation - * links to `wiki.archlinux.org` * Community * links to `mailman.archlinux.org` - * links to `wiki.archlinux.org` * links to `planet.archlinux.org` ("Planet Arch") * Support * links to `schwag.archlinux.ca` @@ -24,15 +20,11 @@ templates/public/index.html * links to `www.freewear.org/?page=list_items&org=Archlinux` * Development * links to `projects.archlinux.org` ("Official Arch projects") - * links to `wiki.archlinux.org` - * More Resources - * links to `wiki.archlinux.org` * Below sidebar * Arch's donate button * Arch's sponsors templates/public/feeds - * links to Arch Wiki * links to AUR * links to `bugs.archlinux.org` diff --git a/main/context_processors.py b/main/context_processors.py index 850bb499..5ac31744 100644 --- a/main/context_processors.py +++ b/main/context_processors.py @@ -7,6 +7,7 @@ def branding(request): 'BRANDING_APPNAME': settings.BRANDING_APPNAME, 'BRANDING_DISTRONAME': settings.BRANDING_DISTRONAME, 'BRANDING_SHORTNAME': settings.BRANDING_SHORTNAME, + 'BRANDING_WIKINAME': settings.BRANDING_WIKINAME, 'BRANDING_EMAIL': settings.BRANDING_EMAIL, } diff --git a/main/templatetags/wiki.py b/main/templatetags/wiki.py new file mode 100644 index 00000000..b1b8dd55 --- /dev/null +++ b/main/templatetags/wiki.py @@ -0,0 +1,9 @@ +from django import template +register = template.Library() + +@register.simple_tag +def wiki_url(article=""): + if article == "": + return "https://wiki.archlinux.org/" + else: + return "https://wiki.archlinux.org/index.php/"+article.replace(' ', '_') diff --git a/settings.py b/settings.py index c979d03f..09f2df9c 100644 --- a/settings.py +++ b/settings.py @@ -142,8 +142,10 @@ SVN_BASE_URL = 'svn://svn.archlinux.org/' BRANDING_APPNAME = 'archweb' BRANDING_DISTRONAME = 'Arch Linux' BRANDING_SHORTNAME = 'Arch' +BRANDING_WIKINAME = 'ArchWiki' BRANDING_EMAIL = 'Arch Website Notification ' + ## Import local settings from local_settings import * diff --git a/templates/base.html b/templates/base.html index 3eb67c92..2b3aed66 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,4 +1,4 @@ -{% load url from future %}{% load static from staticfiles %} +{% load url from future %}{% load static from staticfiles %}{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }}{% endblock %} @@ -21,7 +21,7 @@
  • Home
  • Packages
  • Forums
  • -
  • Wiki
  • +
  • Wiki
  • Bugs
  • AUR
  • Download
  • @@ -33,7 +33,7 @@ {% if user.is_authenticated %}