diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-19 21:46:51 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-19 21:46:51 -0400 |
commit | ae9ee14ff153698dd90c6560437e42ff124a6d0b (patch) | |
tree | ffd990442f624d5d09282c4ecea064f3ed588e70 | |
parent | 9b23e64dde9d218c5dfbc70bf38f5e2afe7e4089 (diff) |
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".
-rw-r--r-- | README.BRANDING | 8 | ||||
-rw-r--r-- | main/context_processors.py | 1 | ||||
-rw-r--r-- | main/templatetags/wiki.py | 9 | ||||
-rw-r--r-- | settings.py | 2 | ||||
-rw-r--r-- | templates/base.html | 8 | ||||
-rw-r--r-- | templates/mirrors/mirrorlist_generate.html | 5 | ||||
-rw-r--r-- | templates/public/art.html | 2 | ||||
-rw-r--r-- | templates/public/download.html | 7 | ||||
-rw-r--r-- | templates/public/feeds.html | 10 | ||||
-rw-r--r-- | templates/public/index.html | 19 | ||||
-rw-r--r-- | templates/public/svn.html | 4 | ||||
-rw-r--r-- | templates/releng/results.html | 3 |
12 files changed, 43 insertions, 35 deletions
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 <nobody@archlinux.org>' + ## 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 %}<!DOCTYPE html> +{% load url from future %}{% load static from staticfiles %}{% load wiki %}<!DOCTYPE html> <html lang="en"> <head> <title>{% block title %}{{ BRANDING_DISTRONAME }}{% endblock %}</title> @@ -21,7 +21,7 @@ <li id="anb-home"><a href="/" title="{{ BRANDING_SHORTNAME }} news, packages, projects and more">Home</a></li> <li id="anb-packages"><a href="/packages/" title="{{ BRANDING_SHORTNAME }} Package Database">Packages</a></li> <li id="anb-forums"><a href="https://bbs.archlinux.org/" title="Community forums">Forums</a></li> - <li id="anb-wiki"><a href="https://wiki.archlinux.org/" title="Community documentation">Wiki</a></li> + <li id="anb-wiki"><a href="{% wiki_url %}" title="Community documentation">Wiki</a></li> <li id="anb-bugs"><a href="https://bugs.archlinux.org/" title="Report and track bugs">Bugs</a></li> <li id="anb-aur"><a href="https://aur.archlinux.org/" title="Arch Linux User Repository">AUR</a></li> <li id="anb-download"><a href="{% url 'page-download' as pdl %}{{ pdl }}" title="Get {{ BRANDING_DISTRONAME }}">Download</a></li> @@ -33,7 +33,7 @@ {% if user.is_authenticated %} <ul> <li><a href="{% url 'devel-index' %}" title="Developer Dashboard">Dashboard</a></li> - <li><a href="https://wiki.archlinux.org/index.php/DeveloperWiki" + <li><a href="{% wiki_url 'DeveloperWiki' %}" title="Developer Wiki">DevWiki</a></li> <li><a href="{% url 'news-list' as newsl %}{{ newsl }}" title="Manage news articles">News</a></li> <li><a href="/packages/signoffs/" title="Package signoffs">Signoffs</a></li> @@ -75,7 +75,7 @@ title="Contact Aaron Griffin">Aaron Griffin</a>.</p> <p>The Arch Linux name and logo are recognized - <a href="https://wiki.archlinux.org/index.php/DeveloperWiki:TrademarkPolicy" + <a href="{% wiki_url 'DeveloperWiki:TrademarkPolicy' %}" title="Arch Linux Trademark Policy">trademarks</a>. Some rights reserved.</p> <p>The registered trademark Linux® is used pursuant to a sublicense from LMI, diff --git a/templates/mirrors/mirrorlist_generate.html b/templates/mirrors/mirrorlist_generate.html index c68cad6c..2025eec2 100644 --- a/templates/mirrors/mirrorlist_generate.html +++ b/templates/mirrors/mirrorlist_generate.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load package_extras %} +{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }} - Pacman Mirrorlist Generator{% endblock %} {% block content %} @@ -28,8 +29,8 @@ <h3>Customized by country mirrorlist</h3> <p>The following form can generate a custom up-to-date - <a href="https://wiki.archlinux.org/index.php/Pacman" - title="ArchWiki: Pacman">pacman</a> mirrorlist based on geography and + <a href="{% wiki_url 'Pacman' %}" + title="{{BRANDING_WIKINAME}}: Pacman">pacman</a> mirrorlist based on geography and desired protocol(s). Simply replace the contents of <code>/etc/pacman.d/mirrorlist</code> with your generated list. Additionally, the mirror status data can be incorporated into the generated diff --git a/templates/public/art.html b/templates/public/art.html index f013a040..89f1f81e 100644 --- a/templates/public/art.html +++ b/templates/public/art.html @@ -11,7 +11,7 @@ <h3>Logos for Press Usage</h3> <p>The following {{BRANDING_DISTRONAME}} logos are available for press and other use, subject to - the restrictions of our <a href="https://wiki.archlinux.org/index.php/DeveloperWiki:TrademarkPolicy" + the restrictions of our <a href="{% wiki_url 'DeveloperWiki:TrademarkPolicy' %}" title="{{BRANDING_DISTRONAME}} Trademark Policy">trademark policy</a>.</p> <p><strong>Two-color standard version</strong><br /> diff --git a/templates/public/download.html b/templates/public/download.html index fdfe8e57..72d21736 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -2,6 +2,7 @@ {% load cache %} {% load url from future %} {% load static from staticfiles %} +{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }} - Downloads{% endblock %} {% block navbarclass %}anb-download{% endblock %} @@ -20,7 +21,7 @@ can always be updated with `pacman -Syu`.</p> <ul> - <li><strong>Current Release:</strong> <a href="https://wiki.archlinux.org/index.php/DeveloperWiki:{{ version }}">{{ version }}</a></li> + <li><strong>Current Release:</strong> <a href="{% wiki_url 'DeveloperWiki:' %}{{ version }}">{{ version }}</a></li> <li><strong>Included Kernel:</strong> 3.0.3</li> <li><strong>Resources:</strong> <ul> @@ -37,7 +38,7 @@ <ul id="download-help"> <li><a href="https://www.archlinux.org/iso/{{ version }}/README" title="Official download instructions">Readme and Instructions</a></li> - <li><a href="https://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide" + <li><a href="{% wiki_url 'Install_Guide' %}" title="Official Installation Guide">{{BRANDING_DISTRONAME}} Install Guide</a></li> </ul> @@ -167,7 +168,7 @@ {% endwith %} <p>If you want to become an Official Arch Linux Mirror please follow the - instructions listed <a href="https://wiki.archlinux.org/index.php/DeveloperWiki:NewMirrors">here</a>.</p> + instructions listed <a href="{% wiki_url 'DeveloperWiki:NewMirrors' %}">here</a>.</p> </div> {% endblock %} diff --git a/templates/public/feeds.html b/templates/public/feeds.html index 764ebd90..f298de7f 100644 --- a/templates/public/feeds.html +++ b/templates/public/feeds.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.html" %}{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }} - RSS Feeds{% endblock %} {% block content %} @@ -15,10 +15,10 @@ <p>Grab the <a href="/feeds/news/" class="rss" title="{{ BRANDING_DISTRONAME }} News feed">news item feed</a> to keep up-to-date with the latest news from the {{ BRANDING_DISTRONAME }} development staff.</p> - <p>The <a href="https://wiki.archlinux.org/index.php?title=Special:RecentChanges&feed=rss" - title="ArchWiki Recent Changes feed" class="rss">Arch Wiki: Recent changes feed</a> - is also available to track document changes from the <a href="https://wiki.archlinux.org/" - title="Arch Wiki community documentation">Arch Wiki</a>.</p> + <p>The <a href="{% wiki_url 'Special:RecentChanges?feed=rss' %}" + title="{{ BRANDING_WIKINAME }} Recent Changes feed" class="rss">{{ BRANDING_WIKINAME }}: Recent changes feed</a> + is also available to track document changes from the <a href="{% wiki_url %}" + title="{{ BRANDING_WIKINAME }} community documentation">{{ BRANDING_WIKINAME }}</a>.</p> <h3>Package Feeds</h3> diff --git a/templates/public/index.html b/templates/public/index.html index de8a5fe8..7c22c251 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -2,6 +2,7 @@ {% load markup cache %} {% load url from future %} {% load static from staticfiles %} +{% load wiki %} {% block head %} <link rel="alternate" type="application/rss+xml" title="{{ BRANDING_DISRONAME }} News Updates" href="/feeds/news/" /> @@ -28,8 +29,8 @@ check out our <a href="https://bbs.archlinux.org/" title="Arch Forums">forums</a> and <a href="https://mailman.archlinux.org/mailman/listinfo/" title="Arch Mailing Lists">mailing lists</a> - to get your feet wet. Also glance through our <a href="https://wiki.archlinux.org/" - title="Arch Wiki">wiki</a> + to get your feet wet. Also glance through our <a href="{% wiki_url %}" + title="{{BRANDING_WIKINAME}}">wiki</a> if you want to learn more about Arch.</p> <p class="readmore"><a href="{% url 'page-about' %}" @@ -115,11 +116,11 @@ <h4>Documentation</h4> <ul> - <li><a href="https://wiki.archlinux.org/" + <li><a href="{% wiki_url %}" title="Community documentation">Wiki</a></li> - <li><a href="https://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide" + <li><a href="{% wiki_url 'Installation Guide' %}" title="Official installation guide">Official Installation Guide</a></li> - <li><a href="https://wiki.archlinux.org/index.php/Beginners'_Guide" + <li><a href="%{ wiki_url "Beginners'_Guide" %}" title="A good place to start for beginners">Unofficial Beginners' Guide</a></li> </ul> @@ -128,11 +129,11 @@ <ul> <li><a href="https://mailman.archlinux.org/mailman/listinfo/" title="Community and developer mailing lists">Mailing Lists</a></li> - <li><a href="https://wiki.archlinux.org/index.php/IRC_Channels" + <li><a href="{% wiki_url 'IRC_Channels' %}" title="Official and regional IRC communities">IRC Channels</a></li> <li><a href="https://planet.archlinux.org/" title="Arch in the blogosphere">Planet Arch</a></li> - <li><a href="https://wiki.archlinux.org/index.php/International_Communities" + <li><a href="{% wiki_url 'International_Communities' %}" title="{{DISTRO_SHORTNAME}} communities in your native language">International Communities</a></li> </ul> @@ -168,7 +169,7 @@ title="Official Arch projects (git)">Projects in Git</a></li> <li><a href="{% url 'page-svn' %}" title="View SVN entries for packages">SVN Repositories</a></li> - <li><a href="https://wiki.archlinux.org/index.php/DeveloperWiki" + <li><a href="{% wiki_url 'DeveloperWiki' %}" title="Developer Wiki articles">Developer Wiki</a></li> <li><a href="/groups/" title="View the available package groups">Package Groups</a></li> @@ -187,7 +188,7 @@ <li><a href="{% url 'page-keys' %}" title="Package/Database signing master keys">Signing Master Keys</a> <img width="16" height="16" src="{% static "new.png" %}" alt="New"/></li> - <li><a href="https://wiki.archlinux.org/index.php/Arch_Linux_Press_Review" + <li><a href="{% wiki_url 'Arch_Linux_Press_Review' %}" title="Arch Linux in the media">Press Coverage</a></li> <li><a href="{% url 'page-art' %}" title="{{ BRANDING_SHORTNAME }} logos and other artwork for promotional use">Logos & Artwork</a></li> <li><a href="{% url 'news-list' %}" title="News Archives">News Archives</a></li> diff --git a/templates/public/svn.html b/templates/public/svn.html index 38e20ec9..88c6df93 100644 --- a/templates/public/svn.html +++ b/templates/public/svn.html @@ -5,7 +5,7 @@ <h2 class="title">SVN Repositories</h2> <p> The PKGBUILD files can be fetched via the ABS utility. To learn more - about ABS, see <a href="https://wiki.archlinux.org/index.php/ABS">the ABS wiki page</a>. + about ABS, see <a href="{% wiki_url 'ABS' %}">the ABS wiki page</a>. </p> <p>The SVN repositories have been cloned into git repositories and can be viewed via the cgit interface. @@ -31,7 +31,7 @@ cd community svn update <your-package-name></pre> <p> - Visit <a href="https://wiki.archlinux.org/index.php?title=Getting_PKGBUILDS_From_SVN">the wiki</a> + Visit <a href="{% wiki_url 'Getting_PKGBUILDS_From_SVN' %}">the wiki</a> for more tips on checking out and updating svn PKGBUILDs. </p> diff --git a/templates/releng/results.html b/templates/releng/results.html index 82073ffe..df98d1ac 100644 --- a/templates/releng/results.html +++ b/templates/releng/results.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load url from future %} +{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }} - Release Engineering Testbuild Results{% endblock %} @@ -18,7 +19,7 @@ the <a href="{% url 'releng-iso-overview' %}">overview</a>.</p> <p>For more information, see the <a - href="https://wiki.archlinux.org/index.php/DeveloperWiki:releng_testimages_feedback">documentation + href="{% wiki_url 'DeveloperWiki:releng_testimages_feedback' %}">documentation on the wiki</a>.</p> <p>All ISOs referenced on this page are available from |