# HG changeset patch
# Node ID cf81de0e802f
# Parent  942693f2e27e
diff --git a/tools/migrate-tracker.js b/tools/migrate-tracker.js
--- a/tools/migrate-tracker.js
+++ b/tools/migrate-tracker.js
@@ -1,148 +1,148 @@
-/**
- * Tracks the progress of migrating content
- * from the the old site to the new site
- */
-
-/*****************************************************************************
- * Imports
- *****************************************************************************/
-
-const fs = require('fs')
-const path = require('path')
-const front = require('front-matter')
-
-/*****************************************************************************
- * Set Up
- *****************************************************************************/
-
-const filepath = __dirname.replace(/\/tools(\/)?$/, '/hugo/content')
-const obsoleteRegex = /\s#(\s+)?obsolete(\s+)?$/i
-const mdRegex = /\.md$/
-const migrating = []
-const obsoleted = []
-
-/*****************************************************************************
- * Execution
- *****************************************************************************/
-
-const paths = fs
-	.readFileSync(path.join(__dirname, 'paths.txt'), 'utf8')
-	.split('\r\n')
-// Sift each URL
-paths.forEach(path => {
-	if (obsoleteRegex.test(path)) {
-		obsoleted.push(path.replace(obsoleteRegex, ''))
-	} else {
-		migrating.push(path)
-	}
-})
-/** Information on new content */
-const nestPages = getMdPaths(path.join(__dirname, '../hugo/content/'))
-	// discard translated content
-	.filter(path => !/\.\w+\.md$/.test(path))
-	.map(path => {
-		const frontMatter = getFrontMatter(path)
-		const replaces = castReplacesDataToArray(frontMatter.replaces)
-
-		return {
-			replaces,
-			path,
-			pathOnSite: path
-				// convert to relative file path
-				.replace(filepath, '')
-				// remove file extension
-				.replace(/\.md$/, '')
-				// remove _index
-				.replace(/\/_index(\.\w\w)?$/, ''),
-		}
-	})
-
-/*****************************************************************************
- * Generate Stats
- *****************************************************************************/
-
-const covered = new Set()
-nestPages.forEach(page => page.replaces.forEach(path => covered.add(path)))
-
-const countOfCovered = migrating.reduce(
-	(acc, path) => acc + (covered.has(path) ? 1 : 0),
-	0
-)
-
-const percentComplete = ((countOfCovered / migrating.length) * 100).toPrecision(
-	2
-)
-const countOfObsolete = paths.length - migrating.length
-
-console.log(`
-STATS:
-	tracking ${paths.length} pages
-	${countOfCovered}/${migrating.length} (${percentComplete}%) migrated
-	${countOfObsolete} obsoleted
-`)
-
-/*****************************************************************************
- * Generate redirection mapping
- *****************************************************************************/
-
-// TODO: Generate redirection instructions
-
-/*****************************************************************************
- * Helpers
- *****************************************************************************/
-
-/**
- * Retrieves front matter from markdown files
- * @param {string} path path to markdown file
- */
-function getFrontMatter(path) {
-	try {
-		const data = fs.readFileSync(path, 'utf8')
-
-		const { attributes } = front(data)
-
-		return attributes
-	} catch (error) {
-		console.log(error)
-	}
-}
-
-/**
- * creates a list of all markdown files in a directory
- * @param {string} directory directory to search for markdown files
- */
-function getMdPaths(directory) {
-	let output = []
-	let items = fs.readdirSync(directory).map(i => path.join(directory, i))
-
-	while (items.length) {
-		const item = items.pop()
-		const stat = fs.statSync(item)
-
-		if (stat.isDirectory()) {
-			items.push(...fs.readdirSync(item).map(i => path.join(item, i)))
-		} else if (stat.isFile() && mdRegex.test(item)) {
-			output.push(item)
-		}
-	}
-
-	return output.sort()
-}
-
-/**
- *
- * @param {void|string|string[]} replaces
- */
-function castReplacesDataToArray(replaces) {
-	if (!replaces) {
-		return []
-	} else if (typeof replaces === 'string') {
-		return [replaces]
-	} else if (Array.isArray(replaces)) {
-		return replaces
-	}
-
-	throw new Error(
-		`expected replaces of ${path} to be falsey, string or an array`
-	)
-}
+/**
+ * Tracks the progress of migrating content
+ * from the the old site to the new site
+ */
+
+/*****************************************************************************
+ * Imports
+ *****************************************************************************/
+
+const fs = require('fs')
+const path = require('path')
+const front = require('front-matter')
+
+/*****************************************************************************
+ * Set Up
+ *****************************************************************************/
+
+const filepath = __dirname.replace(/\/tools(\/)?$/, '/hugo/content')
+const obsoleteRegex = /\s#(\s+)?obsolete(\s+)?$/i
+const mdRegex = /\.md$/
+const migrating = []
+const obsoleted = []
+
+/*****************************************************************************
+ * Execution
+ *****************************************************************************/
+
+const paths = fs
+	.readFileSync(path.join(__dirname, 'paths.txt'), 'utf8')
+	.split('\r\n')
+// Sift each URL
+paths.forEach(path => {
+	if (obsoleteRegex.test(path)) {
+		obsoleted.push(path.replace(obsoleteRegex, ''))
+	} else {
+		migrating.push(path)
+	}
+})
+/** Information on new content */
+const nestPages = getMdPaths(path.join(__dirname, '../hugo/content/'))
+	// discard translated content
+	.filter(path => !/\.\w+\.md$/.test(path))
+	.map(path => {
+		const frontMatter = getFrontMatter(path)
+		const replaces = castReplacesDataToArray(frontMatter.replaces)
+
+		return {
+			replaces,
+			path,
+			pathOnSite: path
+				// convert to relative file path
+				.replace(filepath, '')
+				// remove file extension
+				.replace(/\.md$/, '')
+				// remove _index
+				.replace(/\/_index(\.\w\w)?$/, ''),
+		}
+	})
+
+/*****************************************************************************
+ * Generate Stats
+ *****************************************************************************/
+
+const covered = new Set()
+nestPages.forEach(page => page.replaces.forEach(path => covered.add(path)))
+
+const countOfCovered = migrating.reduce(
+	(acc, path) => acc + (covered.has(path) ? 1 : 0),
+	0
+)
+
+const percentComplete = ((countOfCovered / migrating.length) * 100).toPrecision(
+	2
+)
+const countOfObsolete = paths.length - migrating.length
+
+console.log(`
+STATS:
+	tracking ${paths.length} pages
+	${countOfCovered}/${migrating.length} (${percentComplete}%) migrated
+	${countOfObsolete} obsoleted
+`)
+
+/*****************************************************************************
+ * Generate redirection mapping
+ *****************************************************************************/
+
+// TODO: Generate redirection instructions
+
+/*****************************************************************************
+ * Helpers
+ *****************************************************************************/
+
+/**
+ * Retrieves front matter from markdown files
+ * @param {string} path path to markdown file
+ */
+function getFrontMatter(path) {
+	try {
+		const data = fs.readFileSync(path, 'utf8')
+
+		const { attributes } = front(data)
+
+		return attributes
+	} catch (error) {
+		console.log(error)
+	}
+}
+
+/**
+ * creates a list of all markdown files in a directory
+ * @param {string} directory directory to search for markdown files
+ */
+function getMdPaths(directory) {
+	let output = []
+	let items = fs.readdirSync(directory).map(i => path.join(directory, i))
+
+	while (items.length) {
+		const item = items.pop()
+		const stat = fs.statSync(item)
+
+		if (stat.isDirectory()) {
+			items.push(...fs.readdirSync(item).map(i => path.join(item, i)))
+		} else if (stat.isFile() && mdRegex.test(item)) {
+			output.push(item)
+		}
+	}
+
+	return output.sort()
+}
+
+/**
+ *
+ * @param {void|string|string[]} replaces
+ */
+function castReplacesDataToArray(replaces) {
+	if (!replaces) {
+		return []
+	} else if (typeof replaces === 'string') {
+		return [replaces]
+	} else if (Array.isArray(replaces)) {
+		return replaces
+	}
+
+	throw new Error(
+		`expected replaces of ${path} to be falsey, string or an array`
+	)
+}
diff --git a/tools/paths.txt b/tools/paths.txt
--- a/tools/paths.txt
+++ b/tools/paths.txt
@@ -1,313 +1,313 @@
-pidgin.im/
-pidgin.im/support/
-pidgin.im/about/
-pidgin.im/download/
-pidgin.im/download/windows/
-pidgin.im/download/linux/
-pidgin.im/download/mac/
-pidgin.im/download/source/
-planet.pidgin.im/
-planet.pidgin.im/rss20.xml
-planet.pidgin.im/atom.xml
-developer.pidgin.im/wiki/Adola # obsolete
-developer.pidgin.im/wiki/AfterTwoOhOh # obsolete
-developer.pidgin.im/wiki/AliasFunctionReview # obsolete
-developer.pidgin.im/wiki/Are%20the%20packages%20signed
-developer.pidgin.im/wiki/Authors # obsolete
-developer.pidgin.im/wiki/BadContent # obsolete
-developer.pidgin.im/wiki/BranchStatus # obsolete
-developer.pidgin.im/wiki/BuddyListThemes
-developer.pidgin.im/wiki/BugTracking # obsolete
-developer.pidgin.im/wiki/Building%20Pidgin
-developer.pidgin.im/wiki/BuildingWinPidgin
-developer.pidgin.im/wiki/BuildingWinPidgin/3.0.0
-developer.pidgin.im/wiki/BuildingWinPidgin/Pre2.7.0
-developer.pidgin.im/wiki/BuildingWinNSS
-developer.pidgin.im/wiki/Building%20on%20MacOSX
-developer.pidgin.im/wiki/CHowTo
-developer.pidgin.im/wiki/CHowTo/BasicPluginHowto
-developer.pidgin.im/wiki/CHowTo/ChoosingPluginIds
-developer.pidgin.im/wiki/CHowTo/CommandAPIHowTo
-developer.pidgin.im/wiki/CHowTo/DebugAPIHowTo
-developer.pidgin.im/wiki/CHowTo/NotifyAPIHowTo
-developer.pidgin.im/wiki/CHowTo/PluginActionsHowTo
-developer.pidgin.im/wiki/CHowTo/RequestAPIHowTo
-developer.pidgin.im/wiki/CHowTo/SignalsHowTo
-developer.pidgin.im/wiki/CHowTo/Valgrind
-developer.pidgin.im/wiki/CamelCase # obsolete
-developer.pidgin.im/wiki/CertMgr
-developer.pidgin.im/wiki/CertMgr/Log
-developer.pidgin.im/wiki/CertMgr/ToDo
-developer.pidgin.im/wiki/ChangeLog # obsolete
-developer.pidgin.im/wiki/ConfigurationFiles
-developer.pidgin.im/wiki/ConversationThemes
-developer.pidgin.im/wiki/DbusHowto # obsolete
-developer.pidgin.im/wiki/Dependencies # obsolete
-developer.pidgin.im/wiki/Dependencies/3.0.0 # obsolete
-developer.pidgin.im/wiki/DesignGuidelines
-developer.pidgin.im/wiki/DeveloperPages # obsolete
-developer.pidgin.im/wiki/Development%20FAQ
-developer.pidgin.im/wiki/Doxygen # obsolete
-developer.pidgin.im/wiki/EditorConfigs # obsolete
-developer.pidgin.im/wiki/EndToEndXMPPCrypto
-developer.pidgin.im/wiki/FAQ
-developer.pidgin.im/wiki/FAQAllInOne
-developer.pidgin.im/wiki/FAQssl
-developer.pidgin.im/wiki/FSUES
-developer.pidgin.im/wiki/FinchFeat # obsolete
-developer.pidgin.im/wiki/FreeNode # obsolete
-developer.pidgin.im/wiki/FullChangeLog # obsolete
-developer.pidgin.im/wiki/FunPidgin # obsolete
-developer.pidgin.im/wiki/GObjectFeatures # obsolete
-developer.pidgin.im/wiki/GSoC2008/FinchImprovements
-developer.pidgin.im/wiki/GSoC2008/MasterPassword
-developer.pidgin.im/wiki/GSoC2008/ThemeImprovements
-developer.pidgin.im/wiki/GSoC2008/VoiceAndVideo
-developer.pidgin.im/wiki/GSoC2008/XMPPImprovement
-developer.pidgin.im/wiki/GSoC2008/YahooImprovement
-developer.pidgin.im/wiki/GSoC2009/HidingGobject
-developer.pidgin.im/wiki/GSoC2009/HidingGobject/review071009
-developer.pidgin.im/wiki/GSoC2009/HidingGobject/review071809
-developer.pidgin.im/wiki/GSoC2009/PrivacyRewrite
-developer.pidgin.im/wiki/GSoC2009/PrivacyRewrite/initial_proposal
-developer.pidgin.im/wiki/GSoC2009/PrivacyRewrite/protocol_specific
-developer.pidgin.im/wiki/GSoC2009/TelepathyPrpl
-developer.pidgin.im/wiki/GSoC2009/Vulture
-developer.pidgin.im/wiki/GSoC2009/WindowsGUI
-developer.pidgin.im/wiki/GSoC2009/XMPPTransport
-developer.pidgin.im/wiki/GSoC2010/BetterChatLogViewer
-developer.pidgin.im/wiki/GSoC2010/DetachableLibpurple
-developer.pidgin.im/wiki/GSoC2010/ImproveICQ
-developer.pidgin.im/wiki/GSoC2010/MSN_Refactor
-developer.pidgin.im/wiki/GSoC2012/Android
-developer.pidgin.im/wiki/GSoC2012/Android/compiling
-developer.pidgin.im/wiki/GSoC2012/Android/debugging
-developer.pidgin.im/wiki/GSoC2012/Android/hostbuild
-developer.pidgin.im/wiki/GSoC2012/Android/new-client
-developer.pidgin.im/wiki/GSoC2012/Android/structure
-developer.pidgin.im/wiki/GSoC2012/Statscollector
-developer.pidgin.im/wiki/GTK3 # obsolete
-developer.pidgin.im/wiki/GetABacktrace
-developer.pidgin.im/wiki/GntEntry # obsolete
-developer.pidgin.im/wiki/Gobjectification # obsolete
-developer.pidgin.im/wiki/Help
-developer.pidgin.im/wiki/HelpWanted # obsolete
-developer.pidgin.im/wiki/ICQEncodingProgress # obsolete
-developer.pidgin.im/wiki/ICQStatusMessagesProgress # obsolete
-developer.pidgin.im/wiki/IdeaForMTNBranches # obsolete
-developer.pidgin.im/wiki/Igd # obsolete
-developer.pidgin.im/wiki/ImportCustomSmileysFromEmesene
-developer.pidgin.im/wiki/Installing%20Pidgin
-developer.pidgin.im/wiki/Installing%20Pidgin%20on%20Ubuntu
-developer.pidgin.im/wiki/Installing%20Pidgin%20on%20Windows
-developer.pidgin.im/wiki/InterMapTxt # obsolete
-developer.pidgin.im/wiki/InterTrac # obsolete
-developer.pidgin.im/wiki/InterWiki # obsolete
-developer.pidgin.im/wiki/KeePass # obsolete
-developer.pidgin.im/wiki/KeyringSupport # obsolete
-developer.pidgin.im/wiki/List%20Of%20Supported%20Features # obsolete
-developer.pidgin.im/wiki/LocalTracChanges # obsolete
-developer.pidgin.im/wiki/Luke's%20Notes # obsolete
-developer.pidgin.im/wiki/MSNCertIssue # obsolete
-developer.pidgin.im/wiki/Maiku # obsolete
-developer.pidgin.im/wiki/MarkDoliner # obsolete
-developer.pidgin.im/wiki/Merchandise # obsolete
-developer.pidgin.im/wiki/MonoLoader # obsolete
-developer.pidgin.im/wiki/MonotoneBestPractices # obsolete
-developer.pidgin.im/wiki/MonotoneLimitations # obsolete
-developer.pidgin.im/wiki/MonotoneRcSnippets # obsolete
-developer.pidgin.im/wiki/MsimIMToDo # obsolete
-developer.pidgin.im/wiki/NateOn # obsolete
-developer.pidgin.im/wiki/NetworkManager # obsolete
-developer.pidgin.im/wiki/OpenBugs # obsolete
-developer.pidgin.im/wiki/OpenFire # obsolete
-developer.pidgin.im/wiki/OpenPatches # obsolete
-developer.pidgin.im/wiki/OpenTickets # obsolete
-developer.pidgin.im/wiki/Openfire%20Client%20SSL%20Authentication%20How-to
-developer.pidgin.im/wiki/PageTemplates # obsolete
-developer.pidgin.im/wiki/PalTalk # obsolete
-developer.pidgin.im/wiki/PatchesNeedingImprovement # obsolete
-developer.pidgin.im/wiki/PatchesNeedingReview # obsolete
-developer.pidgin.im/wiki/Perl_API # obsolete
-developer.pidgin.im/wiki/Pidgin%202.0%20Changelog # obsolete
-developer.pidgin.im/wiki/PidginCommunity
-developer.pidgin.im/wiki/PidginTwoFiveSix # obsolete
-developer.pidgin.im/wiki/PidginWebsite # obsolete
-developer.pidgin.im/wiki/PlainTextPasswords
-developer.pidgin.im/wiki/PossibleLicenseViolations
-developer.pidgin.im/wiki/PrivacyRewrite
-developer.pidgin.im/wiki/ProgressReport # obsolete
-developer.pidgin.im/wiki/Protocol%20Specific%20Questions
-developer.pidgin.im/wiki/PurpleArchitecture
-developer.pidgin.im/wiki/PurpleCommander # obsolete
-developer.pidgin.im/wiki/PythonHowTo # obsolete
-developer.pidgin.im/wiki/QuLogic # obsolete
-developer.pidgin.im/wiki/RecentChanges # obsolete
-developer.pidgin.im/wiki/RejectedPatches # obsolete
-developer.pidgin.im/wiki/ReleaseProcess
-developer.pidgin.im/wiki/RemoteLogging
-developer.pidgin.im/wiki/RightThingToDo
-developer.pidgin.im/wiki/Roadmap3.0.0 # obsolete
-developer.pidgin.im/wiki/SampleGtkrc2.0
-developer.pidgin.im/wiki/SandBox # obsolete
-developer.pidgin.im/wiki/Scripting%20and%20Plugins
-developer.pidgin.im/wiki/SecurityVulnerabilityProcess
-developer.pidgin.im/wiki/Sim-on # obsolete
-developer.pidgin.im/wiki/SlpArchitecture # obsolete
-developer.pidgin.im/wiki/SmileyThemes
-developer.pidgin.im/wiki/SoCAndBountyIdeas
-developer.pidgin.im/wiki/SoCApplicationInstructions
-developer.pidgin.im/wiki/SoCDiscussions
-developer.pidgin.im/wiki/SoCIdeas
-developer.pidgin.im/wiki/SoundThemes
-developer.pidgin.im/wiki/SpreadPidginAvatars
-developer.pidgin.im/wiki/StatusIconThemes
-developer.pidgin.im/wiki/SteamFriendsProtocolSpec # obsolete
-developer.pidgin.im/wiki/StupidMoronStu # obsolete
-developer.pidgin.im/wiki/StyleGuide
-developer.pidgin.im/wiki/Sulabh # obsolete
-developer.pidgin.im/wiki/SummerOfCode2007
-developer.pidgin.im/wiki/SummerOfCode2008
-developer.pidgin.im/wiki/SummerOfCode2009
-developer.pidgin.im/wiki/SummerOfCode2010
-developer.pidgin.im/wiki/SummerOfCode2011
-developer.pidgin.im/wiki/SummerOfCode2012
-developer.pidgin.im/wiki/SummerOfCode2013
-developer.pidgin.im/wiki/SummerOfCode2015
-developer.pidgin.im/wiki/SunStudio # obsolete
-developer.pidgin.im/wiki/SupportedXEPs
-developer.pidgin.im/wiki/Telepathy # obsolete
-developer.pidgin.im/wiki/TelepathyHaze # obsolete
-developer.pidgin.im/wiki/ThemingPidgin
-developer.pidgin.im/wiki/ThirdPartyPlugins
-developer.pidgin.im/wiki/ThirdPartySmileyThemes
-developer.pidgin.im/wiki/TicketStats # obsolete
-developer.pidgin.im/wiki/TipsForBugReports
-developer.pidgin.im/wiki/TipsForPatchReports
-developer.pidgin.im/wiki/TipsForPatchSubmissions
-developer.pidgin.im/wiki/TipsForTranslators
-developer.pidgin.im/wiki/TitleIndex # obsolete
-developer.pidgin.im/wiki/TracAccessibility # obsolete
-developer.pidgin.im/wiki/TracAdmin # obsolete
-developer.pidgin.im/wiki/TracBackup # obsolete
-developer.pidgin.im/wiki/TracBatchModify # obsolete
-developer.pidgin.im/wiki/TracBrowser # obsolete
-developer.pidgin.im/wiki/TracCgi # obsolete
-developer.pidgin.im/wiki/TracChangeset # obsolete
-developer.pidgin.im/wiki/TracEnvironment # obsolete
-developer.pidgin.im/wiki/TracFastCgi # obsolete
-developer.pidgin.im/wiki/TracFineGrainedPermissions # obsolete
-developer.pidgin.im/wiki/TracGuide # obsolete
-developer.pidgin.im/wiki/TracImport # obsolete
-developer.pidgin.im/wiki/TracIni # obsolete
-developer.pidgin.im/wiki/TracInstall # obsolete
-developer.pidgin.im/wiki/TracInterfaceCustomization # obsolete
-developer.pidgin.im/wiki/TracLinks # obsolete
-developer.pidgin.im/wiki/TracLogging # obsolete
-developer.pidgin.im/wiki/TracModPython # obsolete
-developer.pidgin.im/wiki/TracModWSGI # obsolete
-developer.pidgin.im/wiki/TracNavigation # obsolete
-developer.pidgin.im/wiki/TracNotification # obsolete
-developer.pidgin.im/wiki/TracPermissions # obsolete
-developer.pidgin.im/wiki/TracPlugins # obsolete
-developer.pidgin.im/wiki/TracQuery # obsolete
-developer.pidgin.im/wiki/TracReports # obsolete
-developer.pidgin.im/wiki/TracRepositoryAdmin # obsolete
-developer.pidgin.im/wiki/TracRevisionLog # obsolete
-developer.pidgin.im/wiki/TracRoadmap # obsolete
-developer.pidgin.im/wiki/TracRss # obsolete
-developer.pidgin.im/wiki/TracSearch # obsolete
-developer.pidgin.im/wiki/TracStandalone # obsolete
-developer.pidgin.im/wiki/TracSupport # obsolete
-developer.pidgin.im/wiki/TracSyntaxColoring # obsolete
-developer.pidgin.im/wiki/TracTickets # obsolete
-developer.pidgin.im/wiki/TracTicketsCustomFields # obsolete
-developer.pidgin.im/wiki/TracTimeline # obsolete
-developer.pidgin.im/wiki/TracUnicode # obsolete
-developer.pidgin.im/wiki/TracUpgrade # obsolete
-developer.pidgin.im/wiki/TracWiki # obsolete
-developer.pidgin.im/wiki/TracWorkflow # obsolete
-developer.pidgin.im/wiki/TranslationsAndStringFreezes
-developer.pidgin.im/wiki/UpdateMsnSupport # obsolete
-developer.pidgin.im/wiki/Using%20Finch
-developer.pidgin.im/wiki/Using%20Libpurple
-developer.pidgin.im/wiki/Using%20Pidgin
-developer.pidgin.im/wiki/UsingPidgin/N900
-developer.pidgin.im/wiki/UsingPidginMercurial
-developer.pidgin.im/wiki/UsingPidginMonotone # obsolete
-developer.pidgin.im/wiki/UsingThisSite
-developer.pidgin.im/wiki/VirtualBox # obsolete
-developer.pidgin.im/wiki/VirtualClassroom
-developer.pidgin.im/wiki/WebKit # obsolete
-developer.pidgin.im/wiki/WebsiteDesignComps # obsolete
-developer.pidgin.im/wiki/WebsiteWireframes # obsolete
-developer.pidgin.im/wiki/WhatIsLibpurple
-developer.pidgin.im/wiki/WhyNoiOSVersion
-developer.pidgin.im/wiki/WhyPackagesExist # obsolete
-developer.pidgin.im/wiki/WikiDeletePage # obsolete
-developer.pidgin.im/wiki/WikiFormatting # obsolete
-developer.pidgin.im/wiki/WikiHtml # obsolete
-developer.pidgin.im/wiki/WikiMacros # obsolete
-developer.pidgin.im/wiki/WikiNewPage # obsolete
-developer.pidgin.im/wiki/WikiPageNames # obsolete
-developer.pidgin.im/wiki/WikiProcessors # obsolete
-developer.pidgin.im/wiki/WikiRestructuredText # obsolete
-developer.pidgin.im/wiki/WikiRestructuredTextLinks # obsolete
-developer.pidgin.im/wiki/WikiStart
-developer.pidgin.im/wiki/XDG_dirs # obsolete
-developer.pidgin.im/wiki/akronix # obsolete
-developer.pidgin.im/wiki/aluink # obsolete
-developer.pidgin.im/wiki/bartosz # obsolete
-developer.pidgin.im/wiki/caseyho # obsolete
-developer.pidgin.im/wiki/charkins # obsolete
-developer.pidgin.im/wiki/darkrain42 # obsolete
-developer.pidgin.im/wiki/datallah # obsolete
-developer.pidgin.im/wiki/davidgray # obsolete
-developer.pidgin.im/wiki/db42 # obsolete
-developer.pidgin.im/wiki/deryni # obsolete
-developer.pidgin.im/wiki/ecoffey # obsolete
-developer.pidgin.im/wiki/ehempel # obsolete
-developer.pidgin.im/wiki/elb # obsolete
-developer.pidgin.im/wiki/evands # obsolete
-developer.pidgin.im/wiki/felipec # obsolete
-developer.pidgin.im/wiki/ffdragon # obsolete
-developer.pidgin.im/wiki/fmoo # obsolete
-developer.pidgin.im/wiki/gillux # obsolete
-developer.pidgin.im/wiki/grim # obsolete
-developer.pidgin.im/wiki/hanzz # obsolete
-developer.pidgin.im/wiki/hbons # obsolete
-developer.pidgin.im/wiki/ivan.komarov # obsolete
-developer.pidgin.im/wiki/jeff # obsolete
-developer.pidgin.im/wiki/joekepley # obsolete
-developer.pidgin.im/wiki/khc # obsolete
-developer.pidgin.im/wiki/kkszysiu # obsolete
-developer.pidgin.im/wiki/kstange # obsolete
-developer.pidgin.im/wiki/lschiere # obsolete
-developer.pidgin.im/wiki/malu # obsolete
-developer.pidgin.im/wiki/mmcco # obsolete
-developer.pidgin.im/wiki/mshkutkov # obsolete
-developer.pidgin.im/wiki/nakulgulati # obsolete
-developer.pidgin.im/wiki/nosnilmot # obsolete
-developer.pidgin.im/wiki/nwalp # obsolete
-developer.pidgin.im/wiki/prekshu # obsolete
-developer.pidgin.im/wiki/prpl_id # obsolete
-developer.pidgin.im/wiki/queueram # obsolete
-developer.pidgin.im/wiki/rekkanoryo # obsolete
-developer.pidgin.im/wiki/resiak # obsolete
-developer.pidgin.im/wiki/rlaager # obsolete
-developer.pidgin.im/wiki/ryanb # obsolete
-developer.pidgin.im/wiki/sadrul # obsolete
-developer.pidgin.im/wiki/salinasv # obsolete
-developer.pidgin.im/wiki/scrouaf # obsolete
-developer.pidgin.im/wiki/seanegan # obsolete
-developer.pidgin.im/wiki/sgarrity # obsolete
-developer.pidgin.im/wiki/shellreef # obsolete
-developer.pidgin.im/wiki/shortcuts
-developer.pidgin.im/wiki/siege # obsolete
-developer.pidgin.im/wiki/sttwister # obsolete
-developer.pidgin.im/wiki/typ0 # obsolete
-developer.pidgin.im/wiki/utopianheaven # obsolete
-developer.pidgin.im/wiki/vv # obsolete
-developer.pidgin.im/wiki/vvAPI # obsolete
-developer.pidgin.im/wiki/wabz # obsolete
+pidgin.im/
+pidgin.im/support/
+pidgin.im/about/
+pidgin.im/download/
+pidgin.im/download/windows/
+pidgin.im/download/linux/
+pidgin.im/download/mac/
+pidgin.im/download/source/
+planet.pidgin.im/
+planet.pidgin.im/rss20.xml
+planet.pidgin.im/atom.xml
+developer.pidgin.im/wiki/Adola # obsolete
+developer.pidgin.im/wiki/AfterTwoOhOh # obsolete
+developer.pidgin.im/wiki/AliasFunctionReview # obsolete
+developer.pidgin.im/wiki/Are%20the%20packages%20signed
+developer.pidgin.im/wiki/Authors # obsolete
+developer.pidgin.im/wiki/BadContent # obsolete
+developer.pidgin.im/wiki/BranchStatus # obsolete
+developer.pidgin.im/wiki/BuddyListThemes
+developer.pidgin.im/wiki/BugTracking # obsolete
+developer.pidgin.im/wiki/Building%20Pidgin
+developer.pidgin.im/wiki/BuildingWinPidgin
+developer.pidgin.im/wiki/BuildingWinPidgin/3.0.0
+developer.pidgin.im/wiki/BuildingWinPidgin/Pre2.7.0
+developer.pidgin.im/wiki/BuildingWinNSS
+developer.pidgin.im/wiki/Building%20on%20MacOSX
+developer.pidgin.im/wiki/CHowTo
+developer.pidgin.im/wiki/CHowTo/BasicPluginHowto
+developer.pidgin.im/wiki/CHowTo/ChoosingPluginIds
+developer.pidgin.im/wiki/CHowTo/CommandAPIHowTo
+developer.pidgin.im/wiki/CHowTo/DebugAPIHowTo
+developer.pidgin.im/wiki/CHowTo/NotifyAPIHowTo
+developer.pidgin.im/wiki/CHowTo/PluginActionsHowTo
+developer.pidgin.im/wiki/CHowTo/RequestAPIHowTo
+developer.pidgin.im/wiki/CHowTo/SignalsHowTo
+developer.pidgin.im/wiki/CHowTo/Valgrind
+developer.pidgin.im/wiki/CamelCase # obsolete
+developer.pidgin.im/wiki/CertMgr
+developer.pidgin.im/wiki/CertMgr/Log
+developer.pidgin.im/wiki/CertMgr/ToDo
+developer.pidgin.im/wiki/ChangeLog # obsolete
+developer.pidgin.im/wiki/ConfigurationFiles
+developer.pidgin.im/wiki/ConversationThemes
+developer.pidgin.im/wiki/DbusHowto # obsolete
+developer.pidgin.im/wiki/Dependencies # obsolete
+developer.pidgin.im/wiki/Dependencies/3.0.0 # obsolete
+developer.pidgin.im/wiki/DesignGuidelines
+developer.pidgin.im/wiki/DeveloperPages # obsolete
+developer.pidgin.im/wiki/Development%20FAQ
+developer.pidgin.im/wiki/Doxygen # obsolete
+developer.pidgin.im/wiki/EditorConfigs # obsolete
+developer.pidgin.im/wiki/EndToEndXMPPCrypto
+developer.pidgin.im/wiki/FAQ
+developer.pidgin.im/wiki/FAQAllInOne
+developer.pidgin.im/wiki/FAQssl
+developer.pidgin.im/wiki/FSUES
+developer.pidgin.im/wiki/FinchFeat # obsolete
+developer.pidgin.im/wiki/FreeNode # obsolete
+developer.pidgin.im/wiki/FullChangeLog # obsolete
+developer.pidgin.im/wiki/FunPidgin # obsolete
+developer.pidgin.im/wiki/GObjectFeatures # obsolete
+developer.pidgin.im/wiki/GSoC2008/FinchImprovements
+developer.pidgin.im/wiki/GSoC2008/MasterPassword
+developer.pidgin.im/wiki/GSoC2008/ThemeImprovements
+developer.pidgin.im/wiki/GSoC2008/VoiceAndVideo
+developer.pidgin.im/wiki/GSoC2008/XMPPImprovement
+developer.pidgin.im/wiki/GSoC2008/YahooImprovement
+developer.pidgin.im/wiki/GSoC2009/HidingGobject
+developer.pidgin.im/wiki/GSoC2009/HidingGobject/review071009
+developer.pidgin.im/wiki/GSoC2009/HidingGobject/review071809
+developer.pidgin.im/wiki/GSoC2009/PrivacyRewrite
+developer.pidgin.im/wiki/GSoC2009/PrivacyRewrite/initial_proposal
+developer.pidgin.im/wiki/GSoC2009/PrivacyRewrite/protocol_specific
+developer.pidgin.im/wiki/GSoC2009/TelepathyPrpl
+developer.pidgin.im/wiki/GSoC2009/Vulture
+developer.pidgin.im/wiki/GSoC2009/WindowsGUI
+developer.pidgin.im/wiki/GSoC2009/XMPPTransport
+developer.pidgin.im/wiki/GSoC2010/BetterChatLogViewer
+developer.pidgin.im/wiki/GSoC2010/DetachableLibpurple
+developer.pidgin.im/wiki/GSoC2010/ImproveICQ
+developer.pidgin.im/wiki/GSoC2010/MSN_Refactor
+developer.pidgin.im/wiki/GSoC2012/Android
+developer.pidgin.im/wiki/GSoC2012/Android/compiling
+developer.pidgin.im/wiki/GSoC2012/Android/debugging
+developer.pidgin.im/wiki/GSoC2012/Android/hostbuild
+developer.pidgin.im/wiki/GSoC2012/Android/new-client
+developer.pidgin.im/wiki/GSoC2012/Android/structure
+developer.pidgin.im/wiki/GSoC2012/Statscollector
+developer.pidgin.im/wiki/GTK3 # obsolete
+developer.pidgin.im/wiki/GetABacktrace
+developer.pidgin.im/wiki/GntEntry # obsolete
+developer.pidgin.im/wiki/Gobjectification # obsolete
+developer.pidgin.im/wiki/Help
+developer.pidgin.im/wiki/HelpWanted # obsolete
+developer.pidgin.im/wiki/ICQEncodingProgress # obsolete
+developer.pidgin.im/wiki/ICQStatusMessagesProgress # obsolete
+developer.pidgin.im/wiki/IdeaForMTNBranches # obsolete
+developer.pidgin.im/wiki/Igd # obsolete
+developer.pidgin.im/wiki/ImportCustomSmileysFromEmesene
+developer.pidgin.im/wiki/Installing%20Pidgin
+developer.pidgin.im/wiki/Installing%20Pidgin%20on%20Ubuntu
+developer.pidgin.im/wiki/Installing%20Pidgin%20on%20Windows
+developer.pidgin.im/wiki/InterMapTxt # obsolete
+developer.pidgin.im/wiki/InterTrac # obsolete
+developer.pidgin.im/wiki/InterWiki # obsolete
+developer.pidgin.im/wiki/KeePass # obsolete
+developer.pidgin.im/wiki/KeyringSupport # obsolete
+developer.pidgin.im/wiki/List%20Of%20Supported%20Features # obsolete
+developer.pidgin.im/wiki/LocalTracChanges # obsolete
+developer.pidgin.im/wiki/Luke's%20Notes # obsolete
+developer.pidgin.im/wiki/MSNCertIssue # obsolete
+developer.pidgin.im/wiki/Maiku # obsolete
+developer.pidgin.im/wiki/MarkDoliner # obsolete
+developer.pidgin.im/wiki/Merchandise # obsolete
+developer.pidgin.im/wiki/MonoLoader # obsolete
+developer.pidgin.im/wiki/MonotoneBestPractices # obsolete
+developer.pidgin.im/wiki/MonotoneLimitations # obsolete
+developer.pidgin.im/wiki/MonotoneRcSnippets # obsolete
+developer.pidgin.im/wiki/MsimIMToDo # obsolete
+developer.pidgin.im/wiki/NateOn # obsolete
+developer.pidgin.im/wiki/NetworkManager # obsolete
+developer.pidgin.im/wiki/OpenBugs # obsolete
+developer.pidgin.im/wiki/OpenFire # obsolete
+developer.pidgin.im/wiki/OpenPatches # obsolete
+developer.pidgin.im/wiki/OpenTickets # obsolete
+developer.pidgin.im/wiki/Openfire%20Client%20SSL%20Authentication%20How-to
+developer.pidgin.im/wiki/PageTemplates # obsolete
+developer.pidgin.im/wiki/PalTalk # obsolete
+developer.pidgin.im/wiki/PatchesNeedingImprovement # obsolete
+developer.pidgin.im/wiki/PatchesNeedingReview # obsolete
+developer.pidgin.im/wiki/Perl_API # obsolete
+developer.pidgin.im/wiki/Pidgin%202.0%20Changelog # obsolete
+developer.pidgin.im/wiki/PidginCommunity
+developer.pidgin.im/wiki/PidginTwoFiveSix # obsolete
+developer.pidgin.im/wiki/PidginWebsite # obsolete
+developer.pidgin.im/wiki/PlainTextPasswords
+developer.pidgin.im/wiki/PossibleLicenseViolations
+developer.pidgin.im/wiki/PrivacyRewrite
+developer.pidgin.im/wiki/ProgressReport # obsolete
+developer.pidgin.im/wiki/Protocol%20Specific%20Questions
+developer.pidgin.im/wiki/PurpleArchitecture
+developer.pidgin.im/wiki/PurpleCommander # obsolete
+developer.pidgin.im/wiki/PythonHowTo # obsolete
+developer.pidgin.im/wiki/QuLogic # obsolete
+developer.pidgin.im/wiki/RecentChanges # obsolete
+developer.pidgin.im/wiki/RejectedPatches # obsolete
+developer.pidgin.im/wiki/ReleaseProcess
+developer.pidgin.im/wiki/RemoteLogging
+developer.pidgin.im/wiki/RightThingToDo
+developer.pidgin.im/wiki/Roadmap3.0.0 # obsolete
+developer.pidgin.im/wiki/SampleGtkrc2.0
+developer.pidgin.im/wiki/SandBox # obsolete
+developer.pidgin.im/wiki/Scripting%20and%20Plugins
+developer.pidgin.im/wiki/SecurityVulnerabilityProcess
+developer.pidgin.im/wiki/Sim-on # obsolete
+developer.pidgin.im/wiki/SlpArchitecture # obsolete
+developer.pidgin.im/wiki/SmileyThemes
+developer.pidgin.im/wiki/SoCAndBountyIdeas
+developer.pidgin.im/wiki/SoCApplicationInstructions
+developer.pidgin.im/wiki/SoCDiscussions
+developer.pidgin.im/wiki/SoCIdeas
+developer.pidgin.im/wiki/SoundThemes
+developer.pidgin.im/wiki/SpreadPidginAvatars
+developer.pidgin.im/wiki/StatusIconThemes
+developer.pidgin.im/wiki/SteamFriendsProtocolSpec # obsolete
+developer.pidgin.im/wiki/StupidMoronStu # obsolete
+developer.pidgin.im/wiki/StyleGuide
+developer.pidgin.im/wiki/Sulabh # obsolete
+developer.pidgin.im/wiki/SummerOfCode2007
+developer.pidgin.im/wiki/SummerOfCode2008
+developer.pidgin.im/wiki/SummerOfCode2009
+developer.pidgin.im/wiki/SummerOfCode2010
+developer.pidgin.im/wiki/SummerOfCode2011
+developer.pidgin.im/wiki/SummerOfCode2012
+developer.pidgin.im/wiki/SummerOfCode2013
+developer.pidgin.im/wiki/SummerOfCode2015
+developer.pidgin.im/wiki/SunStudio # obsolete
+developer.pidgin.im/wiki/SupportedXEPs
+developer.pidgin.im/wiki/Telepathy # obsolete
+developer.pidgin.im/wiki/TelepathyHaze # obsolete
+developer.pidgin.im/wiki/ThemingPidgin
+developer.pidgin.im/wiki/ThirdPartyPlugins
+developer.pidgin.im/wiki/ThirdPartySmileyThemes
+developer.pidgin.im/wiki/TicketStats # obsolete
+developer.pidgin.im/wiki/TipsForBugReports
+developer.pidgin.im/wiki/TipsForPatchReports
+developer.pidgin.im/wiki/TipsForPatchSubmissions
+developer.pidgin.im/wiki/TipsForTranslators
+developer.pidgin.im/wiki/TitleIndex # obsolete
+developer.pidgin.im/wiki/TracAccessibility # obsolete
+developer.pidgin.im/wiki/TracAdmin # obsolete
+developer.pidgin.im/wiki/TracBackup # obsolete
+developer.pidgin.im/wiki/TracBatchModify # obsolete
+developer.pidgin.im/wiki/TracBrowser # obsolete
+developer.pidgin.im/wiki/TracCgi # obsolete
+developer.pidgin.im/wiki/TracChangeset # obsolete
+developer.pidgin.im/wiki/TracEnvironment # obsolete
+developer.pidgin.im/wiki/TracFastCgi # obsolete
+developer.pidgin.im/wiki/TracFineGrainedPermissions # obsolete
+developer.pidgin.im/wiki/TracGuide # obsolete
+developer.pidgin.im/wiki/TracImport # obsolete
+developer.pidgin.im/wiki/TracIni # obsolete
+developer.pidgin.im/wiki/TracInstall # obsolete
+developer.pidgin.im/wiki/TracInterfaceCustomization # obsolete
+developer.pidgin.im/wiki/TracLinks # obsolete
+developer.pidgin.im/wiki/TracLogging # obsolete
+developer.pidgin.im/wiki/TracModPython # obsolete
+developer.pidgin.im/wiki/TracModWSGI # obsolete
+developer.pidgin.im/wiki/TracNavigation # obsolete
+developer.pidgin.im/wiki/TracNotification # obsolete
+developer.pidgin.im/wiki/TracPermissions # obsolete
+developer.pidgin.im/wiki/TracPlugins # obsolete
+developer.pidgin.im/wiki/TracQuery # obsolete
+developer.pidgin.im/wiki/TracReports # obsolete
+developer.pidgin.im/wiki/TracRepositoryAdmin # obsolete
+developer.pidgin.im/wiki/TracRevisionLog # obsolete
+developer.pidgin.im/wiki/TracRoadmap # obsolete
+developer.pidgin.im/wiki/TracRss # obsolete
+developer.pidgin.im/wiki/TracSearch # obsolete
+developer.pidgin.im/wiki/TracStandalone # obsolete
+developer.pidgin.im/wiki/TracSupport # obsolete
+developer.pidgin.im/wiki/TracSyntaxColoring # obsolete
+developer.pidgin.im/wiki/TracTickets # obsolete
+developer.pidgin.im/wiki/TracTicketsCustomFields # obsolete
+developer.pidgin.im/wiki/TracTimeline # obsolete
+developer.pidgin.im/wiki/TracUnicode # obsolete
+developer.pidgin.im/wiki/TracUpgrade # obsolete
+developer.pidgin.im/wiki/TracWiki # obsolete
+developer.pidgin.im/wiki/TracWorkflow # obsolete
+developer.pidgin.im/wiki/TranslationsAndStringFreezes
+developer.pidgin.im/wiki/UpdateMsnSupport # obsolete
+developer.pidgin.im/wiki/Using%20Finch
+developer.pidgin.im/wiki/Using%20Libpurple
+developer.pidgin.im/wiki/Using%20Pidgin
+developer.pidgin.im/wiki/UsingPidgin/N900
+developer.pidgin.im/wiki/UsingPidginMercurial
+developer.pidgin.im/wiki/UsingPidginMonotone # obsolete
+developer.pidgin.im/wiki/UsingThisSite
+developer.pidgin.im/wiki/VirtualBox # obsolete
+developer.pidgin.im/wiki/VirtualClassroom
+developer.pidgin.im/wiki/WebKit # obsolete
+developer.pidgin.im/wiki/WebsiteDesignComps # obsolete
+developer.pidgin.im/wiki/WebsiteWireframes # obsolete
+developer.pidgin.im/wiki/WhatIsLibpurple
+developer.pidgin.im/wiki/WhyNoiOSVersion
+developer.pidgin.im/wiki/WhyPackagesExist # obsolete
+developer.pidgin.im/wiki/WikiDeletePage # obsolete
+developer.pidgin.im/wiki/WikiFormatting # obsolete
+developer.pidgin.im/wiki/WikiHtml # obsolete
+developer.pidgin.im/wiki/WikiMacros # obsolete
+developer.pidgin.im/wiki/WikiNewPage # obsolete
+developer.pidgin.im/wiki/WikiPageNames # obsolete
+developer.pidgin.im/wiki/WikiProcessors # obsolete
+developer.pidgin.im/wiki/WikiRestructuredText # obsolete
+developer.pidgin.im/wiki/WikiRestructuredTextLinks # obsolete
+developer.pidgin.im/wiki/WikiStart
+developer.pidgin.im/wiki/XDG_dirs # obsolete
+developer.pidgin.im/wiki/akronix # obsolete
+developer.pidgin.im/wiki/aluink # obsolete
+developer.pidgin.im/wiki/bartosz # obsolete
+developer.pidgin.im/wiki/caseyho # obsolete
+developer.pidgin.im/wiki/charkins # obsolete
+developer.pidgin.im/wiki/darkrain42 # obsolete
+developer.pidgin.im/wiki/datallah # obsolete
+developer.pidgin.im/wiki/davidgray # obsolete
+developer.pidgin.im/wiki/db42 # obsolete
+developer.pidgin.im/wiki/deryni # obsolete
+developer.pidgin.im/wiki/ecoffey # obsolete
+developer.pidgin.im/wiki/ehempel # obsolete
+developer.pidgin.im/wiki/elb # obsolete
+developer.pidgin.im/wiki/evands # obsolete
+developer.pidgin.im/wiki/felipec # obsolete
+developer.pidgin.im/wiki/ffdragon # obsolete
+developer.pidgin.im/wiki/fmoo # obsolete
+developer.pidgin.im/wiki/gillux # obsolete
+developer.pidgin.im/wiki/grim # obsolete
+developer.pidgin.im/wiki/hanzz # obsolete
+developer.pidgin.im/wiki/hbons # obsolete
+developer.pidgin.im/wiki/ivan.komarov # obsolete
+developer.pidgin.im/wiki/jeff # obsolete
+developer.pidgin.im/wiki/joekepley # obsolete
+developer.pidgin.im/wiki/khc # obsolete
+developer.pidgin.im/wiki/kkszysiu # obsolete
+developer.pidgin.im/wiki/kstange # obsolete
+developer.pidgin.im/wiki/lschiere # obsolete
+developer.pidgin.im/wiki/malu # obsolete
+developer.pidgin.im/wiki/mmcco # obsolete
+developer.pidgin.im/wiki/mshkutkov # obsolete
+developer.pidgin.im/wiki/nakulgulati # obsolete
+developer.pidgin.im/wiki/nosnilmot # obsolete
+developer.pidgin.im/wiki/nwalp # obsolete
+developer.pidgin.im/wiki/prekshu # obsolete
+developer.pidgin.im/wiki/prpl_id # obsolete
+developer.pidgin.im/wiki/queueram # obsolete
+developer.pidgin.im/wiki/rekkanoryo # obsolete
+developer.pidgin.im/wiki/resiak # obsolete
+developer.pidgin.im/wiki/rlaager # obsolete
+developer.pidgin.im/wiki/ryanb # obsolete
+developer.pidgin.im/wiki/sadrul # obsolete
+developer.pidgin.im/wiki/salinasv # obsolete
+developer.pidgin.im/wiki/scrouaf # obsolete
+developer.pidgin.im/wiki/seanegan # obsolete
+developer.pidgin.im/wiki/sgarrity # obsolete
+developer.pidgin.im/wiki/shellreef # obsolete
+developer.pidgin.im/wiki/shortcuts
+developer.pidgin.im/wiki/siege # obsolete
+developer.pidgin.im/wiki/sttwister # obsolete
+developer.pidgin.im/wiki/typ0 # obsolete
+developer.pidgin.im/wiki/utopianheaven # obsolete
+developer.pidgin.im/wiki/vv # obsolete
+developer.pidgin.im/wiki/vvAPI # obsolete
+developer.pidgin.im/wiki/wabz # obsolete
 developer.pidgin.im/wiki/wehlhard # obsolete
\ No newline at end of file
diff --git a/tools/pre-prod.js b/tools/pre-prod.js
--- a/tools/pre-prod.js
+++ b/tools/pre-prod.js
@@ -1,104 +1,104 @@
-/**
- * Runs after Hugo has built the site
- * * Cleans, Minifies and Optimises hugo output
- *
- * USAGE: node tools/pre-prod [path to hugo output]
- */
-
-/*****************************************************************************
- * Imports
- *****************************************************************************/
-
-const fs = require('fs')
-const path = require('path')
-
-const { html: beautify_html } = require('js-beautify')
-
-/*****************************************************************************
- * Set Up
- *****************************************************************************/
-
-const target =
-	// looks for a path in first arg or default to `./public/`
-	path.join(__dirname, `..`, process.argv[2] || 'public') + path.sep
-
-const xmlRegex = /\.(html|xml)$/
-const jsonRegex = /\.json$/
-const svgRegex = /\.svg$/
-
-const htmlBeautifyOptions = { max_preserve_newlines: 0 }
-
-/*****************************************************************************
- * Execution
- *****************************************************************************/
-
-getFilePaths(target).forEach(path => {
-	if (path.match(xmlRegex)) {
-		tidyXML(path)
-	} else if (path.match(jsonRegex)) {
-		minifyJSON(path)
-	}
-})
-
-/*****************************************************************************
- * File Handlers
- *****************************************************************************/
-
-/**
- * Format XML and HTML, removing hugo template artifacts,
- * like whitespace chasms
- * @param {string} path
- */
-function tidyXML(path) {
-	const data = fs.readFileSync(path, 'utf8')
-	const formatted = beautify_html(data, htmlBeautifyOptions)
-
-	fs.writeFile(path, formatted, err => {
-		if (err) {
-			console.log(`Error Tidying ${path}`, err)
-		}
-		console.log(`Tidied path: ${path.replace(target, '')}`)
-	})
-}
-
-/**
- * Minify JSON
- * @param {string} path
- */
-function minifyJSON(path) {
-	const data = fs.readFileSync(path, 'utf8')
-	const formatted = JSON.stringify(JSON.parse(data))
-
-	fs.writeFile(path, formatted, err => {
-		if (err) {
-			console.log(`Error minifying ${path}`, err)
-		}
-		console.log(`Minified path: ${path.replace(target, '')}`)
-	})
-}
-
-/*****************************************************************************
- * Helpers
- *****************************************************************************/
-
-function getFilePaths(input) {
-	const items = readDir(input)
-	const ret = []
-
-	while (items.length) {
-		const item = items.pop()
-		const stat = fs.statSync(item)
-
-		if (stat.isDirectory()) {
-			items.push(...readDir(item))
-		} else if (stat.isFile()) {
-			ret.push(item)
-		}
-	}
-
-	return ret
-}
-
-function readDir(item) {
-	return fs.readdirSync(item).map(i => path.join(item, i))
-}
+/**
+ * Runs after Hugo has built the site
+ * * Cleans, Minifies and Optimises hugo output
+ *
+ * USAGE: node tools/pre-prod [path to hugo output]
+ */
+
+/*****************************************************************************
+ * Imports
+ *****************************************************************************/
+
+const fs = require('fs')
+const path = require('path')
+
+const { html: beautify_html } = require('js-beautify')
+
+/*****************************************************************************
+ * Set Up
+ *****************************************************************************/
+
+const target =
+	// looks for a path in first arg or default to `./public/`
+	path.join(__dirname, `..`, process.argv[2] || 'public') + path.sep
+
+const xmlRegex = /\.(html|xml)$/
+const jsonRegex = /\.json$/
+const svgRegex = /\.svg$/
+
+const htmlBeautifyOptions = { max_preserve_newlines: 0 }
+
+/*****************************************************************************
+ * Execution
+ *****************************************************************************/
+
+getFilePaths(target).forEach(path => {
+	if (path.match(xmlRegex)) {
+		tidyXML(path)
+	} else if (path.match(jsonRegex)) {
+		minifyJSON(path)
+	}
+})
+
+/*****************************************************************************
+ * File Handlers
+ *****************************************************************************/
+
+/**
+ * Format XML and HTML, removing hugo template artifacts,
+ * like whitespace chasms
+ * @param {string} path
+ */
+function tidyXML(path) {
+	const data = fs.readFileSync(path, 'utf8')
+	const formatted = beautify_html(data, htmlBeautifyOptions)
+
+	fs.writeFile(path, formatted, err => {
+		if (err) {
+			console.log(`Error Tidying ${path}`, err)
+		}
+		console.log(`Tidied path: ${path.replace(target, '')}`)
+	})
+}
+
+/**
+ * Minify JSON
+ * @param {string} path
+ */
+function minifyJSON(path) {
+	const data = fs.readFileSync(path, 'utf8')
+	const formatted = JSON.stringify(JSON.parse(data))
+
+	fs.writeFile(path, formatted, err => {
+		if (err) {
+			console.log(`Error minifying ${path}`, err)
+		}
+		console.log(`Minified path: ${path.replace(target, '')}`)
+	})
+}
+
+/*****************************************************************************
+ * Helpers
+ *****************************************************************************/
+
+function getFilePaths(input) {
+	const items = readDir(input)
+	const ret = []
+
+	while (items.length) {
+		const item = items.pop()
+		const stat = fs.statSync(item)
+
+		if (stat.isDirectory()) {
+			items.push(...readDir(item))
+		} else if (stat.isFile()) {
+			ret.push(item)
+		}
+	}
+
+	return ret
+}
+
+function readDir(item) {
+	return fs.readdirSync(item).map(i => path.join(item, i))
+}
