fixing urls

This commit is contained in:
Shan Carter
2017-03-22 09:24:37 -07:00
parent f2cbc9ead4
commit 4bd4c4dcf9
3 changed files with 11 additions and 3 deletions
+5 -1
View File
@@ -5,7 +5,11 @@ export default function(dom, data) {
data.authors = data.authors || [];
// paths
data.url = data.url ? data.url : "http://distill.pub/" + data.distillPath;
if (!data.distillPath && !data.url) {
data.url = "http://distill.pub/";
} else if (!data.url) {
data.url = "http://distill.pub/" + data.distillPath;
}
data.githubUrl = "https://github.com/" + data.githubPath;
data.previewURL = data.previewURL ? data.previewURL : data.url + "/thumbnail.jpg"
+5 -1
View File
@@ -5092,7 +5092,11 @@ var expandData = function(dom, data) {
data.authors = data.authors || [];
// paths
data.url = data.url ? data.url : "http://distill.pub/" + data.distillPath;
if (!data.distillPath && !data.url) {
data.url = "http://distill.pub/";
} else if (!data.url) {
data.url = "http://distill.pub/" + data.distillPath;
}
data.githubUrl = "https://github.com/" + data.githubPath;
data.previewURL = data.previewURL ? data.previewURL : data.url + "/thumbnail.jpg";
+1 -1
View File
File diff suppressed because one or more lines are too long