From 02985b5387b9fcb181d2d89123665e24661482a7 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Mon, 7 Aug 2017 22:23:21 +0300 Subject: Fix URL links --- app.py | 6 +- docs/blog/2017/05/26/intro/index.html | 8 +- docs/blog/index.html | 10 +- docs/index.html | 10 +- docs/wiki/Battery-replacement/index.html | 8 +- .../BlackBerry-Bold-Touch-9900-(Dakota)/index.html | 8 +- docs/wiki/Boot-process/index.html | 8 +- docs/wiki/Build-internals/index.html | 8 +- docs/wiki/Coolpad-Sky-3-E502-(Modena-2)/index.html | 8 +- docs/wiki/Creating-a-package/index.html | 8 +- docs/wiki/Development-guide/index.html | 8 +- docs/wiki/Device-Wishlist/index.html | 8 +- docs/wiki/Devices/index.html | 8 +- docs/wiki/External-resources/index.html | 8 +- docs/wiki/Fairphone-2/index.html | 8 +- docs/wiki/Firmware/index.html | 8 +- docs/wiki/Glossary/index.html | 8 +- docs/wiki/HTC-Ace-(HTC-Desire-HD)/index.html | 8 +- docs/wiki/HTC-Bravo-(HTC-Desire)/index.html | 8 +- docs/wiki/Home/index.html | 8 +- .../index.html | 8 +- docs/wiki/Initramfs-development/index.html | 8 +- docs/wiki/Inspecting-the-initramfs/index.html | 8 +- docs/wiki/Installation-Guide/index.html | 8 +- .../index.html | 8 +- docs/wiki/LG-G3-Global/index.html | 8 +- docs/wiki/Matrix-and-IRC/index.html | 8 +- .../wiki/Migration-to-aports-subfolders/index.html | 8 +- docs/wiki/Milestones/index.html | 8 +- docs/wiki/Mozilla-Flame/index.html | 8 +- docs/wiki/Package-naming-convention/index.html | 8 +- docs/wiki/Packaging-Plasma-Mobile/index.html | 8 +- docs/wiki/Partition-layout/index.html | 8 +- docs/wiki/Plasma-Mobile/index.html | 8 +- docs/wiki/Porting-to-a-new-device/index.html | 8 +- docs/wiki/Related-Projects/index.html | 8 +- .../Samsung-N7100-(Galaxy-Note-II-GSM)/index.html | 8 +- .../index.html | 8 +- .../index.html | 8 +- docs/wiki/Screen-Calibration/index.html | 8 +- docs/wiki/Serial-debugging/index.html | 8 +- docs/wiki/The-mainline-kernel/index.html | 8 +- docs/wiki/Tips-and-tricks/index.html | 8 +- docs/wiki/Troubleshooting/index.html | 8 +- docs/wiki/Troubleshooting:grsec/index.html | 8 +- docs/wiki/Troubleshooting:kernel/index.html | 8 +- docs/wiki/Tuning-sysfs/index.html | 8 +- docs/wiki/Upstreaming/index.html | 8 +- docs/wiki/Using-prebuilt-kernels/index.html | 8 +- docs/wiki/Wifi/index.html | 8 +- docs/wiki/Xperia-E-Dual/index.html | 8 +- docs/wiki/Xperia-Z2-Tablet/index.html | 8 +- docs/wiki/Xperia-Z2/index.html | 8 +- docs/wiki/_Sidebar/index.html | 8 +- .../asus-grouper-(Google-Nexus-7-2012)/index.html | 8 +- docs/wiki/deviceinfo-reference/index.html | 8 +- docs/wiki/deviceinfo_flash_methods/index.html | 8 +- docs/wiki/htc-monarudo-(HTC-Droid-DNA)/index.html | 8 +- docs/wiki/index.html | 144 ++++++++++----------- docs/wiki/jolla-sbj-(Jolla-phone)/index.html | 8 +- docs/wiki/landrover-a9/index.html | 8 +- .../wiki/lg-hammerhead-(Google-Nexus-5)/index.html | 8 +- docs/wiki/lg-mako-(Google-Nexus-4)/index.html | 8 +- docs/wiki/motorola-titan-(Moto-G-2014)/index.html | 8 +- docs/wiki/nokia-rx51-(Nokia-N900)/index.html | 8 +- docs/wiki/qemu-amd64-(QEMU-for-x86_64)/index.html | 8 +- .../index.html | 8 +- docs/wiki/samsung-S7562/index.html | 8 +- .../index.html | 8 +- .../samsung-i9100-(Samsung-Galaxy-SII)/index.html | 8 +- .../index.html | 8 +- .../wiki/sony-amami-(Xperia-Z1-Compact)/index.html | 8 +- templates/base.html | 8 +- templates/index.html | 2 +- 74 files changed, 362 insertions(+), 362 deletions(-) diff --git a/app.py b/app.py index fc4ab4a..2bb4567 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,6 @@ import markdown -from flask import Flask, render_template +from flask import Flask, render_template, url_for from os import listdir app = Flask(__name__) @@ -15,7 +15,7 @@ def home(): def parse_post(post): y, m, d, *title = post[:-3].split('-') slug = '-'.join(title) - return {'url': f'/blog/{y}/{m}/{d}/{slug}/', 'title': ' '.join(title)} + return {'url': url_for('blog_post', y=y, m=m, d=d, slug=slug), 'title': ' '.join(title)} @app.route('/blog/') def blog(): @@ -38,7 +38,7 @@ def blog_post(y, m, d, slug): def parse_page(page): slug = page[:-3] title = slug.replace('-', ' ') - return {'url': f'/wiki/{slug}/', 'title': title} + return {'url': url_for('wiki_page', slug=slug), 'title': title} @app.route('/wiki/') def wiki(): diff --git a/docs/blog/2017/05/26/intro/index.html b/docs/blog/2017/05/26/intro/index.html index 48a67c0..ce38e16 100644 --- a/docs/blog/2017/05/26/intro/index.html +++ b/docs/blog/2017/05/26/intro/index.html @@ -21,7 +21,7 @@
- +

postmarketOS @@ -29,9 +29,9 @@ diff --git a/docs/blog/index.html b/docs/blog/index.html index 921e043..adfbd1e 100644 --- a/docs/blog/index.html +++ b/docs/blog/index.html @@ -21,7 +21,7 @@
- +

postmarketOS @@ -29,15 +29,15 @@ diff --git a/docs/index.html b/docs/index.html index fcdae6c..8b092ab 100644 --- a/docs/index.html +++ b/docs/index.html @@ -21,7 +21,7 @@

postmarketOS (pmOS), is a touch-optimized, pre-configured Alpine Linux that can be installed on smartphones and other mobile devices. The project is at very early stages of development and is not yet usable for most users.

-

For further details read our introductory blog post.

+

For further details read our introductory blog post.

Find us on: