Skip to content
Snippets Groups Projects
Commit afe70e36 authored by Nikos Roussos's avatar Nikos Roussos
Browse files

Fix relative links

parent f1a205cc
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -19,6 +19,7 @@ from os import path, listdir, makedirs, mkdir
import sys
import yaml
import time
import re
from glob import glob
from shutil import copy2
 
Loading
Loading
@@ -101,6 +102,16 @@ def generate_posts():
 
print('Generating HTML blog post at {0}...'.format(filename))
 
content = re.sub(
r" src=[\"']([^/]+?)[\"']",
' src="/{0}{1}"'.format(link, r"\1"),
content)
content = re.sub(
r" href=[\"']([^/]+?)[\"']",
' href="/{0}{1}"'.format(link, r"\1"),
content)
post_object = dict(
date=date,
shortdate=shortdate,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment