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". --- main/templatetags/wiki.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 main/templatetags/wiki.py (limited to 'main/templatetags/wiki.py') 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(' ', '_') -- cgit v1.2.3